-}
-
-# retrieve key from web of trust, and set owner trust to "full"
-# if key is found.
-trust_key() {
- # get the key from the key server
- if ! gpg --keyserver "$KEYSERVER" --recv-key "$keyID" ; then
- log "could not retrieve key '$keyID'"
- return 1
- fi
-
- # get key fingerprint
- fingerprint=$(get_key_fingerprint "$keyID")
-
- # attach a "non-exportable" signature to the key
- # this is required for the key to have any validity at all
- # the 'y's on stdin indicates "yes, i really want to sign"
- echo -e 'y\ny' | gpg --lsign-key --command-fd 0 "$fingerprint"
-
- # import "full" trust for fingerprint into gpg
- echo ${fingerprint}:5: | gpg --import-ownertrust
- if [ $? = 0 ] ; then
- log "owner trust updated."
- else
- failure "there was a problem changing owner trust."
- fi
-}
-
-# publish server key to keyserver
-publish_server_key() {
- read -p "really publish key to $KEYSERVER? [y|N]: " OK; OK=${OK:=N}
- if [ ${OK/y/Y} != 'Y' ] ; then
- failure "aborting."
- fi