cURL / Mailing Lists / curl-library / Single Mail

curl-library

RE: libcurl https GET not returning entire data

From: Naved Khan <navedk_at_cybage.com>
Date: Thu, 10 Apr 2003 11:57:54 +0530

Hi Daniel,

Yes, the return value was CURLE_SSL_PEER_CERTIFICATE and I used
"curl_easy_setopt(curl, CURLOPT_SSL_VERIFYHOST, 1)" as suggested by you and
the code works fine! Thanks a lot for the prompt reply!

A couple of more questions...

1. About SSL certificates, if I have to post an XML request to an HTTPS
server which has a valid CA certificate...do I need to have any CA
certificate on the client side too??

2. My next question would be really frustrating for you...u can answer this
only if u feel like. I'm checking the docs to see if I can know how to do
the following...
My requirement is to do a post to one https server with some name/value
pairs
ServerName=XYZ
UserName=ABC
Password=@##@
Version=1.0
XML=<!DOCTYPE MySytem "FILE.dtd>

How will I cuse curl commannd line utility to do this?

Regards,
-Naved

-----Original Message-----
From: Daniel Stenberg [mailto:daniel_at_haxx.se]
Sent: Wednesday, April 09, 2003 7:01 PM
To: libcurl Mailing list
Subject: Re: libcurl https GET not returning entire data

On Wed, 9 Apr 2003, Naved Khan wrote:

> curl -v
>
https://203.124.158.86/navedk/ExtThreadPool.dll?ProcessURL?SOMEPARAMETERS -k

[snip]

> But when i try to use libcurl in my sample C++ application using the
> following code
> ...
> curl_easy_setopt(curl, CURLOPT_URL,
> "https://203.124.158.86/navedk/ExtThreadPool.dll?ProcessURL?GOOGLE");
> res = curl_easy_setopt(curl,CURLOPT_SSL_VERIFYPEER,0);
> res = curl_easy_perform(curl);

And what does the curl_easy_perform() return here? Could it be
CURLE_SSL_PEER_CERTIFICATE?

A guess would be that you need to:

        curl_easy_setopt(curl, CURLOPT_SSL_VERIFYHOST, 1);

... as well, since your server cert's CN field hardly matches your given IP
address... curl -k does that.

--
 Daniel Stenberg -- curl, cURL, Curl, CURL. Groks URLs.
-------------------------------------------------------
This SF.net email is sponsored by: Etnus, makers of TotalView, The debugger
for complex code. Debugging C/C++ programs can leave you feeling lost and
disoriented. TotalView can help you find your way. Available on major UNIX
and Linux platforms. Try it free. www.etnus.com
-------------------------------------------------------
This SF.net email is sponsored by: Etnus, makers of TotalView, The debugger 
for complex code. Debugging C/C++ programs can leave you feeling lost and 
disoriented. TotalView can help you find your way. Available on major UNIX 
and Linux platforms. Try it free. www.etnus.com
Received on 2003-04-10