cURL / Mailing Lists / curl-library / Single Mail

curl-library

RE: Trying to connect to Https Server

From: Anil Kumar <anil.kumar_at_bhartitelesoft.com>
Date: Mon, 12 May 2008 15:24:27 +0530

../bin/HttpReq_SSL https://www.gmail.com

char CertPath[] = "/home/kodiak/Nagarajan";
  char CertName[] = "cacert.pem";
  long verify = 1;
  if (curl_easy_setopt(curl, CURLOPT_SSL_VERIFYPEER, verify))
    die("Failed to set curl options");

  if (curl_easy_setopt(curl, CURLOPT_CAINFO, CertName))
    die("Failed to set curl options");
  if (curl_easy_setopt(curl, CURLOPT_CAPATH, CertPath))
    die("Failed to set curl options");

* About to connect() to www.gmail.com<http://www.gmail.com> port 443 (#0)
* Trying 209.85.143.83... * Bind to local port 40000 failed, trying next
* Local port: 40001
* connected
* Connected to www.gmail.com<http://www.gmail.com> (209.85.143.83<http://209.85.143.83>) port 443 (#0)
* successfully set certificate verify locations:
* CAfile: /usr/local/share/curl/curl-ca-bundle.crt
  CApath: none
* SSL connection using AES256-SHA
* Server certificate:
* subject: /C=US/ST=California/L=Mountain View/O=Google Inc/CN=mail.google.com<http://mail.google.com>
* start date: 2008-05-02 16:32:54 GMT
* expire date: 2009-05-02 16:32:54 GMT
* SSL: certificate subject name 'mail.google.com<http://mail.google.com>' does not match target host name 'www.gmail.com<http://www.gmail.com>'
* Closing connection #0
 No write Error & not ok code value-51
Error: .

Even if i set verify peer option to 0 and disable it same error is coming.
If any one have done HTTPS implementation please send me your source code if possible.

What may be the error, how to correct it?

--
VIJAY
[Anil Kumar]
we were facing similar problem , we solved it by upgrading our SSL librararies.
Any way you see the curl library call through   --libcurl option for more intent in the problem.
e.g
curl  https://new:9443/manil  --libcurl   filename    (check the calls in file filename)
________________________________
This e-mail and all material transmitted with it are for the use of the intended recipient(s) ONLY and contains confidential and/or privileged information. If you are not the intended recipient, please contact the sender by reply e-mail and destroy all copies and the original message. Any unauthorized review, use, disclosure, dissemination, forwarding, printing or copying of this email or any action taken pursuant to the contents of the present e-mail is strictly prohibited and is unlawful.
The recipient acknowledges that Bharti Telesoft Limited or its management or directors, are unable to exercise control or ensure the integrity over /of the contents of the information contained in e-mail. Any views expressed herein are those of the individual sender only and no binding nature of the contents shall be implied or assumed unless the sender does so expressly with due authority of Bharti Telesoft Limited. E-mail and any contents transmitted with it are prone to viruses and related defects despite all efforts to avoid such by Bharti Telesoft Limited.
Received on 2008-05-12