diff options
author | Matt Goins <mjgoins@openflows.com> | 2009-02-21 16:54:39 -0500 |
---|---|---|
committer | Matt Goins <mjgoins@openflows.com> | 2009-02-21 16:54:39 -0500 |
commit | 4e0502a242b89c73535b00cc1b199dfea38ce4d4 (patch) | |
tree | 6bed970da1f85171b1c0b13095b702825a90754b /src/share/ma/add_certifier | |
parent | d41fe28eb49e42d7773a223a43fd108913410c99 (diff) | |
parent | eb88374be90344d1808fe49a5bc69a547a09280d (diff) |
Merge branch 'master' of git://lair.fifthhorseman.net/~dkg/monkeysphere
Diffstat (limited to 'src/share/ma/add_certifier')
-rw-r--r-- | src/share/ma/add_certifier | 16 |
1 files changed, 13 insertions, 3 deletions
diff --git a/src/share/ma/add_certifier b/src/share/ma/add_certifier index f2cadf2..6f85ecf 100644 --- a/src/share/ma/add_certifier +++ b/src/share/ma/add_certifier @@ -120,14 +120,24 @@ 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 <<EOF +More than one fingerprint found: +$fingerprint +Please use a more specific key ID. +EOF + failure + fi log info "key found:" 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 |