Anonymous Monk has asked for the wisdom of the Perl Monks concerning the following question:

I have this piece of code to access web service:

use strict; use warnings; use SOAP::Lite +trace => qw(all); my $lite = new SOAP::Lite(uri => 'http://org.jboss.ws/samples/rpcstyle +', proxy => 'https://it.abc.com:8443/jbossws-samples-rpcstyle?wsdl'); print $lite->getKey()->result;

And got this trace, please help, it sounded to me like a problem on the client side (what should I do to resolve this no cipher problem. I do have private and public key generated on the server side, but no idea what to do on the perl side):

SOAP::Transport::new: () SOAP::Serializer::new: () SOAP::Deserializer::new: () SOAP::Parser::new: () SOAP::Lite::new: () SOAP::Transport::HTTP::Client::new: () SOAP::Lite::call: () SOAP::Serializer::envelope: () SOAP::Serializer::envelope: getKey SOAP::Data::new: () SOAP::Data::new: () SOAP::Data::new: () SOAP::Data::new: () SOAP::Transport::HTTP::Client::send_receive: HTTP::Request=HASH(0x1b98 +73c) SOAP::Transport::HTTP::Client::send_receive: POST https://it.abc.com:8 +443/ jbossws-samples-rpcstyle?wsdl Accept: text/xml Accept: multipart/* Content-Length: 462 Content-Type: text/xml; charset=utf-8 SOAPAction: "http://org.jboss.ws/samples/rpcstyle#getKey" <?xml version="1.0" encoding="UTF-8"?><SOAP-ENV:Envelope xmlns:xsi="ht +tp://www.w 3.org/1999/XMLSchema-instance" xmlns:SOAP-ENC="http://schemas.xmlsoap. +org/soap/e ncoding/" xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" x +mlns:xsd=" http://www.w3.org/1999/XMLSchema" SOAP-ENV:encodingStyle="http://schem +as.xmlsoap .org/soap/encoding/"><SOAP-ENV:Body><namesp1:getKey xmlns:namesp1="htt +p://org.jb oss.ws/samples/rpcstyle"/></SOAP-ENV:Body></SOAP-ENV:Envelope> SOAP::Transport::HTTP::Client::send_receive: HTTP::Response=HASH(0x1ca +8e70) SOAP::Transport::HTTP::Client::send_receive: 500 (Internal Server Erro +r) SSL neg otiation failed: error:1406D0CB:SSL routines:GET_SERVER_HELLO:peer err +or no ciph er Content-Type: text/plain Client-Date: Fri, 08 Sep 2006 01:26:21 GMT Client-Warning: Internal response 500 SSL negotiation failed: error:1406D0CB:SSL routines:GET_SERVER_HEL +LO:peer er ror no cipher SOAP::Deserializer::deserialize: () SOAP::Parser::decode: () 500 SSL negotiation failed: error:1406D0CB:SSL routines:GET_SERVER_HEL +LO:peer er ror no cipher at d.pl line 9 SOAP::Lite::DESTROY: () SOAP::Deserializer::DESTROY: () SOAP::Serializer::DESTROY: () SOAP::Data::DESTROY: () SOAP::Data::DESTROY: () SOAP::Data::DESTROY: () SOAP::Data::DESTROY: () SOAP::Transport::DESTROY: () SOAP::Transport::HTTP::Client::DESTROY: () SOAP::Parser::DESTROY: ()

Replies are listed 'Best First'.
Re: SSL negotiation no cipher problem
by greatshots (Pilgrim) on Sep 08, 2006 at 02:37 UTC
    This problem is nothing to do with your SOAP modules.

    did you check the ssl certification ?

    openssl s_client -connect myserver.com:443 -cert c:\certs \usercert.pem -key c:\certs\notacakeynopass.pem -CApath c:\certs\trust +ed
    use the above to see the SSL certification with debug enabled.

      Okay. I used openssl to create those files:

      src\perl> \openssl\bin\openssl req -config \openssl\bin\openssl.cnf -n +ew -days 365 -newkey rsa:1024 -x509 -keyout notacakey.pem -out notaca +cert.pem src\perl> \openssl\bin\openssl rsa -in notacakey.pem -out notacakeynop +ass.pem

      And in my perl program added:

      $ENV{HTTPS_CERT_FILE} = 'notacacert.pem'; $ENV{HTTPS_KEY_FILE} = 'notacakeynopass.pem';

      The error still is still there, what do I missing?

Re: SSL negotiation no cipher problem
by jdtoronto (Prior) on Sep 08, 2006 at 05:32 UTC
    I have seen these erorrs, but not in the context you are talking about.

    Check that Crypt::SSLeay is properly installed.

    I think you may also need to specify the ful path to the certificate files in your environment rather than just the file name.

    jdtoronto