summaryrefslogtreecommitdiff
path: root/src/share/mh/import_key
diff options
context:
space:
mode:
Diffstat (limited to 'src/share/mh/import_key')
-rw-r--r--src/share/mh/import_key8
1 files changed, 3 insertions, 5 deletions
diff --git a/src/share/mh/import_key b/src/share/mh/import_key
index 6a897b6..1efb1ac 100644
--- a/src/share/mh/import_key
+++ b/src/share/mh/import_key
@@ -15,12 +15,10 @@ import_key() {
local hostName
local userID
-local fingerprint
-# check for presence of secret key
-# FIXME: is this the proper test to be doing here?
-fingerprint_host_key >/dev/null \
- && failure "An OpenPGP host key already exists."
+# check for presense of a key
+[ "$FINGERPRINT" ] && \
+ failure "An OpenPGP host key already exists."
hostName=${1:-$(hostname -f)}