From 2a47f1609af85b9a4fd362af9ec65c42e621a6a4 Mon Sep 17 00:00:00 2001 From: myon Date: Mon, 25 Jun 2007 09:18:41 +0000 Subject: [PATCH] r4496@hubble: cbe | 2007-06-25 11:06:37 +0200 * Allow spaces in keyids/fingerprints for easier cut-and-paste. git-svn-id: svn://svn.debian.org/pgp-tools/trunk@330 b513b33f-fedd-0310-b452-c3deb5f4c849 --- caff/README.many-keys | 24 +++++++++++------------- caff/README.v3-keys | 8 ++++---- caff/caff | 3 ++- 3 files changed, 17 insertions(+), 18 deletions(-) diff --git a/caff/README.many-keys b/caff/README.many-keys index 1fe8eb1..6e46bc4 100644 --- a/caff/README.many-keys +++ b/caff/README.many-keys @@ -11,10 +11,12 @@ Some hints to get the signing done faster: caff and gpg allow you to specify the full fingerprint. This will save you from having to check the fingerprint yourself. If you have a text file with - all fingerprints (with all the spaces stripped from them), use that and then - run + all fingerprints, use that and then run - $ caff `cat ksp-fingerprints.txt` + $ caff "`cat ksp-fingerprints.txt`" + + For convenience, caff also allows spaces in fingerprints/keyids as output by + gpg --fingerprint. (Remember to properly quote arguments as shown above.) * v3 keys are evil. @@ -35,17 +37,13 @@ Some hints to get the signing done faster: Going through retrieving, signing, and mailing keys can help, e.g.: - $ caff --no-sign --no-export-old --no-mail `cat ksp-fingerprints.txt` - $ caff --no-download --no-export-old --no-mail `cat ksp-fingerprints.txt` - $ caff --no-download --no-sign --no-export-old `cat ksp-fingerprints.txt` - -* If you have multiple local keys, only send mail once after signing with all. + $ caff --no-sign --no-export-old --no-mail "`cat ksp-fingerprints.txt`" + $ caff --no-download --no-export-old --no-mail "`cat ksp-fingerprints.txt`" + $ caff --no-download --no-sign --no-export-old "`cat ksp-fingerprints.txt`" - caff will send out all previously done signatures in the message. (Of course - you have to configure $CONFIG{'keyid'} to contain all your key ids.) +* If you have multiple local keys, use -u ,. - $ caff --no-export-old --no-mail -u - $ caff --no-download --no-export-old -u + $ caff -u , * Use gpg-agent. @@ -61,4 +59,4 @@ Some hints to get the signing done faster: prompt any more; you will have *not* to send out some mails. (And you have unwanted signatures lingering around in ~/.caff/gnupghome/pubring.gpg.) - -- Christoph Berg Wed, 6 Jul 2005 13:46:16 +0200 + -- Christoph Berg Mon, 25 Jun 2007 10:55:40 +0200 diff --git a/caff/README.v3-keys b/caff/README.v3-keys index 0b22a96..c1ac836 100644 --- a/caff/README.v3-keys +++ b/caff/README.v3-keys @@ -1,10 +1,10 @@ v3 keys are evil ---------------- -The good thing about v4 keys is that the fingerprint ends contains the 8 byte -(16 char) key id at the and and that the 8 byte key id likewise ends in the 4 -byte key id. For v3 keys it does not. This, and some issues with HKP key -servers make the handling of v3 a PITA. +The good thing about v4 keys is that the last 16 chars of the fingerprint are +the same as the 8 byte keyid, and likewise the last 8 chars are the 4 byte +keyid. For v3 keys that is not true. This, and some issues with HKP key servers +make the handling of v3 a PITA. To sign v3 keys with caff, do the following: diff --git a/caff/caff b/caff/caff index 8ec09e3..ae922cd 100755 --- a/caff/caff +++ b/caff/caff @@ -909,8 +909,9 @@ $CONFIG{'mail'} = $params->{'mail'} if defined $params->{'mail'}; $CONFIG{'no-sign'} = $params->{'no-sign'} if defined $params->{'no-sign'}; push @{$CONFIG{'key-files'}}, @{$params->{'key-files'}} if defined $params->{'key-files'}; -for my $keyid (@ARGV) { +for my $keyid (map { split /\n/ } @ARGV) { # caff "`cat txt`" is a single argument $keyid =~ s/^0x//i; + $keyid =~ s/ //g; # gpg --fingerprint includes spaces if ($keyid =~ /^[A-F0-9]{32}$/i) { info("Ignoring v3 fingerprint $keyid. v3 keys are obsolete."); next; -- 2.39.5