X-Git-Url: https://codewiz.org/gitweb?a=blobdiff_plain;f=src%2Fmonkeysphere-host;h=bcb570b98df166310938b1f795c445537fc33a95;hb=f728df69bbb04ed21a437832c486590cc5a83684;hp=aa764dbcd54cdabb415b23b8f226318d1eb080fc;hpb=770f45b0c1d72a1bb89fd98fe070a6dfdcc4c0bf;p=monkeysphere.git diff --git a/src/monkeysphere-host b/src/monkeysphere-host index aa764db..bcb570b 100755 --- a/src/monkeysphere-host +++ b/src/monkeysphere-host @@ -97,6 +97,19 @@ gpg_host_edit() { "0x${HOST_FINGERPRINT}!" "$@" } +# export the host key to stdout +gpg_host_export() { + gpg_host --export --armor --export-options export-minimal \ + "0x${HOST_FINGERPRINT}!" +} + +# export the host key to the monkeysphere host file key +gpg_host_export_to_ssh_file() { + log debug "exporting openpgp public key..." + gpg_host_export > "${MHDATADIR}/ssh_host_rsa_key.pub.gpg" + log info "SSH host public key in OpenPGP form: ${MHDATADIR}/ssh_host_rsa_key.pub.gpg" +} + # output just key fingerprint fingerprint_host_key() { # set the pipefail option so functions fails if can't read sec key