kmowens has asked for the wisdom of the Perl Monks concerning the following question:
I have a Java server that accepts SSL connections over a particular socket (using 9008 and 443) from a browser and exchanges data with no problems.
I have a Perl client that will connect to a web server using HTTPS with no problems.
The Java server is a middle-tier that needs to accept SSL connections from Perl scripts, but the Perl side fails during
IO::Socket::SSL->new(PeerAddr => 'xxx.xxx.xxx.xx:9008',
Proto => 'tcp',
SSL_use_cert => 0,
SSL_verify_mode => 0,
Timeout => 5
);
With debug on I get this not very informative answer
IO::Socket::INET configuration failed at ./test1.pl line 37.
Does anyone have a clue where I might start on solving this issue?
Start with something closer to the example in the docs.
use IO::Socket::SSL qw(debug4);
my $client = new IO::Socket::SSL("xxx.xxx.xxx.xxx:9008");
if (defined $client) {
print $client "GET / HTTP/1.0\r\n\r\n";
print <$client>;
close $client;
} else {
warn "I encountered a problem: ",
IO::Socket::SSL::errstr();
}