Crypt::SSLeay LWP 500 error
am 28.02.2006 20:25:44 von Roy.Sprague------_=_NextPart_001_01C63C9C.C4F8C6A0
Content-Type: text/plain;
charset="us-ascii"
Content-Transfer-Encoding: quoted-printable
I'm having trouble with LWP::useragent. I've tested the certificates
using the following command and all is good. Any ideas?
=20
C:\openssl\bin>openssl s_client -connect myserver.com:443 -cert c:\certs
\usercert.pem -key c:\certs\notacakeynopass.pem -CApath c:\certs\trusted
=20
The following is what I get with debugging enabled.
=20
Failed to get 'https://myserver.com: 500 SSL negotiation failed:
error:1406D0CB:SSL routines:GET_SERVER_HELLO:peer error no cipher
1
SSL_connect:before/connect initialization
SSL_connect:SSLv2/v3 write client hello A
SSL_connect:SSLv3 read server hello A
SSL_connect:SSLv3 read server certificate A
SSL_connect:SSLv3 read server certificate request A
SSL_connect:SSLv3 read server done A
SSL_connect:SSLv3 write client certificate A
SSL_connect:SSLv3 write client key exchange A
SSL_connect:SSLv3 write certificate verify A
SSL_connect:SSLv3 write change cipher spec A
SSL_connect:SSLv3 write finished A
SSL_connect:SSLv3 flush data
SSL3 alert read:fatal:unknown CA
SSL_connect:failed in SSLv3 read finished A
SSL_connect:before/connect initialization
SSL_connect:SSLv3 write client hello A
SSL_connect:SSLv3 read server hello A
SSL_connect:SSLv3 read server certificate A
SSL_connect:SSLv3 read server certificate request A
SSL_connect:SSLv3 read server done A
SSL_connect:SSLv3 write client certificate A
SSL_connect:SSLv3 write client key exchange A
SSL_connect:SSLv3 write certificate verify A
SSL_connect:SSLv3 write change cipher spec A
SSL_connect:SSLv3 write finished A
SSL_connect:SSLv3 flush data
SSL3 alert read:fatal:certificate unknown
SSL_connect:failed in SSLv3 read finished A
SSL_connect:before/connect initialization
SSL_connect:SSLv2 write client hello A
SSL_connect:failed in SSLv2 read server hello A
=20
The following is the script:
=20
use LWP::UserAgent;
use LWP::Protocol::https;
use Crypt::SSLeay;
=20
=20
$ENV{HTTPS_CA_DIR} =3D 'c:/certs/trusted';
=20
#$ENV{HTTPS_VERSION} =3D '3';
$ENV{HTTPS_DEBUG} =3D 1;
=20
$ENV{HTTPS_CERT_FILE} =3D 'c:\certs\usercert.pem';
$ENV{HTTPS_KEY_FILE} =3D 'c:\certs\notacakeynopass.pem';
=20
$user =3D $ARGV[0];
$password =3D $ARGV[1];
$teststr =3D $ARGV[2];
=20
my @line=3Dsplit(/,/,$teststr);
=20
$Server =3D $line[0];
=20
my $url =3D "$Server/eaiservices/svcsindex.jsp";
=20
my $ua =3D LWP::UserAgent->new();
my $req1 =3D (GET $url);
=20
my $response =3D $ua->request($req1);
=20
if ($response->is_success ne 1)
{
print "Failed to get '$url': ", $response->status_line ,"\n";
print 1;
undef $ua;
exit(1);
}
=20
Thanks for any help.
------_=_NextPart_001_01C63C9C.C4F8C6A0--