- gpg_host --export --armor --export-options export-minimal > "$HOST_KEY_FILE"
- log debug "updating fingerprint file '$HOST_KEY_FPR_FILE'..."
- gpg_host --list-secret-key --with-colons --with-fingerprint \
- | awk -F: '/^fpr:/{ print $10 }' > "$HOST_KEY_FPR_FILE"
-}
-
-host_fingerprints() {
- local fprs=($(cat "$HOST_KEY_FPR_FILE"))
-
- log debug "host key fingerprints:"
- printf '%s\n' "${fprs[@]}" | log debug
- printf '%s\n' "${fprs[@]}"
+ gpg_host --export --armor --export-options export-minimal \
+ $(gpg_host --list-secret-keys --with-colons --fingerprint | grep ^fpr | cut -f10 -d:) \
+ > "$HOST_KEY_FILE"