CAFF(1)

πŸ’– CAFF β€” the manual page, but make it make sense πŸ’–

okay bestie, welcome to CAFF(1) πŸ’… it's part of the User Contributed Perl Documentation, and it is genuinely one of the most useful little gremlins in the signing-party toolbox. sit down, hydrate, let's go 🫢


✨ NAME ✨

caff β€” CA - Fire and Forget πŸ”₯

yes that's the whole name. yes it's dramatic. it earned it.


✨ SYNOPSIS ✨

caff [-eERS] [-m yes|ask-yes|ask-no|no] [-u yourkeyid] keyid [keyid ..]
caff [-eERS] [-m yes|ask-yes|ask-no|no] [-u yourkeyid] [keyid ..]
</path/to/ksp-annotated.txt

so you either hand it a list of keyids on the command line, or you pipe it a ksp-annotated.txt file through stdin 🌸 and the third line there is literally the stdin redirect, it's not a typo, it's just how the manpage shows it.


✨ DESCRIPTION ✨

CA Fire and Forget is a script that helps you in keysigning πŸ‘‘ it takes a list of keyids on the command line, fetches them from a keyserver, and calls GnuPG so that you can sign it. then it mails each key to all its email addresses β€” and here's the iconic part β€” only including the one UID that we send to in each mail, pruned from all but self sigs and sigs done by you. no cap, that's the whole move. and the mailed key is encrypted with itself as a means to verify that key belongs to the recipient πŸ” so the recipient is basically the only one who can open it. chef's kiss.

the list of keys to sign can also be provided through caff's standard input, as gpgparticipants(1) formatted content πŸŽ€ only keys for which both the "Fingerprint OK" and "ID OK" boxes are ticked (i.e., marked with an "x") are considered for signing. furthermore, the input header must include at least one checksum line, and all checksum boxes must be marked as verified (with an "x"). no x, no vibe, no signing πŸ’€


✨ OPTIONS ✨

  • -e, --export-old β€” export old signatures. default is to ask the user for each old signature πŸ™ˆ
  • -E, --no-export-old β€” do not export old signatures. default is to ask the user for each old signature πŸ™ˆ
  • -m, --mail yes|ask-yes|ask-no|no β€” whether to send mail after signing. default is to ask, for each uid, with a default value of yes πŸ’Œ
  • -R, --no-download β€” do not retrieve the key to be signed from a keyserver 🚫
  • -S, --no-sign β€” do not sign the keys βœ‹
  • -u yourkeyid, --local-user yourkeyid β€” select the key that is used for signing, in case you have more than one key πŸ”‘ to sign with multiple keys at once, separate multiple keyids by comma. this option requires the key(s) to be defined through the keyid variable in the configuration file πŸ‘€
  • --key-file file β€” import keys from file. can be supplied more than once πŸ“‚
  • --keys-from-gnupg β€” try to import keys from your standard GnuPG keyrings πŸ”
  • --debug β€” enable debug messages πŸ›

✨ ENVIRONMENT ✨

  • HOME β€” the default home directory 🏠
  • GNUPGBIN β€” the gpg binary. default: "gpg" πŸ”§
  • GNUPGHOME β€” the default working directory for gpg. default: "$HOME/.gnupg" πŸ“

✨ FILES ✨

  • $HOME/.caffrc β€” configuration file
  • $HOME/.caff/keys/yyyy-mm-dd/ β€” processed keys
  • $HOME/.caff/gnupghome/ β€” caff's working directory for gpg
  • $HOME/.caff/gnupghome/gpg.conf β€” gpg configuration (see NOTES below) β€” useful options include use-agent, keyserver, keyserver-options, default-cert-level, etc. ✨

✨ CONFIGURATION FILE OPTIONS ✨

bestie. the configuration file is a perl script that sets values in the hash %CONFIG πŸͺ and fun fact: the file is generated when it does not exist. it just appears. main character energy fr fr.

Example:

$CONFIG{'owner'} = q{Peter Palfrader};
$CONFIG{'email'} = q{peter@palfrader.org};
$CONFIG{'keyid'} = [ qw{DE7AAF6E94C09C7F 62AF4031C82E0039} ];

🌸 Required basic settings 🌸

  • owner [string] β€” your name. REQUIRED. ⚠️
  • email [string] β€” your email address, used in From: lines. REQUIRED. ⚠️
  • keyid [list of keyids] β€” a list of your keys. this is used to determine which signatures to keep in the pruning step. if you select a key using -u it has to be in this list. REQUIRED. ⚠️

🌸 General settings 🌸

  • caffhome [string] β€” base directory for the files caff stores. default: $HOME/.caff/. πŸ“
  • colors [hash] β€” how to color output messages. see the "Term::ANSIColor" documentation for the list of supported colors; colored output can be disabled by setting this option to an empty hash {}. πŸ’… default:
{ error => 'bold bright_red'
, warn => 'bright_red'
, notice => 'bold'
, info => ''
, success => 'green' # used in combination with 'notice' and 'info'
, fail => 'yellow'   # used in combination with 'notice' and 'info'
}

🌸 GnuPG settings 🌸

  • gpg [string] β€” path to the GnuPG binary. default: the value of the GNUPGBIN environment variable if set, otherwise "gpg".
  • secret-keyring [string] β€” path to your secret keyring (GnuPG < 2.1), or to the GnuPGHOME of the agent managing the secret key material (GnuPG >= 2.1). default: $HOME/.gnupg/secring.gpg. if the value is not a directory with GnuPG >= 2.1, the parent directory (i.e., $HOME/.gnupg by default) is considered instead. πŸ€”
  • also-encrypt-to [keyid, or list of keyids] β€” additional keyids to encrypt messages to. default: none.
  • gpg-sign-type [string] β€” the prefix to the "sign" command used to make the signature from gpg's shell πŸ–ŠοΈ can be set to a mix of "l" (local), "nr" (non-revocable) or "t" (trust) to make a signature of the given type. see gpg(1) for details. default: "" (i.e., make a regular, exportable, signature).
  • gpg-sign-args [string] β€” additional commands to pass to gpg after the "sign" command. default: none.

