From: Colin Watson Date: Sun, 1 Sep 2002 17:13:26 +0000 (+0000) Subject: Keysigning script, from Gergely Nagy via Martin Michlmayr. X-Git-Url: https://www.chiark.greenend.org.uk/ucgi/~cjwatson/git?a=commitdiff_plain;h=6c80b29bf7dec0dd701ad11bbdb34da2c87ac21c;p=bin.git Keysigning script, from Gergely Nagy via Martin Michlmayr. --- diff --git a/keyfoo b/keyfoo new file mode 100755 index 0000000..bed31cd --- /dev/null +++ b/keyfoo @@ -0,0 +1,122 @@ +#! /bin/sh +## keyfoo -- do something with a key, and e-mail it to its owner +## (C) 2001 Gergely Nagy +## +## Released under the terms of the GNU GPL v2. +## +## $Id: keyfoo,v 1.6 2001/06/27 14:30:43 mhp Exp $ +## Last updated: <2001/06/27 16:30:27 algernon> +## + +## some globals, initialized as empty +KF_KEY= +KF_ADDRESS= +KF_RECIPIENT= +KF_KEYID= +TEMPFILE= +KF_BODY= +KF_KEYFILE= +KF_KEYSERVER=keyring.debian.org +GPG=gpg +KF_MAIL_CMD='mutt -H "${KF_BODY}" -a "${KF_KEYFILE}"' + + + +## this one prints the usage, *wonder* +keyfoo_usage () +{ + cat < [keyserver] +EOF + exit ${1:-0} +} + +## this one LARTs the user +keyfoo_not_configured () +{ + cat <${KF_BODY} < +To: ${KF_RECIPIENT} +Subject: ${KF_SUBJECT} +Fcc: =debian/keysigning + +Hi, + +Attached to this e-mail is your signed GPG key. I've also uploaded it to +the keyserver at ${KF_KEYSERVER}. + +Cheers, +EOF + +# export the key.. +KF_KEYFILE="${TEMPFILE}.key" +$GPG --armor --export "${KF_KEY}" >"${KF_KEYFILE}" + +# ..then launch the mailer +eval ${KF_MAIL_CMD} + +rm -f "${KF_KEYFILE}" "${KF_BODY}" + +$GPG --keyserver "${KF_KEYSERVER}" --send-key "${KF_KEY}" +