Caros,
Baixei a versão v0.1 do site do projeto e estou trabalhando a partir
daí.
Tenho um certificado emitido pela certsign sem passphrase. Eu conectar
numa boa usando o browser, mas quando eu tento usar os arquivos
gerados pelo NFePHP para isso recebo um erro 403.
Tentei na linha de comando por que eu recebia o mesmo erro via PHP
(ambiente Sabayon Linux... quando eu uso Windows ele reclama do
certificado não ser válido ou algo do tipo. Erro 85 se eu não me
engano - se for realmente relevante eu posso postar aqui depois com
mais precisão).
O comando que eu usei para testar a conexão é:
curl -v -s -k --cert ../certs/publickey.pem --key ../certs/
privatekey.pem -H "Content-Type: application/soap+xml;charset=utf-8"
https://homologacao.nfe.fazenda.sp.gov.br/nfeweb/services/nfestatusservico.asmx\?WSDL
E a resposta para o comando:
* About to connect() to
homologacao.nfe.fazenda.sp.gov.br port 443
(#0)
* Trying 201.55.62.10... connected
* Connected to
homologacao.nfe.fazenda.sp.gov.br (201.55.62.10) port
443 (#0)
* found 142 certificates in /etc/ssl/certs/ca-certificates.crt
* server certificate verification SKIPPED
* common name:
homologacao.nfe.fazenda.sp.gov.br (matched)
* server certificate expiration date OK
* server certificate activation date OK
* certificate public key: RSA
* certificate version: #3
* subject: C=BR,O=ICP-Brasil,OU=Secretaria da Receita Federal do
Brasil - RFB,OU=RFB e-Servidor A1,OU=Autenticado por Imprensa Oficial
SP RFB,CN=
homologacao.nfe.fazenda.sp.gov.br
* start date: Tue, 08 Jun 2010 00:00:00 GMT
* expire date: Tue, 07 Jun 2011 23:59:59 GMT
* issuer: C=BR,O=ICP-Brasil,OU=Secretaria da Receita Federal do
Brasil - RFB,CN=AC Imprensa Oficial SP RFB G2
* compression: NULL
* cipher: ARCFOUR-128
* MAC: MD5
> GET /nfeweb/services/nfestatusservico.asmx?WSDL HTTP/1.1
> User-Agent: curl/7.20.1 (x86_64-pc-linux-gnu) libcurl/7.20.1 GnuTLS/2.8.4 zlib/1.2.5
> Host:
homologacao.nfe.fazenda.sp.gov.br
> Accept: */*
> Content-Type: application/soap+xml;charset=utf-8
>
< HTTP/1.1 403 Forbidden
< Content-Length: 1913
< Content-Type: text/html
< Server: Microsoft-IIS/6.0
< X-Powered-By:
ASP.NET
< Date: Wed, 28 Jul 2010 21:49:11 GMT
<
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "
http://www.w3.org/
TR/html4/strict.dtd">
<HTML><HEAD><TITLE>The page requires a client certificate</TITLE>
<META HTTP-EQUIV="Content-Type" Content="text/html;
charset=Windows-1252">
<STYLE type="text/css">
BODY { font: 8pt/12pt verdana }
H1 { font: 13pt/15pt verdana }
H2 { font: 8pt/12pt verdana }
A:link { color: red }
A:visited { color: maroon }
</STYLE>
</HEAD><BODY><TABLE width=500 border=0 cellspacing=10><TR><TD>
<h1>The page requires a client certificate</h1>
The page you are attempting to access requires your browser to have a
Secure Sockets Layer (SSL) client certificate that the Web server will
recognize. The client certificate is used for identifying you as a
valid user of the resource.
<hr>
<p>Please try the following:</p>
<ul>
<li>Contact the Web site administrator if you believe you should be
able to view this directory or page without a client certificate, or
to obtain a client certificate.</li>
<li>If you already have a client certificate, use your Web browser's
security features to ensure that your client certificate is installed
properly. (Some Web browsers refer
to client certificates as browser or personal certificates.)</li>
</ul>
<h2>HTTP Error 403.7 - Forbidden: SSL client certificate is
required.<br>Internet Information Services (IIS)</h2>
<hr>
<p>Technical Information (for support personnel)</p>
<ul>
<li>Go to <a href="
http://go.microsoft.com/fwlink/?
linkid=8180">Microsoft Product Support Services</a> and perform a
title search for the words <b>HTTP</b> and <b>403</b>.</li>
<li>Open <b>IIS Help</b>, which is accessible in IIS Manager
(inetmgr),
and search for topics titled <b>About Certificates</b>, <b>Using
Certificate Trust Lists</b>, <b>Enabling Client Certificates</b>, and
<b>About Custom Error Messages</b>.</li>
</ul>
</TD></TR></TABLE></BODY></HTML>
* Connection #0 to host
homologacao.nfe.fazenda.sp.gov.br left intact
* Closing connection #0
Alguma ideia do que está errado? É melhor usar o trunk ou alguma outra
tag do servidor?