cURL / Mailing Lists / curl-library / Single Mail

curl-library

Re: SSL client cert authentication

From: Aniruddha Diwakar <a_diwakar_at_hotmail.com>
Date: Mon, 07 Mar 2005 08:44:49 +0000

Hello,

I am having client certificate in .p12 format. So i have converted it to
.pem format using openssl.
now it's looks like as follows :

Bag Attributes
    friendlyName: Rohit Valiveti's Security ID
    localKeyID: FD 77 1C 09 7B 61 AD D9 27 D4 CE 12 8E 7F E2 F8 AE 1D C5 A2
Key Attributes: <No Attributes>
-----BEGIN RSA PRIVATE KEY-----
Proc-Type: 4,ENCRYPTED
DEK-Info: DES-EDE3-CBC,0A4EBAD719EF4D37

6+5mCKsYScg580H8aEIRNdlZyuVwqopX1xAjYQpPkh2oxHER+iIysclxUwhZzNSo
B9x5r3pUYl5UXje1HeaCx7150tS3KwedJuo9dyniUtvKP6cD7Vj5B5e98eQZAW2s
MwXJwfbNWhBElZuHXTmwRa0ZdVl5AYuoV+h6/AZUmeA+XYBtQJ74gTJoK4Xwh/bw
CCFkvArdx6P6h6V9p3GTTWN5n8irUrt+9xGTguDwtoEbZS/QRZvgTypQmLpsmVDF
R3xqAMd36c142y/kpL405yVm10uZXQbFHkDGPVRabMEz9wFHpSy/A8LR2346Osi9
iG7W6KsFAqpIXZF/QnI/5pF8zWchQ1osQatdPsBQDD+ltc0X30bmWeerfHGSONAo
E2CrjXJ/reMujozqXQXfLBmcFgqfc2Y1l0FEqIC+fxk=
-----END RSA PRIVATE KEY-----
Bag Attributes
    friendlyName: Certificate Manager - Security
subject=/C=US/ST=CA/L=CU/O=Security/OU=PSPL/CN=Certificate Manager
issuer=/C=US/ST=CA/L=CU/O=Security/OU=PSPL/CN=Certificate Manager
-----BEGIN CERTIFICATE-----
MIICNTCCAd+gAwIBAgIBBjANBgkqhkiG9w0BAQUFADBnMQswCQYDVQQGEwJVUzEL
MAkGA1UECBMCQ0ExCzAJBgNVBAcTAkNVMREwDwYDVQQKEwhTZWN1cml0eTENMAsG
A1UECxMEUFNQTDEcMBoGA1UEAxMTQ2VydGlmaWNhdGUgTWFuYWdlcjAeFw0wNDA3
MTUxODMwMDBaFw0wNjA3MTUxODMwMDBaMGcxCzAJBgNVBAYTAlVTMQswCQYDVQQI
EwJDQTELMAkGA1UEBxMCQ1UxETAPBgNVBAoTCFNlY3VyaXR5MQ0wCwYDVQQLEwRQ
U1BMMRwwGgYDVQQDExNDZXJ0aWZpY2F0ZSBNYW5hZ2VyMFwwDQYJKoZIhvcNAQEB
BQADSwAwSAJBAL7uVSiavK9oi37q8I2JjI/YBWxP4ZqOQnffLlU0YWXMLtnWweNI
fZIV+BTsB4gwS54HgIdb9oYHIYvH17FQ+E8CAwEAAaN2MHQwEQYJYIZIAYb4QgEB
BAQDAgAHMA8GA1UdEwEB/wQFMAMBAf8wHQYDVR0OBBYEFAlC0f3HKTZjHSyIkV1W
yaRmGgp4MB8GA1UdIwQYMBaAFAlC0f3HKTZjHSyIkV1WyaRmGgp4MA4GA1UdDwEB
/wQEAwIBhjANBgkqhkiG9w0BAQUFAANBAIPhFX5NclB13rr78O/2g8umEvxDMxSa
1IzwuwFJEU+5nPBFw7cP6u4wszVq7I8NiwVPhureN3LrVPBqCmwCXjQ=
-----END CERTIFICATE-----
Bag Attributes
    friendlyName: Rohit Valiveti's Security ID
    localKeyID: FD 77 1C 09 7B 61 AD D9 27 D4 CE 12 8E 7F E2 F8 AE 1D C5 A2
subject=/C=US/O=Oblix/OU=security/UID=Valiveti/CN=Rohit
Valiveti/emailAddress=user1k1_at_company.com
issuer=/C=US/ST=CA/L=CU/O=Security/OU=PSPL/CN=Certificate Manager
-----BEGIN CERTIFICATE-----
MIICRjCCAfCgAwIBAgIBPDANBgkqhkiG9w0BAQQFADBnMQswCQYDVQQGEwJVUzEL
MAkGA1UECBMCQ0ExCzAJBgNVBAcTAkNVMREwDwYDVQQKEwhTZWN1cml0eTENMAsG
A1UECxMEUFNQTDEcMBoGA1UEAxMTQ2VydGlmaWNhdGUgTWFuYWdlcjAeFw0wNDEy
MjkxMzI1NDhaFw0wNTEyMjkxMzI1NDhaMIGHMQswCQYDVQQGEwJVUzEOMAwGA1UE
ChMFT2JsaXgxETAPBgNVBAsTCHNlY3VyaXR5MRgwFgYKCZImiZPyLGQBARMIVmFs
aXZldGkxFzAVBgNVBAMTDlJvaGl0IFZhbGl2ZXRpMSIwIAYJKoZIhvcNAQkBFhN1
c2VyMWsxQGNvbXBhbnkuY29tMFwwDQYJKoZIhvcNAQEBBQADSwAwSAJBAO9se4+c
IDy7VgbxyULasoJ5fIUfKcOtZuXwDuuzkzzR3reFZVQ0L/JSlfqCeML6jZNdf11Q
QM2cQ3UJGVxPDEcCAwEAAaNmMGQwDgYDVR0PAQH/BAQDAgXgMBEGCWCGSAGG+EIB
AQQEAwIFoDAfBgNVHSMEGDAWgBQJQtH9xyk2Yx0siJFdVsmkZhoKeDAeBgNVHREE
FzAVgRN1c2VyMWsxQGNvbXBhbnkuY29tMA0GCSqGSIb3DQEBBAUAA0EAsTuiywsv
XYY98P1Gwk+uRn0lXTJoftR2AdhSfN9wnLlXagum894CnvNH4U25rrK/p4UlVt0/
ypn1FCDEn6pKJA==
-----END CERTIFICATE-----

this .pem file contains private key as well as certificate.
now how should i use CURLOPT_SSLCERT,
CURLOPT_SSLKEYPASSWD,CURLOPT_SSLKEYTYPE and CURLOPT_SSLKEY to set client
certificate, its key file and password.

i tried to give .pem file to the CURLOPT_SSLCERT, it asked me passphrase
also , however after supplying the correct pass phrase it is giving me

unable to set private key file: '.......' type PEM error.

please help me out.

Regards
Aniruddha

_________________________________________________________________
Make money with Zero Investment.
http://adfarm.mediaplex.com/ad/ck/4686-26272-10936-31?ck=RegSell Start your
business.
Received on 2005-03-07