X-Git-Url: http://git.sthu.org/?a=blobdiff_plain;f=caff%2Fpgp-fixkey;h=d772af7926bfd2814a6908f674ff569ad3434230;hb=fd2d106f713fb17bf75f4aca2e2b21a9727b398f;hp=ca00698cda2c8a22aa1a07fa32d48f8bc9f2cc15;hpb=4717f00e481e8f8d1acf51d35dc9afdaf6012b71;p=pgp-tools.git diff --git a/caff/pgp-fixkey b/caff/pgp-fixkey index ca00698..d772af7 100755 --- a/caff/pgp-fixkey +++ b/caff/pgp-fixkey @@ -33,22 +33,21 @@ =head1 NAME -pgp-clean -- remove all non-self signatures from key +pgp-fixkey -- remove broken packets from keys =head1 SYNOPSIS =over -=item B I [I ...] +=item B I [I ...] =back =head1 DESCRIPTION -B takes a list of keyids on the command line and outputs an -ascii-armored keyring on stdout for each key with all signatures except -self-signatures stripped. Its use is to reduce the size of keys sent out after -signing (e.g. with B). +B removes broken packets from keys in the GnuPG keyring that make +GnuPG spew ugly warnings. It takes a list of keyids on the command line and +only cleans those keys. =head1 OPTIONS @@ -76,8 +75,6 @@ caff(1), gpg(1). Peter Palfrader -This manpage was written in POD by Christoph Berg . - =cut use strict; @@ -230,7 +227,7 @@ my $KEYEDIT_DELSUBKEY_PROMPT = '^\[GNUPG:\] GET_BOOL keyedit.remove.subkey'; sub usage() { - print STDERR "pgp-clean $VERSION - (c) 2004, 2005 Peter Palfrader\n"; + print STDERR "pgp-fixkey $VERSION - (c) 2004, 2005 Peter Palfrader\n"; print STDERR "Usage: $PROGRAM_NAME [ ...]\n"; exit 1; }; @@ -247,9 +244,6 @@ for my $keyid (@ARGV) { }; -################## -# export and prune -################## KEYS: for my $keyid (@KEYIDS) { # get key listing @@ -331,7 +325,7 @@ for my $keyid (@KEYIDS) { if (defined $line) { # only if we found a sig here - we never remove revocation packets for instance debug("[sigremoval] doing line $line."); my ($dummy1, $dummy2, $dummy3, $dummy4, $signer, $created, $dummy7, $dummy8, $dummy9) = split /:/, $line; - if ($signer eq ('-1' x 16)) { + if ($signer eq ('0' x 16)) { debug("[sigremoval] not interested in that sig ($signer)."); $answer = "yes"; };