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
+[ "$HOST_FINGERPRINT" ] && \
+ failure "An OpenPGP host key already exists."
hostName=${1:-$(hostname -f)}
gpg_host --import
# find the key fingerprint of the newly converted key
-HOST_FINGERPRINT=$(fingerprint_host_key)
+HOST_FINGERPRINT=$(get_host_fingerprint)
export HOST_FINGERPRINT
# export public key to file