cURL / Mailing Lists / curl-library / Single Mail

curl-library

question about post or get after SSL negotiation finished successfully

From: 黄志军 <hzhijun_at_huawei.com>
Date: Wed, 18 Aug 2004 15:43:05 +0800

Now i am testing to use libcurl 's methods to communicate with a http server (version:apache-1.3.28 mod_ssl-2.8.15 openssl-0.9.6h[engine]).
My test program is simplessl.c from curl-7.12.0 's docs/examples.

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. And I got the following information in Apache log as follows:

[18/Aug/2004 14:50:50 01764] [trace] OpenSSL: Read: SSL negotiation finished successfully
[18/Aug/2004 14:50:50 01764] [debug] OpenSSL: write 29/29 bytes to BIO#008B3E00 [mem: 00968008] (BIO dump follows)
+-------------------------------------------------------------------------+
| 0000: 15 03 01 00 18 57 2e eb-09 c2 32 a7 36 27 b0 7f .....W....2.6'.. |
| 0010: 14 42 a8 12 f8 71 f1 bb-ab 70 3f f5 9f .B...q...p?.. |
+-------------------------------------------------------------------------+
[18/Aug/2004 14:50:50 01764] [trace] OpenSSL: Write: SSL negotiation finished successfully
[18/Aug/2004 14:50:50 01764] [info] Connection to child 12 closed with standard shutdown (server 10.70.107.123:443, client 10.70.107.40)

So in my point of view, the SSL is ok.
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?

Regards
Jun
Received on 2004-08-18