cURL
Haxx ad
libcurl

curl's project page on SourceForge.net

Sponsors:
Haxx

cURL > Mailing List > Monthly Index > Single Mail

curl-users Mailing List Archives

Re: Client Certificate

From: Domenico Andreoli <cavok_at_filibusta.crema.unimi.it>
Date: Wed, 10 Jul 2002 16:03:06 +0200

On Wed, Jul 10, 2002 at 03:45:32PM +0200, Jochen Vogel wrote:
> Hi,
>
hi

>
> if i try curl -O -E ./clienta.pem https://webserver/test/file1 i get the
> error unable to set public key.
>
> here ist the client certificate:
>
> cat clienta.pem
> -----BEGIN CERTIFICATE-----
> MIICbTCCAdYCAQgwDQYJKoZIhvcNAQEEBQAwdTELMAkGA1UEBhMCREUxDTALBgNV
> BAgUBEJhV/wxDDAKBgNVBAcTA1VsbTEPMA0GA1UEChMGaXQuc2VjMRcwFQYDVQQD
> Ew5zdXNlLml0LXNlYy5kZTEfMB0GCSqGSIb3DQEJARYQanZvZ2VsQGl0LXNlYy5k
> ZTAeFw0wMjA3MDkxNDM5MjVaFw0wMjA4MDgxNDM5MjVaMIGIMQswCQYDVQQGEwJE
> RTENMAsGA1UECBQEQmFX/DEMMAoGA1UEBxMDVWxtMSEwHwYDVQQKExhJbnRlcm5l
> dCBXaWRnaXRzIFB0eSBMdGQxGDAWBgNVBAMTD2FsaXRhLml0LXNlYy5kZTEfMB0G
> CSqGSIb3DQEJARYQanZvZ2VsQGl0LXNlYy5kZTCBnzANBgkqhkiG9w0BAQEFAAOB
> jQAwgYkCgYEAuWsRJpWAmIQF34ffJHnZrtoXjs4lzy31X9XhFSO1i7VqdopOaLjm
> UFHnWQKS7MTgLp9U7+b7GT4dfxjZFvm2NwgqncNGJ/x+34COgDh5eWqtXPHEjHNT
> CRwgdY7erQlIj/7Vgr8smTXUgh2G2jGWcHjE1jFByd4adz/VVsQFe/sCAwEAATAN
> BgkqhkiG9w0BAQQFAAOBgQAnroi2gQQlfBuFdp93xFo11ID3BRL/V0N07y+2hm9e
> m3XgZcn4lhgyhYqKHbLLtPtNkall3PYyIkiJPTM4hLwRf0CQLynEOTLScli4r1be
> BZU1SwD8SZgpBo9LSS+zjM8je6W4PLMdTo+WrWQQwyuDw6n9zLqy7Hb2aA7oBtEu
> sA==
> -----END CERTIFICATE-----

problem is that the file you give to curl needs to contain both the
key and the certificate. yours contains only the certificate, hence
the message. looking into the man page you can read "Note that this
certificate is the private key and the private certificate concatenated!"

indeed a "cat keyfile certfile > pemfile" works nicely for the purpose.

cheers
cavok

-----[ Domenico Andreoli, aka cavok
 --[ http://filibusta.crema.unimi.it/~cavok/gpgkey.asc
   ---[ 3A0F 2F80 F79C 678A 8936 4FEE 0677 9033 A20E BC50

-------------------------------------------------------
This sf.net email is sponsored by:ThinkGeek
Two, two, TWO treats in one.
http://thinkgeek.com/sf
Received on 2002-07-10

These mail archives are generated by hypermail.

donate! Page updated November 12, 2010.
web site info

File upload with ASP.NET