cURL / Mailing Lists / curl-users / Single Mail


How to use .pfx in certificate store in CURL via SSL from Windows 7

From: Brendan White <>
Date: Thu, 5 Mar 2015 00:01:34 +0000


I want to use cURL to access a remote server, and I need to identify myself using a private key, otherwise the remote server gives a 401 "Unauthorized".

I'm on Windows 7 (work machine, not my choice) and my private key is installed on my computer. I'm not permitted to access it directly, but I'm confident it's installed in the certificate store correctly. So I want to specify the *public* key in the cURL command, and let the operating system work out which private key to use.

I've given the public key to the remote server, and they've accepted it and installed it.

So I'm doing this:

        curl --verbose --cert "my-public-cert.pem"

...but it's not working, I'm getting a 58 error:

        * Trying
        * Connected to ( port 443 (#0)
        * unable to use client certificate (no key found or wrong pass phrase?)
        * Closing connection 0
        curl: (58) unable to use client certificate (no key found or wrong pass phrase?)

Am I doing something wrong? Is there a way to send a cURL request over SSL, if I can't access the private key directly but the operating system has the private key installed? Or is this just impossible?

Many thanks,

PS - Full disclosure - I posted this question to SuperUser ( a couple of days ago, but have not received any answers.

Brendan White 
Business Analyst
Student Systems, Flinders University 
ph +618 8201 5967, fax +618 8201 2580, web
CRICOS Registered Provider: The Flinders University of South Australia 
CRICOS Provider Number: 00114A 
This email and any attachments may be confidential. If you are not the intended recipient, please inform the sender by reply email and delete all copies of this message.
List admin:
Received on 2015-03-05