Skip Menu | will be shut down on March 1st, 2021.

This queue is for tickets about the CPAN-Checksums CPAN distribution.

Report information
The Basics
Id: 94397
Status: resolved
Priority: 0/
Queue: CPAN-Checksums

Owner: Nobody in particular
Requestors: ppisar [...]

Bug Information
Severity: (no value)
Broken in: 2.08
Fixed in: 2.09


Subject: t/00signature.t fails if can be resolved but cannot be connected to
Download (untitled) / with headers
text/plain 808b
I have different build environments, and one allows DNS resolutions but does not allow other TCP connections out of local network. In such environment, t/00signature.t fails: gpg: new configuration file `/builddir/.gnupg/gpg.conf' created gpg: WARNING: options in `/builddir/.gnupg/gpg.conf' are not yet active during t his run gpgkeys: HTTP fetch error 7: Failed to connect to port 1 1371: Network is unreachable gpg: Signature made Tue Aug 30 08:30:20 2011 CEST using DSA key ID A317C15D gpg: requesting key A317C15D from hkp server gpg: no valid OpenPGP data found. gpg: Can't check signature: public key not found ==> BAD/TAMPERED signature detected! <== t/00signature.t .. Failed 1/1 subtests Attached patch should fix it. Please consider applying it.
From 341641c72e5c102b37bdaf349cb718f086e0e9c5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Petr=20P=C3=ADsa=C5=99?= <> Date: Thu, 3 Apr 2014 09:07:29 +0200 Subject: [PATCH] Try to connect to MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit t/00signature.t fails if can be resolved, but you cannot connect to it. This patch augments the "Cannot connect to the keyserver" precheck to do real TCP connect. Signed-off-by: Petr Písař <> --- t/00signature.t | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/t/00signature.t b/t/00signature.t index c7da469..75ae6d4 100644 --- a/t/00signature.t +++ b/t/00signature.t @@ -49,7 +49,19 @@ BEGIN { } } unless ($exit_message) { - if (!eval { require Socket; Socket::inet_aton('') }) { + if (!eval { + use Socket qw(AF_INET SOCK_STREAM pack_sockaddr_in inet_aton); + my $socket; + socket($socket, AF_INET, SOCK_STREAM, 0) and + connect( + $socket, + pack_sockaddr_in( + scalar getservbyname('hkp', 'tcp'), + inet_aton('') + ) + ) and + close($socket) + }) { $exit_message = "Cannot connect to the keyserver"; } } -- 1.9.0
Thanks Petr, applied and released.

This service is sponsored and maintained by Best Practical Solutions and runs on infrastructure.

Please report any issues with to