> "$HOST_KEY_FILE"
}
-host_fingerprints() {
- local fprs=($(gpg_host --list-secret-keys --with-colons --fingerprint | grep ^fpr: | cut -f10 -d:))
-
- log debug "host key fingerprints:"
- printf '%s\n' "${fprs[@]}" | log debug
- printf '%s\n' "${fprs[@]}"
-}
-
# check that the service name is well formed
check_service_name() {
local name="$1"
check_key_input() {
local keyID="$1"
# array of fingerprints
- local fprs=($(host_fingerprints))
+ local fprs=($(list_primary_fingerprints <"$HOST_KEY_FILE"))
case ${#fprs[@]} in
0)
shift
local keys=$@
local i=0
- local fprs=($(host_fingerprints))
+ local fprs=($(list_primary_fingerprints <"$HOST_KEY_FILE"))
local key
check_no_keys