From cd4c36070c85283086ed914d8fd6ac77884173bb Mon Sep 17 00:00:00 2001 From: Jameson Graef Rollins Date: Fri, 20 Feb 2009 14:26:15 -0500 Subject: tweak/cleanup some of the prompts. --- src/share/ma/add_certifier | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/share/ma/add_certifier') diff --git a/src/share/ma/add_certifier b/src/share/ma/add_certifier index f2cadf2..a48db64 100644 --- a/src/share/ma/add_certifier +++ b/src/share/ma/add_certifier @@ -126,8 +126,8 @@ else gpg_sphere "--fingerprint 0x${fingerprint}!" if [ "$PROMPT" = "true" ] ; then - echo "Are you sure you want to add the above key as a" - read -p "certifier of users on this system? (Y/n) " OK; OK=${OK:-Y} + echo "Are you sure you want to add the above key as a certifier" + read -p "of users on this system? (Y/n) " OK; OK=${OK:-Y} if [ "${OK/y/Y}" != 'Y' ] ; then failure "Identity certifier not added." fi -- cgit v1.2.3 From 6e371ad70b96003d50c769a2d2f6fd82c15d4bb5 Mon Sep 17 00:00:00 2001 From: Jameson Graef Rollins Date: Sat, 21 Feb 2009 16:16:58 -0500 Subject: add tests to add_revoker and add_certifier that more than one key was not found when adding by using key ID. --- src/share/ma/add_certifier | 12 +++++++++++- src/share/mh/add_revoker | 12 +++++++++++- 2 files changed, 22 insertions(+), 2 deletions(-) (limited to 'src/share/ma/add_certifier') diff --git a/src/share/ma/add_certifier b/src/share/ma/add_certifier index a48db64..eba6893 100644 --- a/src/share/ma/add_certifier +++ b/src/share/ma/add_certifier @@ -120,7 +120,17 @@ else # get the full fingerprint of new certifier key log debug "getting fingerprint of certifier key..." fingerprint=$(gpg_sphere "--list-key --with-colons --with-fingerprint 0x${keyID}!" \ - | grep '^fpr:' | grep "$keyID" | cut -d: -f10) + | grep '^fpr:' | cut -d: -f10) + + # test that there is only a single fingerprint + if (( $(echo "$fingerprint" | wc -l) != 1 )) ; then + cat < Date: Sat, 21 Feb 2009 16:29:35 -0500 Subject: fix output formatting for cases where multiple fingerprints are found, in functions that are doing that sort of thing --- src/monkeysphere | 4 +--- src/share/ma/add_certifier | 2 +- src/share/mh/add_revoker | 2 +- 3 files changed, 3 insertions(+), 5 deletions(-) (limited to 'src/share/ma/add_certifier') diff --git a/src/monkeysphere b/src/monkeysphere index 0d8f4ff..fd96f45 100755 --- a/src/monkeysphere +++ b/src/monkeysphere @@ -87,9 +87,7 @@ check_gpg_sec_key_id() { ;; *) echo "Multiple primary secret keys found:" - for key in $(echo "$gpgSecOut" | cut -d: -f5) ; do - echo " $key" - done + echo "$gpgSecOut" | cut -d: -f5 echo "Please specify which primary key to use." failure ;; diff --git a/src/share/ma/add_certifier b/src/share/ma/add_certifier index eba6893..6f85ecf 100644 --- a/src/share/ma/add_certifier +++ b/src/share/ma/add_certifier @@ -126,7 +126,7 @@ else if (( $(echo "$fingerprint" | wc -l) != 1 )) ; then cat <