a couple of small fixes to the {gen,import}_key functions
[monkeysphere.git] / src / share / mh / import_key
index 6a897b6122ff9caed1c2c7fe300842e3311b9101..1efb1ac5ce354836e0d63c0539135e1a476f05b6 100644 (file)
@@ -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)}