From eebef95a5554e49afdfa9d805d66624b3a47a5b1 Mon Sep 17 00:00:00 2001 From: Norbert Preining Date: Mon, 1 Apr 2019 14:29:12 +0000 Subject: work on gpg proper status reporting for expired keys/sigs git-svn-id: svn://tug.org/texlive/trunk@50688 c570f23f-e606-0410-a88d-b1316a301751 --- Master/tlpkg/TeXLive/TLCrypto.pm | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'Master/tlpkg/TeXLive') 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', ); -- cgit v1.2.3