]> git.sthu.org Git - pgp-tools.git/commitdiff
clean up keyid detection
authormyon <myon@b513b33f-fedd-0310-b452-c3deb5f4c849>
Wed, 16 Aug 2006 16:24:41 +0000 (16:24 +0000)
committermyon <myon@b513b33f-fedd-0310-b452-c3deb5f4c849>
Wed, 16 Aug 2006 16:24:41 +0000 (16:24 +0000)
git-svn-id: svn://svn.debian.org/pgp-tools/trunk@297 b513b33f-fedd-0310-b452-c3deb5f4c849

caff/caff

index 8415af93cd7f2b9c083c666412278538c2172c0c..799485865463966fa9e61c6690137b26c769dfdd 100755 (executable)
--- a/caff/caff
+++ b/caff/caff
@@ -908,11 +908,11 @@ push @{$CONFIG{'key-files'}}, @{$params->{'key-files'}} if defined $params->{'ke
 
 for my $keyid (@ARGV) {
        $keyid =~ s/^0x//i;
-       unless ($keyid =~ /^([A-F0-9]{8}|[A-F0-9]{16}||[A-F0-9]{40})$/i) {
-               if ($keyid =~ /^[A-F0-9]{32}$/) {
-                       info("Ignoring v3 fingerprint $keyid.  v3 keys are obsolete.");
-                       next;
-               };
+       if ($keyid =~ /^[A-F0-9]{32}$/i) {
+               info("Ignoring v3 fingerprint $keyid.  v3 keys are obsolete.");
+               next;
+       };
+       if ($keyid !~ /^([A-F0-9]{8}|[A-F0-9]{16}|[A-F0-9]{40})$/i) {
                print STDERR "$keyid is not a keyid.\n";
                usage(\*STDERR, 1);
        };