cURL / Mailing Lists / curl-users / Single Mail

curl-users

Using client certificate and private key problem

From: Ivan Balashov <ibalashov_at_gmail.com>
Date: Thu, 14 Dec 2006 13:34:16 -0000

Hi dear all,

I hope anyone can clarify the matter of using a client certificate with
Curl. I am given a public key in a ".cer" file (DER format). To use it with
Curl I converted it into PEM format using openssl tool:

openssl x509 -in client.cer -inform DER -out client.pem -outform PEM

When I'm trying to use it in Curl I get the error that the private key
cannot be set. Here is the output:

curl -v -E client.pem -k https://www.security.com

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

So my question is, where is the private key that I should use, given that
original ".cer" file contains only a public key? I'm not sure if I have to
use private key at all, but can anyone advise if I should also get a private
key on order to use this client certificate?

Thank you for any suggestions.

--
Ivan 
Received on 2006-12-14