diff options
author | Jameson Graef Rollins <jrollins@finestructure.net> | 2009-02-09 00:21:40 -0500 |
---|---|---|
committer | Jameson Graef Rollins <jrollins@finestructure.net> | 2009-02-09 00:21:40 -0500 |
commit | f728df69bbb04ed21a437832c486590cc5a83684 (patch) | |
tree | b966de78cb2c3803f3d905972d9c0321976e14fc /src/monkeysphere-host | |
parent | 770f45b0c1d72a1bb89fd98fe070a6dfdcc4c0bf (diff) |
Break out host export commands into gpg_host_export and
gpg_host_export_to_ssh_file functions, and update the {gen,import}_key
functions accordingly.
Diffstat (limited to 'src/monkeysphere-host')
-rwxr-xr-x | src/monkeysphere-host | 13 |
1 files changed, 13 insertions, 0 deletions
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 |