check_gpg_authentication_subkey "$keyID"
# generate the list of commands that will be passed to edit-key
- editCommands=$(cat <<EOF
-addkey
+ editCommands="addkey
7
S
E
Q
$keyLength
0
-save
-EOF
-)
+save"
# setup the temp fifo dir for retrieving the key password
log debug "creating password fifo..."
="$userID" 2>/dev/null)
# output header
- cat <<EOF | log info
+ log info <<EOF
-------------------- Monkeysphere warning -------------------
Monkeysphere found OpenPGP keys for this hostname, but none had full validity.
EOF
# if one of keys found matches the one offered by the
# host, then output info
if [ "$sshKeyGPG" = "$sshKeyOffered" ] ; then
- cat <<EOF | log info
+ log info <<EOF
An OpenPGP key matching the ssh key offered by the host was found:
EOF
# output the other user IDs for reference
if (echo "$gpgSigOut" | grep "^uid" | grep -v -q "$userID") ; then
- cat <<EOF | log info
+ log info <<EOF
Other user IDs on this key:
EOF
fi
# output ssh fingerprint
- cat <<EOF | log info
+ log info <<EOF
RSA key fingerprint is ${sshFingerprint}.
EOF
# if no key match was made (and the "while read" subshell
# returned 1) output how many keys were found
if (( returnCode != 1 )) ; then
- cat <<EOF | log info
+ log info <<EOF
None of the found keys matched the key offered by the host.
Run the following command for more info about the found keys:
gpg --check-sigs --list-options show-uid-validity =${userID}
# if host key could not be retrieved from the host, output message
else
- cat <<EOF | log info
+ log info <<EOF
Could not retrieve RSA host key from $HOST.
EOF
fi
# output footer
- cat <<EOF | log info
+ log info <<EOF
-------------------- ssh continues below --------------------
EOF
}