curl-library
How to convert SSL certificate into .PEM
Date: Wed, 01 Oct 2003 11:34:49 +0000
Hello all,
I get the folowing results when I execute a curl command attempting to
access a secure site:
D:\cURL\ssl>curl -v --cacert mycert.pem -o test.txt
"https://mydomain.mycompany.com/DWNLD.asp?id=128"
* About to connect() to mydomain.mycompany.com:443
* Connected to mydomain.mycompany.com (vvv.xxx.yyy.zzz) port 443
* SSL: error:00000000:lib(0):func(0):reason(0)
* Closing connection #0
curl: (35) SSL: error:00000000:lib(0):func(0):reason(0)
D:\cURL\ssl>
I am using curl-7.10.3 ssl version under Win32.
Here is how I generate mycert.pem from SSL certificate of web site
https://mydomain.mycompany.com:
(a) Open up https://mydomain.mycompany.com using MSIE 5.5
(b) Double click on the lock sign on MSIE status bar
(c) Click on Details tab
(d) Click on "Copy to File" button
(e) Click on Next on Certificate Export Wizard window
(f) Select "Base-64 encoded X.509 (.CER)" and then click on Next
(g) Enter d:\mycert.cer into file name input area
(h) Press Finish button to complete exporting certificate
(i) and finally use openssl to generte mycert.pem file
openssl x509 -in mycert.cer -outform PEM -out mycert.pem
What am I doing wrong here? Can anybody tell me how to get .pem file
from IIS or the secure site itself?
By the way, when I turn off cURL's certificate verification
(by using -k option instead of --cacert), the above cURL command
runs with no errors.
Thanks a lot,
Ali Yildirim
_________________________________________________________________
-------------------------------------------------------
This sf.net email is sponsored by:ThinkGeek
Welcome to geek heaven.
http://thinkgeek.com/sf
Received on 2003-10-01