Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Perl script error "500 SSL negotiation failed"

Status
Not open for further replies.

esystems

Technical User
May 10, 2016
1
US
Very new to perl and got handed something to figure out and not having any luck.
The script should be connecting via TLS1.2 to a URL with an action. But I'm getting negotiation failures.

#!/usr/bin/perl -w
use Net::HTTPS;
use LWP::UserAgent;
use Crypt::SSLeay;
# Normally remarked out:
use LWP::Debug qw(+);
# Normally remrked out:
$ENV{HTTPS_DEBUG} = 1;
my ($INFILE, $srequest) = @ARGV;
my ($ACTION_TYPE) = @ARGV[1];
my ($SOAP_ACTION) = @ARGV[2];
$|=1;
my $XMLROOT = "/X/api/";
my $FAILLOG = "/X/log/failure.log";
my $TARGET = "chdir($XMLROOT);
my $SUBJECT = "X API";
process($INFILE);
exit(1);

returns:
LWP::protocol::http::request: ()
SSL_connect:before/connect initialization
SSL_connect:SSLv2/v3 write client hello A
SSL3 alert read:fatal:handshake failure
SSL_connect:error in SSLv2/v3 read server hello A
SSL_connect:before/connect initialization
SSL_connect:SSLv3 write client hello A
SSL3 alert read:fatal:handshake failure
SSL_connect:failed in SSLv3 read server hello A
SSL_connect:before/connect initialization
SSL_connect:SSLv2 write client hello A
SSL_connect:error in SSLv2 read server hello A
LWP::UserAgent::request: Simple response: Internal Server Error

If I test openssl:

openssl s_client -connect url.com:443 -tls1_2
CONNECTED(00000003)
depth=1 C = US, O = GeoTrust Inc., CN = RapidSSL SHA256 CA - G3

Certificate chain
0 s:/CN=*.url.com
i:/C=US/O=GeoTrust Inc./CN=RapidSSL SHA256 CA - G3
1 s:/C=US/O=GeoTrust Inc./CN=RapidSSL SHA256 CA - G3
i:/C=US/O=GeoTrust Inc./CN=GeoTrust Global CA
---
Server certificate
-----BEGIN CERTIFICATE-----
MIIERTCCAy2gAwIBAgIDCdWCMA0GCSqGSIb3DQEBCwUAMEcxCzAJBgNVBAYTAlVT
MRYwFAYDVQQKEw1HZW9UcnVzdCBJbmMuMSAwHgYDVQQDExdSYXBpZFNTTCBTSEEy
NTYgQ0EgLSBHMzAeFw0xNjAxMjUxNjUxMThaFw0xOTAyMjYwNDUyMDVaMB8xHTA
~
SSL-Session:
Protocol : TLSv1.2

Appreciate any assistance.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top