X-Git-Url: https://codewiz.org/gitweb?a=blobdiff_plain;f=src%2Fshare%2Fmh%2Fimport_key;h=1b6f267b1e15c5c7c8e5a46775533661efc29cb3;hb=9307f58b4fdf8e139c4fd5de5c3a878b8b12d0b1;hp=ada291474aefe6a61268923d488eba24c89aba46;hpb=17315937bc0af145ef7dfb749096faad49f208aa;p=monkeysphere.git diff --git a/src/share/mh/import_key b/src/share/mh/import_key index ada2914..1b6f267 100644 --- a/src/share/mh/import_key +++ b/src/share/mh/import_key @@ -26,6 +26,10 @@ if [ -z "$serviceName" ] ; then failure "You must specify a service name for use in the OpenPGP certificate user ID." fi +# test that a key with that user ID does not already exist +check_key_userid "$serviceName" "$serviceName" && \ + failure "A key with service name '$serviceName' already exists." + # check that the service name is well formatted check_service_name "$serviceName" @@ -46,8 +50,8 @@ else | gpg_host --import fi -# export to gpg public key to file -update_gpg_pub_file +# export to OpenPGP public key to file +update_pgp_pub_file log info "host key imported:"