cURL / Mailing Lists / curl-and-php / Single Mail

curl-and-php

Re: cURL error 58 - private key

From: Daniel Stenberg <daniel_at_haxx.se>
Date: Tue, 8 Mar 2011 13:13:46 +0100 (CET)

On Tue, 8 Mar 2011, Supporto Tecnico eMax wrote:

> We must to connect on his webService using php-libCurl using SSH and

HTTPS I assume you meant there.

> certificate ( <https://weg.rm.enel.it/axis/rpcEdi.do/urn:SoapEdi?wsdl>
> https://weg.rm.enel.it/axis/rpcEdi.do/urn:SoapEdi?wsdl ).
>
> We can't have private key

Then I doubt you have a client certificate at all. Are you sure you should use
that? If so, then you're in a "funny" position...

> https://weg.rm.enel.it/axis/rpcEdi.do/urn:SoapEdi?wsdl - HTTP ERROR: cURL
> ERROR: 58: unable to set private key file: 'C:\Program Files
> (x86)\xampp\htdocs\e-Max\WS\eMax2.key' type PEM

Right, it seems you're trying to use a client certificate and private key, but
the passphrase you (don't) provide doesn't work.

> At this moment I realized that the problem is using CURLOPT_SSL_*; for this
> reason I change on class
>
> $this->setCurlOption(CURLOPT_SSL_VERIFYPEER, 0);
> $this->setCurlOption(CURLOPT_SSL_VERIFYHOST, 0);

Those options are for how you (don't) verify the server's certificate, they
have virtually nothing to do with client certificates which is where you have
your problem.

-- 
  / daniel.haxx.se
_______________________________________________
http://cool.haxx.se/cgi-bin/mailman/listinfo/curl-and-php
Received on 2011-03-08