cURL / Mailing Lists / curl-library / Single Mail


SSL read error: 5 - What could be the reson?

From: Naren D <>
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,;

    /* Now specify we want to POST data */
    curl_easy_setopt(curl_handle, CURLOPT_POSTFIELDS,;
    curl_easy_setopt(curl_handle, CURLOPT_HTTPHEADER, headers);

    /* Set the expected POST size */
    curl_easy_setopt(curl_handle, CURLOPT_POSTFIELDSIZE, strlen(;

    /* 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;
        //Successful curl execution, copy the response and clean up
        RWCString response((char *)chunk.memory, chunk.size);
        resp = response;


Get 25MB, POP3, Spam Filtering with LYCOS MAIL PLUS for $19.95/year.

This SF.NET email is sponsored by:
SourceForge Enterprise Edition + IBM + LinuxWorld = Something 2 See!
Received on 2003-01-10