cURL / Mailing Lists / curl-users / Single Mail

curl-users

How and what should be used when doing a SSL-request with client cert?

From: Jonny Andersson <curl-user_at_jonand.se>
Date: Thu, 02 Sep 2010 14:51:10 +0200

  Hi!

This is the first time I try this mailing list and I hope I've got the
etiquette on how to use it correct : )

I am trying to make a request to a web service with SSL and client cert
authentication. I am unfortunately not quite familiar of using a client
certificate from other applications either. Anyway, I have added the
param --cert and the path to a certificate file to the command line for
cURL but I get a

curl: (58) unable to use client certificate (no key found or wrong pass
phrase?)

every time so I guess I just am doing something wrong, probably in lack
of earlier experiences from use of client certificate. I have also
noticed that the path to the certificate should be complemented with a
password

--cert <path to cert>:password

so my first question to find out what I am doing wrong is, what is the
file for the --cert option expected to contain? Also, is it expected to
have a certain encoding(DER, PEM, ..)? I have tried this with an
ordinary certificate file that at my Windows-computer has the extension
.cer and which is a certificate signed of a CA-certificate. But this
seems to be wrong. Also, the only password connected to that cert in
some way I know about is the password used for the private key for the
CA certificate but that certificate is not used with this cURL-option.
Could someone clarify this, please, would I be very thankful!

/Jonny
-------------------------------------------------------------------
List admin: http://cool.haxx.se/list/listinfo/curl-users
FAQ: http://curl.haxx.se/docs/faq.html
Etiquette: http://curl.haxx.se/mail/etiquette.html
Received on 2010-09-02