cURL / Mailing Lists / curl-library / Single Mail

curl-library

Re: Howto install certificate ?

From: Arvind Sachdeva <asachdeva_at_gmail.com>
Date: Mon, 18 Jul 2005 21:50:01 +0530

> How is it offered? I know there's a tool called curl that can download files
> from several kinds of servers

I dont think you got it right, I am trying to download the certificate
file which is exchanged during ssl handshake. My curl based
application is getting the failure at CURLINFO_SSL_VERIFYRESULT. What
I want is get the certificate using some command line equivalent of
SSL_get_peer_certificate and put it in an appropriate folder so that
my application can verify the certificate.

On 7/17/05, Daniel Stenberg <daniel-curl_at_haxx.se> wrote:
> On Fri, 15 Jul 2005, Arvind Sachdeva wrote:
>
> > How can I download the certificate, Any command line to do it ?
>
> How is it offered? I know there's a tool called curl that can download files
> from several kinds of servers.
>
> > I tried using firefox to access the url, it stored the certificate in the
> > cert8.db file(after prompting me). Can I extract the certificate from
> > cert8.db, convert it to PEM and put at the specified location ?
>
> This question is in fact not at all curl or libcurl related, but anyway...
>
> You used to be able to export certificates from Netscape and I assumed
> Mozilla/Firefox can do that too. But I can't find any such option in my
> Firefox... I might be blind though.
>
> > What can I use to convert it into PEM format ?
>
> Such exported certs used to be PCKS#12 formatted which can be converted to PEM
> using the openssl tool:
>
> openssl pkcs12 -clcerts -nokeys -in cert.p12 -out usercert.pem
> openssl pkcs12 -nocerts -in cert.p12 -out userkey.pem
>
> (assuming cert.p12 is the exported plain certificate, but I would assume CA
> cert converting would be similar)
>
> --
> Commercial curl and libcurl Technical Support: http://haxx.se/curl.html
>
Received on 2005-07-18