-# load the host fingerprint into the fingerprint variable, using the
-# export gpg pub key file
-# FIXME: this seems much less than ideal, with all this temp keyring
-# stuff. is there a way we can do this without having to create temp
-# files? what if we stored the fingerprint in MHDATADIR/fingerprint?
-load_fingerprint() {
- if [ -f "$HOST_KEY_FILE" ] ; then
- HOST_FINGERPRINT=$( \
- (FUBAR=$(mktemp -d) && export GNUPGHOME="$FUBAR" \
- && gpg --quiet --import \
- && gpg --quiet --list-keys --with-colons --with-fingerprint \
- && rm -rf "$FUBAR") <"$HOST_KEY_FILE" \
- | grep '^fpr:' | cut -d: -f10 )
- else
- HOST_FINGERPRINT=
- fi
-}