summaryrefslogtreecommitdiff
path: root/Master/tlpkg/TeXLive
diff options
context:
space:
mode:
authorNorbert Preining <preining@logic.at>2020-03-04 01:25:36 +0000
committerNorbert Preining <preining@logic.at>2020-03-04 01:25:36 +0000
commite52f76c1afb168546e559391af10d93b1e8f9721 (patch)
tree5cd317b1f32bfd3294192600a1a9b3b16c6d5b87 /Master/tlpkg/TeXLive
parent69769d9dfb646676183a523a92cb6be05514257f (diff)
fix uninitialize variable warning when pubkey is missing
git-svn-id: svn://tug.org/texlive/trunk@54064 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/tlpkg/TeXLive')
-rw-r--r--Master/tlpkg/TeXLive/TLCrypto.pm9
1 files changed, 6 insertions, 3 deletions
diff --git a/Master/tlpkg/TeXLive/TLCrypto.pm b/Master/tlpkg/TeXLive/TLCrypto.pm
index 4554da030a9..76511df521e 100644
--- a/Master/tlpkg/TeXLive/TLCrypto.pm
+++ b/Master/tlpkg/TeXLive/TLCrypto.pm
@@ -595,9 +595,12 @@ sub gpg_verify_signature {
debug("verification succeeded, output:\n$out\n");
return ($VS_VERIFIED, $out);
} else {
- if (grep(/^\[GNUPG:\] NO_PUBKEY (.*)/, @status_lines)) {
- debug("missing pubkey $1\n");
- return ($VS_PUBKEY_MISSING, "missing pubkey $1");
+ my @nopb = grep(/^\[GNUPG:\] NO_PUBKEY /, @status_lines);
+ if (@nopb) {
+ my $mpk = $nopb[-1];
+ $mpk =~ s/^\[GNUPG:\] NO_PUBKEY //;
+ debug("missing pubkey $mpk\n");
+ return ($VS_PUBKEY_MISSING, "missing pubkey $mpk");
}
# we could do more checks on what is the actual problem here!
return ($VS_SIGNATURE_ERROR, $out);