curl-and-php
RE: Error 58 unable to set private key file
Date: Fri, 15 Dec 2006 10:16:00 +0100
Daniel,
Let me step back a little.
Curl v.s LibCurl.
Because we got problems with this particular connection (we use others
that work fine).
We found that not Curl is the issue but libcurl is.
If entering on the command line all the Curl commands it works ok.
Example
curl --sslv3 --cert (pemfile) --cacert (cafile)
However doing this in PHP with LibCurl we get this error 58.
The passphrase is set in the pem file. Are there restrictions using
libcurl that might cause this error?
Willem Blok
-----Oorspronkelijk bericht-----
Van: curl-and-php-bounces_at_cool.haxx.se
[mailto:curl-and-php-bounces_at_cool.haxx.se] Namens Daniel Stenberg
Verzonden: donderdag 14 december 2006 14:01
Aan: curl with PHP
Onderwerp: RE: Error 58 unable to set private key file
On Thu, 14 Dec 2006, The PayPerPhone company; Willem Blok wrote:
(you do the weirdest quotes, it makes it very hard to read your replies)
> [Willem Blok] doing a call from PHP the command line with using
LibCurl
libcurl is a library, you can't use that from a command line. You can
use
'curl' from a command line though, as that is a command line tool.
>>> Certs are open SSL selfsigned 1024
>
>> How can the client cert be self-signed?
> I mean signed by our own CA.
That's what self-signed means yes, but I was talking about your client
cert as
those are not self-signed. They're simply certs that are passed to the
server
to let it acknowledge you connecting to it.
>> You need to pass on the corresponding key file and passphrase for the
key
>> when you use a client certificate.
> [Willem Blok]tried this Curlopt_SSLKEY ( ...) same result. Note that
we use
> both client and server certificates.
And you set the passphrase too?
-- Commercial curl and libcurl Technical Support: http://haxx.se/curl.html _______________________________________________ http://cool.haxx.se/cgi-bin/mailman/listinfo/curl-and-php _______________________________________________ http://cool.haxx.se/cgi-bin/mailman/listinfo/curl-and-phpReceived on 2006-12-15