except in update_gpg_pub_file, which dkg is going to modify to just
hold the host keys and not any other keys (like revoker keys). this
file alone can then be used to get host key info for non-priviledged
users.
# host pub key files
HOST_KEY_FILE="${SYSDATADIR}/host_keys.pub.gpg"
# host pub key files
HOST_KEY_FILE="${SYSDATADIR}/host_keys.pub.gpg"
-# host pub key fingerprints file
-HOST_KEY_FPR_FILE="${SYSDATADIR}/host_keys.fprs"
# UTC date in ISO 8601 format if needed
DATE=$(date -u '+%FT%T')
# UTC date in ISO 8601 format if needed
DATE=$(date -u '+%FT%T')
- local fprs=($(cat "$HOST_KEY_FPR_FILE" 2>/dev/null))
+ local fprs=($(<"$HOST_KEY_FILE" "$SYSSHAREDIR/keytrans" listfprs))
log debug "host key fingerprints:"
printf '%s\n' "${fprs[@]}" | log debug
log debug "host key fingerprints:"
printf '%s\n' "${fprs[@]}" | log debug
# fail if host key not present
check_no_keys() {
# fail if host key not present
check_no_keys() {
- [ -s "$HOST_KEY_FILE" ] || [ -s "$HOST_KEY_FPR_FILE" ] \
+ [ -s "$HOST_KEY_FILE" ] \
|| failure "You don't appear to have a Monkeysphere host key on this server.
Please run 'monkeysphere-host import-key' import a key."
}
|| failure "You don't appear to have a Monkeysphere host key on this server.
Please run 'monkeysphere-host import-key' import a key."
}