cURL / Mailing Lists / curl-library / Single Mail

curl-library

Trying to connect to Https Server

From: Vijay <nags.vijay_at_gmail.com>
Date: Mon, 12 May 2008 15:03:24 +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 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 (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
* 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' does not match target host
name '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
Received on 2008-05-12