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

curl-and-php

RE: Error 58 unable to set private key file

From: Daniel Stenberg <daniel_at_haxx.se>
Date: Fri, 15 Dec 2006 11:01:33 +0100 (CET)

On Fri, 15 Dec 2006, The PayPerPhone company; Willem Blok wrote:

> 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.

IMO you should rather use the terms 'curl' for the command line tool, and
PHP/CURL for the PHP binding to the library libcurl. A PHP program _never_
uses libcurl directly, it uses PHP/CURL which is a binding (glue layer) on top
of the underlying library.

This is an important distinction, at least to me, since I am the primary
author of curl and libcurl but I'm not involved in the making PHP/CURL.

> 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.

Wow. I didn't know you could do that...

> Are there restrictions using libcurl that might cause this error?

You mean if there's any restriction in PHP/CURL ? I don't know really, but I
can't recall having read about any specific one that would apply here. There
certainly is no restriction in libcurl since that is what curl uses too.

One way to find out I guess is to check the curl source and and compare with
the PHP/CURL one and see if you can detect any differences in how they set the
certificate option(s) to libcurl.

Also, you may use different libcurl versions so you might suffer from a
libcurl bug in one of the setups.

-- 
  Commercial curl and libcurl Technical Support: http://haxx.se/curl.html
_______________________________________________
http://cool.haxx.se/cgi-bin/mailman/listinfo/curl-and-php
Received on 2006-12-15