X-Git-Url: https://codewiz.org/gitweb?a=blobdiff_plain;f=src%2Fshare%2Fma%2Fadd_certifier;h=402da08e552cdccdf48329f89df4af28aca0fc12;hb=3e5df3def466a61cd32bdcc1fd29da09dff43729;hp=f2cadf20b37dff6d9ddc2d42bcd79fc900ecbd37;hpb=18f0c19e96b6eb1132e6a412e324f8c2b64762ff;p=monkeysphere.git diff --git a/src/share/ma/add_certifier b/src/share/ma/add_certifier index f2cadf2..402da08 100644 --- a/src/share/ma/add_certifier +++ b/src/share/ma/add_certifier @@ -108,7 +108,7 @@ if [ -f "$keyID" -o "$keyID" = '-' ] ; then fi # load the key - gpg_sphere "--import" <"$keyID" \ + gpg_sphere "--import" <"$keyID" 2>/dev/null \ || failure "could not read key from '$keyID'" # else, get the key from the keyserver @@ -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 <