cURL / Mailing Lists / curl-users / Single Mail

curl-users

SSL: certificate subject name does not match target host name

From: Chidanand Gangur <chidanand.gangur_at_gmail.com>
Date: Thu, 13 Oct 2005 12:55:43 +0530

/usr/local/bin/curl -v --cacert myCAcert.pem --capath "." --cert
myClient.pem --cert-type PEM --key myClient.key --key-type PEM
https://vml3chidanandg/webclient/index.php

When I try to acces my index page using curl I get the following error
message. I do not want to use "-k" option. Does curl provide any other
option which can over come this problem

* About to connect() to vml3chidanandg port 443
* Connected to vml3chidanandg.pune.testnetworks.com<http://vml3chidanandg.pune.testnetworks.com>(
192.168.2.163 <http://192.168.2.163>) port 443
* successfully set certificate verify locations:
* CAfile: myCAcert.pem
CApath: .
* SSL connection using EDH-RSA-DES-CBC3-SHA
* Server certificate:
* subject: /C=IN/ST=India/L=Pune/O=Test Networks/OU=EM/CN=TestServer/Email=
server_at_nevis.com
* start date: 2005-10-13 06:35:15 GMT
* expire date: 2006-10-13 06:35:15 GMT
* SSL: certificate subject name 'TestServer' does not match target host name
'vml3chidanandg'
* Closing connection #0
curl: (51) SSL: certificate subject name 'TestServer' does not match target
host name 'vml3chidanandg'

I tried creating certificates with the CN as the server name every thing
went fine. This is my local network where machines are swapped too often and
changing the certificate accordig to the machine name / IP is cumbersome. I
want to have permanent solution.

How can i achieve this using curl command line or using libcurl. I have gone
through curl options and libcurl curl_easy_setoptions but did not find some
thing of my need.

Thanks,
Chidanand

--
Chidanand Gangur
Pune.
Received on 2005-10-13