texlive[50688] Master/tlpkg/TeXLive/TLCrypto.pm: work on gpg proper

commits+preining at tug.org commits+preining at tug.org
Mon Apr 1 16:29:13 CEST 2019


Revision: 50688
          http://tug.org/svn/texlive?view=revision&revision=50688
Author:   preining
Date:     2019-04-01 16:29:12 +0200 (Mon, 01 Apr 2019)
Log Message:
-----------
work on gpg proper status reporting for expired keys/sigs

Modified Paths:
--------------
    trunk/Master/tlpkg/TeXLive/TLCrypto.pm

Modified: trunk/Master/tlpkg/TeXLive/TLCrypto.pm
===================================================================
--- trunk/Master/tlpkg/TeXLive/TLCrypto.pm	2019-04-01 00:24:29 UTC (rev 50687)
+++ trunk/Master/tlpkg/TeXLive/TLCrypto.pm	2019-04-01 14:29:12 UTC (rev 50688)
@@ -501,8 +501,13 @@
   close($status_fh);
   my ($out, $ret)
     = TeXLive::TLUtils::run_cmd("$::gpg --status-file \"$status_file\" --verify $sig_quote $file_quote 2>&1");
+  # read status file
+  open($status_fd, "<", $status_file) || die("Cannot open status file: $!");
+  my @status_lines = <$status_fd>;
+  chomp(@status_lines);
   if ($ret == 0) {
     debug("verification succeeded, output:\n$out\n");
+    debug(join("\n", "STATUS OUTPUT", @status_lines));
     return (1, $out);
   } else {
     open($status_fd, "<", $status_file) || die("Cannot open status file: $!");
@@ -532,6 +537,8 @@
 our $VS_UNSIGNED = -2;
 our $VS_GPG_UNAVAILABLE = -3;
 our $VS_PUBKEY_MISSING = -4;
+our $VS_EXPKEYSIG = -5;
+our $VS_EXPSIG = -6;
 our $VS_UNKNOWN = -100;
 
 our %VerificationStatusDescription = (
@@ -542,6 +549,8 @@
   $VS_UNSIGNED         => 'unsigned',
   $VS_GPG_UNAVAILABLE  => 'gpg unavailable',
   $VS_PUBKEY_MISSING   => 'pubkey missing',
+  $VS_EXPKEYSIG        => 'valid signature with expired key',
+  $VS_EXPSIG           => 'valid but expired signature',
   $VS_UNKNOWN          => 'unknown',
 );
 



More information about the tex-live-commits mailing list