[SP-pm] Soap com ssl e autenticação usando pkcs#12

eutsiv :: Geovanny Junio geovanny at eutsiv.com.br
Fri Jan 8 14:47:59 PST 2010


Olá companheiros(as), tudo bem?

Estou trabalhando em um módulo para a NFSe, mas estou com problemas no
acesso ao webservice,
segue o código:

$ENV{HTTPS_DEBUG} = 1;

# Client PKCS12 cert support
$ENV{HTTPS_PKCS12_FILE} = 'mycert.pfx';
$ENV{HTTPS_PKCS12_PASSWORD} = 'mypass'';

my $userAgent = LWP::UserAgent->new();
my $request = HTTP::Request->new(POST => '
https://bhisshomologa.pbh.gov.br/bhiss-ws/nfse?wsdl');
$request->content($message);
$request->content_type("text/xml; charset=utf-8");
my $response = $userAgent->request($request);

if($response->code == 200) {
print $response->as_string;
}
else {
print $response->error_as_HTML;
}



Mas sempre o obtenho o seguinte erro:

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 key exchange A
SSL_connect:SSLv3 read server done A
SSL_connect:SSLv3 write client key exchange A
SSL_connect:SSLv3 write change cipher spec A
SSL_connect:SSLv3 write finished A
SSL_connect:SSLv3 flush data
SSL_connect:SSLv3 read finished A
<html>
<head><title>An Error Occurred</title></head>
<body>
<h1>An Error Occurred</h1>
<p>500 SSL read timeout: </p>
</body>
</html>

Já pesquisei, alterei o tempo de timeout, mas nada. Alguém sabe o caminho
das pedras?

Desde já grato.

--
Geovanny Junio
Consultor de Tecnologia
geovanny (at) eutsiv.com.br
+55 31 9422-8885
+55 31 3393-9132
www.eutsiv.com.br

Este e-mail pode conter informação privilegiada e confidencial. Se você não
é destinatário da
mensagem, por favor apague a mensagem e comunique-nos o fato de imediato.

This e-mail contains information that may be
privileged and confidential. If you are not the intended recipient, please
delete the e-mail and notify us immediately.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.pm.org/pipermail/saopaulo-pm/attachments/20100108/36888196/attachment.html>


More information about the SaoPaulo-pm mailing list