cURL / Mailing Lists / curl-library / Single Mail

curl-library

Re: question about post or get after SSL negotiation finished successfully

From: Daniel Stenberg <daniel-curl_at_haxx.se>
Date: Wed, 18 Aug 2004 12:45:39 +0200 (CEST)

On Wed, 18 Aug 2004, [gb2312] 黄志军 wrote:

> When i execute simplessl, the return value of curl_easy_perform() is 51
> which means "peer's certificate wasn't ok". I have already delete the line:
> //curl_easy_setopt(curl,CURLOPT_SSL_VERIFYPEER,1); so simplessl will not
> disconnect if server's certificate is not validate.

Please read about this here: http://curl.haxx.se/docs/sslcerts.html

libcurl verifies the peer by default, you need to explicitly switch it off to
disable it.

> My purpose is that after SSL connection is build, i want to send a message
> to HTTP Server with specified format and waiting for the response. So i add
> "curl_easy_setopt(curl, CURLOPT_POSTFIELDS, "name=daniel&project=curl"); "
> before curl_easy_perform() method be called. But I can not capture this post
> package in the HTTP Server side. The Apache server seems receive nothing
> after SSL negotiation finished and close the connection.
>
> Why?

Because the SSL negotiation failed and thus libcurl never sent anything.

-- 
      Daniel Stenberg -- http://curl.haxx.se -- http://daniel.haxx.se
       Dedicated custom curl help for hire: http://haxx.se/curl.html
Received on 2004-08-18