[Pgp-tools-commit] r623 - in trunk: debian sig2dot

Guilhem Moulin guilhem-guest at moszumanska.debian.org
Thu May 15 17:17:44 UTC 2014


Author: guilhem-guest
Date: 2014-05-15 17:17:44 +0000 (Thu, 15 May 2014)
New Revision: 623

Modified:
   trunk/debian/changelog
   trunk/sig2dot/sig2dot
Log:
sig2dot: -d is relevant only on signatures and rev. certificates.

(Don't try to parse a creation date in UID lines.)  If a key was created
after the date specified with -d, it'll be ignored as it can't be signed
before its creation date.  Closes: LP #393242.

Modified: trunk/debian/changelog
===================================================================
--- trunk/debian/changelog	2014-05-15 17:17:40 UTC (rev 622)
+++ trunk/debian/changelog	2014-05-15 17:17:44 UTC (rev 623)
@@ -7,6 +7,9 @@
   * keyanalyze:
     + Import the default Debian CFLAGS defined by dpkg-buildflags, which makes
       the Buildd Log Scanner stop emitting 'W-dpkg-buildflags-missing CFLAGS'.
+  * sig2dot:
+    + Apply -d on OpenPGP signatures and revocation certificates only.
+      (LP: #393242)
 
  -- Guilhem Moulin <guilhem at guilhem.org>  Thu, 15 May 2014 15:21:02 +0200
 

Modified: trunk/sig2dot/sig2dot
===================================================================
--- trunk/sig2dot/sig2dot	2014-05-15 17:17:40 UTC (rev 622)
+++ trunk/sig2dot/sig2dot	2014-05-15 17:17:44 UTC (rev 623)
@@ -188,7 +188,7 @@
 #sig 3        9456ADE2 2004-02-07  Michael Schiansky <michael#schiansky.de>
 
                  # type                          id       date       name
-   if ($line =~ m#([\w]+)[ !\?][ \dLNPRTX]{0,8} +([^ ]+) +([^ ]+)(?: +"?([^<"]*))?#)
+   if ($line =~ m#(pub|uid|sig|rev|sub)[ !\?][ \dLNPRTX]{0,8} +([^ ]+) +([^ ]+)(?: +"?([^<"]*))?#)
 # differences:
 # " " -> "[ !\?]" (to use 'gpg --check-sigs|sig2dot.mio|springgraph|display')
 # "[ \d]" -> "[ \dLRXP]" (signature attributes)
@@ -203,8 +203,9 @@
     my $name = $4 || "";
 
     $date =~ tr/-//d;
-    if ($type eq "pub" or $renderdate eq "" or $date <= $renderdate)
-    {
+    if (grep {$type eq $_} qw/sig rev/ and $renderdate ne "" and $date > $renderdate) {
+      print STDERR "Skipping due to date: $line\n";
+    } else {
       print STDERR "Using: $line\n" unless $opt{q};
       # strip trailing whitespace more cleanly:
       $name =~ s/\s+$//g;
@@ -253,8 +254,6 @@
 	  #push (@{$revokedby{$id}},$owner);
 	}
       }
-    } else {
-      print STDERR "Skipping due to date: $line\n";
     }
   } else {
     print STDERR "Skipping due to regex: $line\n" if $line ne "";




More information about the Pgp-tools-commit mailing list