cURL / Mailing Lists / curl-users / Single Mail

curl-users

Re: cURL / SSL problem

From: Daniel Stenberg <daniel_at_haxx.se>
Date: Thu, 3 Jan 2002 16:23:40 +0100 (MET)

On Thu, 3 Jan 2002, Tom Reader wrote:

> That has moved me onto a different problem, which still concerns the keys /
> certificates.
>
> I am now using the command line:
>
> curl --data-binary @send.txt https://xxx.xxx.xxx.xxx:nnnn/receive.sh -v -E
> cert
>
> where the file 'cert' contains my certificate. This is a server
> certificate issued by verisign - maybe the problem is caused by the fact
> that it's a server certificate?

It might have have something to do with it, yes. I'm far from an expert on
this either.

> Anyway, I am receiving the error:
>
> * Closing connection #0
> curl: (35) unable to set public key file
>
> I can confirm that the certificate file in question ('cert') is recognised
> by openssl's 'x509' program as being a PEM certificate.

You need to concatenate both your public key and the certificate into one
single file, and then use that with the -E option.

> The documentation mentions private certificates, which is a concept I don't
> understand - I thought there was only a public certificate, which is linked
> to the private key. Can you confirm which I should be using, and whether
> it matters where the files are located, etc?

I think you're on the right track. It is only a matter of confusion in what
terms to use. I guess I'm to blame for that...

-- 
    Daniel Stenberg -- curl groks URLs -- http://curl.haxx.se/
Received on 2002-01-03