cURL / Mailing Lists / curl-library / Single Mail

curl-library

Re: Using Curl with nss support

From: Varun Shrivastava <varun.celunite_at_gmail.com>
Date: Mon, 29 Oct 2007 13:37:53 +0530

On 10/26/07, Daniel Stenberg <daniel_at_haxx.se> wrote:
>
> This then begs the question: why are you going down the NSS lane if you
> really
> don't know these details?
>
> The CHANGES file details a bit more on how (a much more recent libcurl)
> works
> in these aspects. I'm not sure the docs is up-to-date with these things
> yet.
>
> --
> Commercial curl and libcurl Technical Support: http://haxx.se/curl.html
>

I have to use nss with curl, its my requirement
please help me out

i added following lines in NRCit/src/HttpCurl.cpp:::: CurlRequest::execute()
Function

curl_easy_setopt(handle, CURLOPT_VERBOSE, 1);
curl_easy_setopt(handle, CURLOPT_URL, "https://mail.google.com");
curl_easy_setopt(handle, CURLOPT_SSL_VERIFYPEER, 1);
curl_easy_setopt(handle, CURLOPT_CAINFO, "/etc/nss_db/"); /*Path of nss
database*/

now curl finds the nss certificate database here's the o/p of verbose mode
of CURLE

* About to connect() to mail.google.com port 80 (#0)
* Trying 209.85.147.83... * Connected to mail.google.com (209.85.147.83)
port 80 (#0)
> GET / HTTP/1.1
User-Agent: Mozilla/4.0 (compatible; MSIE 4.01; Windows CE; PPC; 240x320)
Host: mail.google.com
Accept: */*

< HTTP/1.1 302 Moved Temporarily
< Cache-control: no-cache, no-store
< Pragma: no-cache
< Location: http://mail.google.com/mail/
< Content-Type: text/html; charset=UTF-8
< Transfer-Encoding: chunked
< Server: GFE/1.3
< Date: Mon, 29 Oct 2007 07:44:44 GMT
<
* Ignoring the response-body
* Expire cleared
* Connection #0 to host mail.google.com left intact
* Issue another request to this URL: 'http://mail.google.com/mail/'
* Re-using existing connection! (#0) with host mail.google.com
* Connected to mail.google.com (209.85.147.83) port 80 (#0)
> GET /mail/ HTTP/1.1
User-Agent: Mozilla/4.0 (compatible; MSIE 4.01; Windows CE; PPC; 240x320)
Host: mail.google.com
Accept: */*

< HTTP/1.1 302 Moved Temporarily
* Added cookie GMAIL_HELP="EXPIRED" for domain mail.google.com, path /,
expire 631152000
< Set-Cookie: GMAIL_HELP=EXPIRED;Path=/;Expires=Mon, 01-Jan-1990 00:00:00
GMT
Path /
Cookie: GMAIL_HELP EXPIRED ((null)) from (null)
Cookie: GMAIL_HELP EXPIRED ((null)) from (null)
* Added cookie GV="EXPIRED" for domain mail.google.com, path /, expire
631152000
< Set-Cookie: GV=EXPIRED;Domain=mail.google.com;Path=/;Expires=Mon,
01-Jan-1990 00:00:00 GMT
Path /
Cookie: GV EXPIRED ((null)) from mail.google.com
Cookie: GV EXPIRED ((null)) from mail.google.com
* Added cookie GV="EXPIRED" for domain mail.google.com, path /mail, expire
631152000
< Set-Cookie: GV=EXPIRED;Domain=mail.google.com;Path=/mail;Expires=Mon,
01-Jan-1990 00:00:00 GMT
Path /mail
Cookie: GV EXPIRED ((null)) from mail.google.com
Cookie: GV EXPIRED ((null)) from mail.google.com
< Cache-control: no-cache, no-store
< Pragma: no-cache
< Location:
https://www.google.com/accounts/ServiceLogin?service=mail&passive=true&rm=false&continue=http%3A%2F%2Fmail.google.com%2Fmail%2F%3Fui%3Dmobile%26zyp%3Dl&ltmpl=ecobh&nui=5&btmpl=mobile
< Content-Type: text/html; charset=UTF-8
< Transfer-Encoding: chunked
< Server: GFE/1.3
< Date: Mon, 29 Oct 2007 07:44:45 GMT
<
* Ignoring the response-body
* Connection #0 to host mail.google.com left intact
* Issue another request to this URL: '
https://www.google.com/accounts/ServiceLogin?service=mail&passive=true&rm=false&continue=http%3A%2F%2Fmail.google.com%2Fmail%2F%3Fui%3Dmobile%26zyp%3Dl&ltmpl=ecobh&nui=5&btmpl=mobile
'
* About to connect() to www.google.com port 443 (#1)
* Trying 64.233.189.104... * Connected to www.google.com (64.233.189.104)
port 443 (#1)

here browser is waiting indefinately
Received on 2007-10-29