curl-library
SSL read error: 5 - What could be the reson?
Date: Thu, 09 Jan 2003 21:39:27 -0500
I am using curl 7.9.8 and OpessSLL 9.6d on AIX5.1. I am trying to POST some data to a secure server. The program fails with the following error:
SSL read error: 5
Here is the chunk of code POSTing the data:
/* set the content headers */
struct curl_slist *headers=NULL;
headers = curl_slist_append(headers, "Content-Type: text/xml");
/* specify URL to post to */
curl_easy_setopt(curl_handle, CURLOPT_URL, inetaddress.data());
/* Now specify we want to POST data */
curl_easy_setopt(curl_handle, CURLOPT_POSTFIELDS, message.data());
curl_easy_setopt(curl_handle, CURLOPT_HTTPHEADER, headers);
/* Set the expected POST size */
curl_easy_setopt(curl_handle, CURLOPT_POSTFIELDSIZE, strlen(message.data()));
/* Set the buffer to receive error messages */
curl_easy_setopt(curl_handle, CURLOPT_ERRORBUFFER, errbuf);
/* send all response data to this function */
curl_easy_setopt(curl_handle, CURLOPT_WRITEFUNCTION, WriteMemoryCallback);
/* we pass our 'chunk' struct to the callback function */
curl_easy_setopt(curl_handle, CURLOPT_FILE, (void *)&chunk);
/* get it! */
res = curl_easy_perform(curl_handle);
if( res != CURLE_OK )
{
cout<<"SSL Post ERROR: - "<<errbuf<<endl;
}
else
{
//Successful curl execution, copy the response and clean up
RWCString response((char *)chunk.memory, chunk.size);
resp = response;
}
TIA
Naren.
_____________________________________________________________
Get 25MB, POP3, Spam Filtering with LYCOS MAIL PLUS for $19.95/year.
http://login.mail.lycos.com/brandPage.shtml?pageId=plus&ref=lmtplus
-------------------------------------------------------
This SF.NET email is sponsored by:
SourceForge Enterprise Edition + IBM + LinuxWorld = Something 2 See!
http://www.vasoftware.com
Received on 2003-01-10