🌸 Key import settings 🌸

  • no-download [boolean] β€” if true, then skip the step of fetching keys from the keyserver. default: 0.
  • key-files [list of files] β€” a list of files containing keys to be imported. πŸ“‚

🌸 Signing settings 🌸

  • no-sign [boolean] β€” if true, then skip the signing step. default: 0.
  • ask-sign [boolean] β€” if true, then pause before continuing to the signing step. this is useful for offline signing ✈️ default: 0.
  • export-sig-age [seconds] β€” don't export UIDs by default, on which your latest signature is older than this age. default: 24*60*60 (i.e. one day). ⏳
  • local-user [keyid, or list of keyids] β€” select the key that is used for signing, in case you have more than one key. with multiple keyids, sign with each key in turn. πŸ”‘
  • also-lsign-in-gnupghome [auto|ask|no] β€” whether to locally sign the UIDs in the user's GnuPGHOME, in addition to caff's signatures in its own GnuPGHOME. such signatures are not exportable. this can be useful when the recipient forgets to upload the signatures caff sent (or if they are non-exportable as well), as it gives a way to keep track of which UIDs were verified. however, note that local signatures will not be deleted once the recipient does the upload and the signer refreshes her keyring. 😬

if the value is not no and if gpg-sign-type contains "l", each (local) signature is merely exported from caff's own GnuPGHOME to the user's. otherwise, if the value is auto, each UID signed in caff's own GnuPGHOME gets automatically locally signed in the user's, using the same certification level; this requires a working gpg-agent(1). if ask, the user is prompted for which UIDs to locally sign. default: no.

  • show-photos [boolean] β€” if true, then before signing a key gpg will display the photos attached to it, if any πŸ–ΌοΈ (the photo viewer can be specified with a "photo-viewer" option in caff's GnuPGHOME.) default: 0.

🌸 Mail settings 🌸

  • mail [yes|ask-yes|ask-no|no] β€” whether to send mails. this is a quad-option, with which you can set the behaviour: yes always sends, no never sends; ask-yes and ask-no asks, for each uid, with according defaults for the question. default: ask-yes. πŸ’Œ

in any case, the messages are also written to $CONFIG{'caffhome'}/keys/ πŸ“

  • mail-cant-encrypt [yes|ask-yes|ask-no|no] β€” the value of this option is considered instead of that of mail for recipient keys without encryption capability. default to the value of mail. πŸ”“
  • mail-subject [string] β€” sets the value of the "Subject:" header field. %k will be expanded to the long key ID of the signed key. default: "Your signed PGP key 0x%k". βœ‰οΈ
  • mail-template [string] β€” email template which is used as the body text for the email sent out instead of the default text if specified. the following perl variables can be used in the template:
    • {owner} [string] β€” your name as specified in the owner setting.
    • {key} [string] β€” the keyid of the key you signed.
    • {@uids} [array] β€” the UIDs for which signatures are included in the mail.

note that you should probably customize the template if you intend to send non-exportable signatures (i.e., if gpg-sign-type contains "l"), as uploading such signatures doesn't make sense, and they require the import option "import-local-sigs" which isn't set by default. 🚨

  • reply-to [string] β€” add a Reply-To: header to messages sent. default: none.
  • bcc [string] β€” address to send blind carbon copies to when sending mail. default: none. πŸ™ˆ
  • mailer-send [array] β€” parameters to pass to Mail::Mailer. default: none. setting this option is strongly discouraged: fix your local MTA instead. πŸ’€

this could for example be

$CONFIG{'mailer-send'} =  [ 'smtp', Server => 'mail.server', Auth => ['user', 'pass'] ];

to use the perl SMTP client, or

$CONFIG{'mailer-send'} =  [ 'sendmail', '-f', $CONFIG{'email'}, '-it' ];

to pass arguments to the sendmail program. to specify a sendmail binary you can set the "PERL_MAILERS" environment variable as follows:

$ENV{'PERL_MAILERS'} = 'sendmail:/path/to/sendmail_compatible_mta';

for more information see Mail::Mailer(3pm). πŸ“š


✨ NOTES ✨

like we said up top, caff uses its own GnuPGHOME and GnuPG configuration file. in fact it only needs its own keyring for the signing work, but it would be unsafe to reuse the same GnuPG configuration file, because the user could have set an option in $HOME/.gnupg/gpg.conf which would break caff. 🚩

therefore the GnuPG options that are intended to be used with caff, such as "keyserver" or "cert-digest-algo", need to be placed in $HOME/.caff/gnupghome/gpg.conf instead. if this file does not exist, the GnuPG options found in $HOME/.gnupg/gpg.conf that are known to be safe (and useful) for caff, are passed to gpg(1) as command-line options. 🫢


✨ AUTHORS ✨

  • Peter Palfrader <peter@palfrader.org>
  • Christoph Berg <cb@df7cb.de>
  • Guilhem Moulin <guilhem@debian.org>

three icons, one script πŸ‘‘


✨ SEE ALSO ✨

gpg(1), pgp-clean(1), /usr/share/doc/signing-party/caff/ πŸ“–


and that's the whole page bestie πŸ’– this one ships with perl v5.40.1, dated 2026-02-09, and it's living in the User Contributed Perl Documentation corner of your system. go sign some keys, you absolute legend πŸŒˆβœ¨πŸŽ€

πŸ“¦ where this page comes from