From 31ccd24dea07e71686a98110919371de80ed0dc0 Mon Sep 17 00:00:00 2001 From: Norbert Preining Date: Mon, 1 Apr 2019 15:01:10 +0000 Subject: gpg sigs: also recognize sigs of revoked keys git-svn-id: svn://tug.org/texlive/trunk@50692 c570f23f-e606-0410-a88d-b1316a301751 --- Master/tlpkg/TeXLive/TLCrypto.pm | 18 ++++++++++++++---- 1 file changed, 14 insertions(+), 4 deletions(-) (limited to 'Master/tlpkg/TeXLive/TLCrypto.pm') diff --git a/Master/tlpkg/TeXLive/TLCrypto.pm b/Master/tlpkg/TeXLive/TLCrypto.pm index ed6dff345c2..ecd949b4b2e 100644 --- a/Master/tlpkg/TeXLive/TLCrypto.pm +++ b/Master/tlpkg/TeXLive/TLCrypto.pm @@ -57,13 +57,13 @@ BEGIN { %VerificationStatusDescription $VS_VERIFIED $VS_CHECKSUM_ERROR $VS_SIGNATURE_ERROR $VS_CONNECTION_ERROR $VS_UNSIGNED $VS_GPG_UNAVAILABLE $VS_PUBKEY_MISSING $VS_UNKNOWN - $VS_EXPKEYSIG + $VS_EXPKEYSIG $VS_REVKEYSIG ); @EXPORT = qw( %VerificationStatusDescription $VS_VERIFIED $VS_CHECKSUM_ERROR $VS_SIGNATURE_ERROR $VS_CONNECTION_ERROR $VS_UNSIGNED $VS_GPG_UNAVAILABLE $VS_PUBKEY_MISSING $VS_UNKNOWN - $VS_EXPKEYSIG + $VS_EXPKEYSIG $VS_REVKEYSIG ); } @@ -234,8 +234,10 @@ C<$VS_CONNECTION_ERROR> on connection error, C<$VS_UNSIGNED> on missing signature file, C<$VS_GPG_UNAVAILABLE> if no gpg program is available, C<$VS_PUBKEY_MISSING> if the pubkey is not available, -C<$VS_CHECKSUM_ERROR> on checksum errors,and -C<$VS_SIGNATURE_ERROR> on signature errors. +C<$VS_CHECKSUM_ERROR> on checksum errors, +C<$VS_EXPKEYSIG> if the signature is good but was made with an expired key, +C<$VS_REVKEYSIG> if the signature is good but was made with a revoked key, +and C<$VS_SIGNATURE_ERROR> on signature errors. In case of errors returns an informal message as second argument. =cut @@ -414,6 +416,8 @@ gpg signature in C<$url.asc>. Returns $VS_VERIFIED on success, +$VS_REVKEYSIG on good signature but from revoked key, +$VS_EXPKEYSIG on good signature but from expired key, $VS_UNSIGNED on missing signature file, $VS_SIGNATURE_ERROR on signature error, $VS_GPG_UNAVAILABLE if no gpg is available, and @@ -460,6 +464,8 @@ sub verify_signature { return($VS_PUBKEY_MISSING, $out); } elsif ($ret == $VS_EXPKEYSIG) { return($VS_EXPKEYSIG, $out); + } elsif ($ret == $VS_REVKEYSIG) { + return($VS_REVKEYSIG, $out); } else { return($VS_SIGNATURE_ERROR, <