cURL / Mailing Lists / curl-library / Single Mail

curl-library

RE: Certificate subject does not match target host name

From: DOMINICK C MEGLIO <dcm5151_at_esu.edu>
Date: Wed, 17 Dec 2003 18:45:03 -0500

I know almost nothing about Ruby, but the ssl_verifyhost option is not a
boolean value. It accepts values of either 0, 1, or 2. Try doing
curl.ssl_verifyhost = 0
Most languages have false == 0, but maybe Ruby is different? Worth a shot
anyway...

Dominick Meglio

-----Original Message-----
From: Mike S
To: curl-library_at_lists.sourceforge.net
Sent: 12/17/03 5:18 PM
Subject: RE: Certificate subject does not match target host name

In ruby I uses this code:

curl = Curl.new
curl.postfields = xmlRequest
curl.url = "https://remote.server:10012"
curl.ssl_verifypeer = false
curl.ssl_verifyhost = false #crashes in this line
headers = ["Content-Type: text/xml"]
curl.httpheader = headers
curl.perform
xmlResponse = curl.body_str

But it crashes. Any ideas what version of Ruby is stable enough?

>From: DOMINICK C MEGLIO <dcm5151_at_esu.edu>
>Reply-To: curl-library_at_lists.sourceforge.net
>To: "'curl-library_at_lists.sourceforge.net'"
><curl-library_at_lists.sourceforge.net>
>Subject: RE: Certificate subject does not match target host name Date:
Wed,
>17 Dec 2003 16:36:29 -0500
>
>Sounds like curl_easy_setopt(curl, CURLOPT_SSL_VERIFYHOST, 1); is what
you
>want. If it still doesn't work, try changing the 1 to a 0. This however
>isn't really a good solution. If you don't verify the host is correct,
then
>there is no way to verify that you are talking to the machine you
believe
>you are.
>
>Dominick Meglio
>
>-----Original Message-----
>From: Mike S
>To: curl-library_at_lists.sourceforge.net
>Sent: 12/17/03 3:51 PM
>Subject: Certificate subject does not match target host name
>
>How can I solve the problem without turn off the SSL ?
>
>Even this line in the code, doesn't help.
>curl.ssl_verifypeer = false
>
>Error:"
>in `perform': SSL: certificate subject name 'orderupdate server' does
>not
>match target host name 'orderupdate.abebooks.com' (RuntimeError)"
>
>Thanks
>

-------------------------------------------------------
This SF.net email is sponsored by: IBM Linux Tutorials.
Become an expert in LINUX or just sharpen your skills. Sign up for IBM's
Free Linux Tutorials. Learn everything from the bash shell to sys admin.
Click now! http://ads.osdn.com/?ad_id=1278&alloc_id=3371&op=click
Received on 2003-12-18