cURL / Mailing Lists / curl-library / Single Mail

curl-library

Re: curl: (58) unable to set private key file: 'concatenatedCert.pem' type PEM

From: Daniel Stenberg <daniel_at_haxx.se>
Date: Thu, 29 Sep 2011 09:27:34 +0200 (CEST)

On Mon, 26 Sep 2011, Pa1 wrote:

> I'm using libcurl - 7.15.1 & OpenSSL - 0.9.7 on Win32 machine trying for
> client two way authentication.

Don't use such outdated versions.

> certificate doesn't have password, still I'm giving same private key passwd
> to that.

You might need to set "" as password then, but I'm not entirely sure.

> Then I tried with command line with following command,
>
> $ curl --version
> curl 7.19.6 (i686-pc-cygwin) libcurl/7.19.6 OpenSSL/0.9.8n zlib/1.2.3
> libidn/1.18 libssh2/1.2

This is at least more recent, but I would urge you to take the plunge and go
to a modern version while you're at it!

> *curl: (58) unable to set private key file: 'testCert.pem' type PEM*
>
> I don't have a clue what might be the issue. Is this libCurl bug or my setup
> ? Is there any know bug related this ?

I'm sure sure this error is because an OpenSSL function returns error with the
given conditions. You can read the lib/ssluse.c code to see the exact details,
but it feels like a problem with the inputs as libcurl doesn't really do much
with what you tell it other than pass on the information to the SSL library...

-- 
  / daniel.haxx.se
-------------------------------------------------------------------
List admin: http://cool.haxx.se/list/listinfo/curl-library
Etiquette:  http://curl.haxx.se/mail/etiquette.html
Received on 2011-09-29