summaryrefslogtreecommitdiff
path: root/src/share/mh
diff options
context:
space:
mode:
Diffstat (limited to 'src/share/mh')
-rw-r--r--src/share/mh/import_key4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/share/mh/import_key b/src/share/mh/import_key
index ada2914..fea3d27 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"