Proposed solution for #462897: unconditionally sync keys between normal gnupg
authorthijs <thijs@b513b33f-fedd-0310-b452-c3deb5f4c849>
Wed, 5 Mar 2008 16:28:31 +0000 (16:28 +0000)
committerthijs <thijs@b513b33f-fedd-0310-b452-c3deb5f4c849>
Wed, 5 Mar 2008 16:28:31 +0000 (16:28 +0000)
home and caff gnupg home on startup, to cope with changed keys.

git-svn-id: svn://svn.debian.org/pgp-tools/trunk@365 b513b33f-fedd-0310-b452-c3deb5f4c849

caff/caff
debian/changelog

index 493a349eb8c342013080876501a4cf2cc87a3359..8ebf8662479caa466944ae55b58023626e672fa2 100755 (executable)
--- 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;
                };
-       }
 }
 
 ########################
index 99d215b0a97737af6ecc2cd5849def274e2d836f..8b2c107f14749532eb395b85ae1e0cdfc2419773 100644 (file)
@@ -12,8 +12,10 @@ signing-party (0.4.14-1) unreleased; urgency=low
   * gpgparticipants: new script to create a participant list useful for
     party organisers using the Zimmermann-Sassaman key-signing protocol.
     Thanks Philippe Teuwen (Closes: #467338).
+  * caff: always update the user's key from their GnuPG home, to adequately
+    cope with changed keys (Closes: #462897).
 
- -- Thijs Kinkhorst <thijs@debian.org>  Wed, 05 Mar 2008 17:08:59 +0100
+ -- Thijs Kinkhorst <thijs@debian.org>  Wed, 05 Mar 2008 17:27:01 +0100
 
 signing-party (0.4.13-1) unstable; urgency=low