X-Git-Url: https://git.sthu.org/?a=blobdiff_plain;f=caff%2Fcaff;h=8ebf8662479caa466944ae55b58023626e672fa2;hb=96a8e13f3407f0ca4ba776e92a0f6ab9403418fe;hp=493a349eb8c342013080876501a4cf2cc87a3359;hpb=719971216e279a15b9b925f9413e3cf64c1d6459;p=pgp-tools.git diff --git a/caff/caff b/caff/caff index 493a349..8ebf866 100755 --- a/caff/caff +++ b/caff/caff @@ -946,22 +946,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 +957,6 @@ for my $keyid (@{$CONFIG{'keyid'}}) { warn ("Could not import $keyid into caff's gnupghome.\n"); next; }; - } } ########################