summaryrefslogtreecommitdiff
path: root/Master/tlpkg/TeXLive/TLCrypto.pm
diff options
context:
space:
mode:
authorNorbert Preining <preining@logic.at>2019-04-01 14:29:12 +0000
committerNorbert Preining <preining@logic.at>2019-04-01 14:29:12 +0000
commiteebef95a5554e49afdfa9d805d66624b3a47a5b1 (patch)
treef85f5ae2b3d10e7c743d60d02aaa0a14b5e0651b /Master/tlpkg/TeXLive/TLCrypto.pm
parent28671a888d50fc12d00462a304180af411e2acef (diff)
work on gpg proper status reporting for expired keys/sigs
git-svn-id: svn://tug.org/texlive/trunk@50688 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/tlpkg/TeXLive/TLCrypto.pm')
-rw-r--r--Master/tlpkg/TeXLive/TLCrypto.pm9
1 files changed, 9 insertions, 0 deletions
diff --git a/Master/tlpkg/TeXLive/TLCrypto.pm b/Master/tlpkg/TeXLive/TLCrypto.pm
index 66da491b5dc..fd52cc247cf 100644
--- a/Master/tlpkg/TeXLive/TLCrypto.pm
+++ b/Master/tlpkg/TeXLive/TLCrypto.pm
@@ -501,8 +501,13 @@ sub gpg_verify_signature {
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_CONNECTION_ERROR = -1;
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 @@ our %VerificationStatusDescription = (
$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',
);