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."
hostName=${1:-$(hostname -f)}
PEM2OPENPGP_USAGE_FLAGS=authenticate pem2openpgp "$userID" | \
gpg_host --import
-# find the key fingerprint of the newly converted key
-HOST_FINGERPRINT=$(fingerprint_host_key)
-export HOST_FINGERPRINT
+# load the new host fpr into the fpr variable
+load_fingerprint_secret
+
+# export to ssh public key file
+create_ssh_pub_file
-# export public key to file
-gpg_host_export_to_ssh_file
+# export to gpg public key to file
+create_gpg_pub_file
# show info about new key
show_key