Ver Mensaje Individual
  #2651  
Antiguo 25-01-2022
tejano tejano is offline
Miembro
 
Registrado: dic 2020
Posts: 128
Reputación: 4
tejano Va por buen camino
Cita:
Empezado por skatologiko Ver Mensaje
Yo estoy probando transmitir a Vizcaya con el siguiente comando curl y me da el mismo error, tanto en el entorno real como en el de pruebas, tanto con mi certificado en .pfx (que sí que funciona en Álava y Guipúzcoa) ,como con los que colgaron de prueba en la web de Batuz (que están en p12)

Este es el comando:
curl -H "Accept-Encoding: gzip" -H "Content-Encoding: gzip" -H "Content-Type: application/octet-stream" -H "eus-bizkaia-n3-version: 1.0" -H "eus-bizkaia-n3-content-type: application/xml" -H "eus-bizkaia-n3-data: {\"con\": \"LROE\",\"apa\": \"1.1\",\"inte\": {\"nif\": \"MINIF\",\"nrs\": \"MIEMPRESA\"},\"drs\": {\"mode\": \"240\",\"ejer\": \"2021\"}}" --data-binary @z:\MP220001resumen.xml.gz --cert Z:\ticketbai\certificados\EntitateOrdezkaria_RepresentanteDeEntidad.p12 --key IZDesa2021 -v https://pruesarrerak.bizkaia.eus/N3B4000M/aurkezpena --output z:\RESP_240.gz -D cabecera.txt

Y este el error:
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
0 0 0 0 0 0 0 0 --:--:-- --:--:-- --:--:-- 0*
Trying 80.245.2.232...
* TCP_NODELAY set
* Connected to pruesarrerak.bizkaia.eus (80.245.2.232) port 443 (#0)
* could not load PEM client certificate, OpenSSL error error:0906D06C:PEM routin
es:PEM_read_bio:no start line, (no key found, wrong pass phrase, or wrong file f
ormat?)
* Curl_http_done: called premature == 0
0 0 0 0 0 0 0 0 --:--:-- --:--:-- --:--:-- 0
* Closing connection 0
curl: (58) could not load PEM client certificate, OpenSSL error error:0906D06C:P
EM routines:PEM_read_bio:no start line, (no key found, wrong pass phrase, or wro
ng file format?)


¿Qué estoy haciendo mal?
Yo lo genero de esta forma y va bien
c:\curl\bin\curl --insecure --cert-type P12 --cert c:\temp\CERTIFICADO.p12:Passwd_certificado -H "Accept-Encoding:gzip" -H "Content-Encoding:gzip" -H "Content-Type:application/octet-stream" -H "eus-bizkaia-n3-version:1.0" -H "eus-bizkaia-n3-content-type:application/xml" -H "eus-bizkaia-n3-data:{\"con\":\"LROE\",\"apa\":\"1.1\",\"inte\":{\"nif\":\"CIF_EMPRESA\",\"nrs\":\"NOMBRE_EMPRESA\"} ,\"drs\":{\"mode\":\"240\",\"ejer\":\"2022\"}}" -v "https://sarrerak.bizkaia.eus/N3B4000M/aurkezpena" --data-binary "@RUTA_FICHERO_GZ.GZ" --output c:\temp\respuesta.gz -D c:\tmp\cabecera.txt
Responder Con Cita