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:ebug 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:rotocol::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.
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:ebug 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:rotocol::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.