X-Git-Url: https://git.sthu.org/?a=blobdiff_plain;f=caff%2Fcaff;h=440816c7251efab19c75cf09d565f89672a4441d;hb=6b7cb7ca3a817c2e0510957115a2d1f1bed5c549;hp=493a349eb8c342013080876501a4cf2cc87a3359;hpb=e9402a9526110b481df41ea0f279d9759fb34640;p=pgp-tools.git diff --git a/caff/caff b/caff/caff index 493a349..440816c 100755 --- a/caff/caff +++ b/caff/caff @@ -135,14 +135,22 @@ A list of your keys. This is used to determine which signatures to keep in the pruning step. If you select a key using B<-u> it has to be in this list. B. +=back + =head2 General settings +=over + =item B [string] Base directory for the files caff stores. Default: B<$HOME/.caff/>. +=back + =head2 GnuPG settings +=over + =item B [string] Path to the GnuPG binary. Default: B. @@ -171,8 +179,12 @@ Additional keyids to encrypt messages to. Default: none. Additional commands to pass to gpg after the "sign" command. Default: none. +=back + =head2 Keyserver settings +=over + =item B [string] Keyserver to download keys from. Default: B. @@ -186,8 +198,12 @@ Default: B<0>. A list of files containing keys to be imported. +=back + =head2 Signing settings +=over + =item B [boolean] If true, then skip the signing step. Default: B<0>. @@ -207,8 +223,12 @@ than this age. Default: B<24*60*60> (i.e. one day). 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. +=back + =head2 Mail settings +=over + =item B [boolean] Whether to send mails. This is a quad-option, with which you can set the @@ -946,22 +966,7 @@ for my $keyid (map { split /\n/ } @ARGV) { # caff "`cat txt`" is a single argume # import own keys ################# for my $keyid (@{$CONFIG{'keyid'}}) { - my $gpg = GnuPG::Interface->new(); - $gpg->call( $CONFIG{'gpg'} ); - $gpg->options->hash_init( - 'homedir' => $GNUPGHOME, - 'extra_args' => [ qw{ --no-auto-check-trustdb --trust-model=always --with-colons --fixed-list-mode --fast-list-mode } ] ); - $gpg->options->meta_interactive( 0 ); - my ($inputfd, $stdoutfd, $stderrfd, $statusfd, $handles) = make_gpg_fds(); - my $pid = $gpg->list_public_keys(handles => $handles, command_args => $keyid); - my ($stdout, $stderr, $status) = readwrite_gpg('', $inputfd, $stdoutfd, $stderrfd, $statusfd); - waitpid $pid, 0; - - if ($stdout eq '') { - warn ("No data from gpg for list-key\n"); # There should be at least 'tru:' everywhere. - }; - unless ($stdout =~ /^pub:(?:[^:]*:){3,3}$keyid:/m) { - info("Key $keyid not found in caff's home. Getting it from your normal GnuPGHome."); + info("Importing key $keyid from your normal GnuPGHome."); my $key = export_key(undef, $keyid); if (!defined $key || $key eq '') { warn ("Did not get key $keyid from your normal GnuPGHome\n"); @@ -972,7 +977,6 @@ for my $keyid (@{$CONFIG{'keyid'}}) { warn ("Could not import $keyid into caff's gnupghome.\n"); next; }; - } } ########################