tools/confidence_test.sh: now works with gnupg-2.0 and gnupg-2.1
This commit is contained in:
committed by
Tom Limoncelli
parent
ca1d10ba80
commit
3b0f0194a0
@@ -192,8 +192,15 @@ function get_gpg_filename() {
|
|||||||
|
|
||||||
# Prepare keychain for use.
|
# Prepare keychain for use.
|
||||||
function prepare_keychain() {
|
function prepare_keychain() {
|
||||||
|
local keyringasc
|
||||||
echo '========== Importing keychain: START' >&2
|
echo '========== Importing keychain: START' >&2
|
||||||
$GPG --import "$(get_pubring_path)" 2>&1 | egrep -v 'not changed$' >&2
|
# Works with gpg 2.0
|
||||||
|
#$GPG --import "$(get_pubring_path)" 2>&1 | egrep -v 'not changed$' >&2
|
||||||
|
# Works with gpg 2.0 and 2.1
|
||||||
|
# NB: We must export the keys to a format that can be imported.
|
||||||
|
make_self_deleting_tempfile keyringasc
|
||||||
|
$GPG --export --keyring "$(get_pubring_path)" >"$keyringasc"
|
||||||
|
$GPG --import "$keyringasc"
|
||||||
echo '========== Importing keychain: DONE' >&2
|
echo '========== Importing keychain: DONE' >&2
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -116,8 +116,8 @@ PHASE 'Alice does the second part to enroll bob.'
|
|||||||
become_alice
|
become_alice
|
||||||
|
|
||||||
PHASE 'She enrolls bob.'
|
PHASE 'She enrolls bob.'
|
||||||
gpg --import $(get_pubring_path)
|
#gpg --import $(get_pubring_path)
|
||||||
# TODO(tlim) That --import can be eliminated... maybe?
|
## TODO(tlim) That --import can be eliminated... maybe?
|
||||||
|
|
||||||
PHASE 'She enrolls secrets.txt.'
|
PHASE 'She enrolls secrets.txt.'
|
||||||
blackbox_register_new_file secret.txt
|
blackbox_register_new_file secret.txt
|
||||||
@@ -185,9 +185,8 @@ assert_file_md5hash secret.txt "d3e6bbdfc76fae7fd0a921f3408db1d1"
|
|||||||
PHASE 'appears.'
|
PHASE 'appears.'
|
||||||
become_bob
|
become_bob
|
||||||
|
|
||||||
PHASE 'Bob makes sure he has all new keys.'
|
#PHASE 'Bob makes sure he has all new keys.'
|
||||||
|
#gpg --import keyrings/live/pubring.???
|
||||||
gpg --import keyrings/live/pubring.???
|
|
||||||
|
|
||||||
# Pick a GID to use:
|
# Pick a GID to use:
|
||||||
# This users's default group:
|
# This users's default group:
|
||||||
|
|||||||
Reference in New Issue
Block a user