cURL / Mailing Lists / curl-library / Single Mail


How to force usage TLS instead of SSL

From: Praveen Pvs <>
Date: Thu, 13 Nov 2014 10:16:51 +0530

Hi All,

Currently i have a client application which sends some data to the server
using CURL library.

Due to SSL3 POODLE vulnerability (,
i was asked to use TLS instead of SSL.

I was wondering how to set these options, could any one help me with which
options i need to set to use TLS instead of SSL.

Currently I have following options set in my application:
/* Set the URL */
curl_easy_setopt(locHandle, CURLOPT_URL, szTmpURL);

/* Set the connection timeout */
curl_easy_setopt(locHandle, CURLOPT_CONNECTTIMEOUT, hostDef.conTimeOut);

/* Set the response timeout */
curl_easy_setopt(locHandle, CURLOPT_TIMEOUT,
hostDef.conTimeOut + hostDef.respTimeOut);

curl_easy_setopt(handle, CURLOPT_NOSIGNAL, 1L);

/* Set the HTTP post option */
curl_easy_setopt(handle, CURLOPT_POST, 1L);

/* Add the headers */
curl_easy_setopt(handle, CURLOPT_HTTPHEADER, headers);

/* Add the debug function */
curl_easy_setopt(handle, CURLOPT_DEBUGFUNCTION, curlDbgFunc);

curl_easy_setopt(handle, CURLOPT_SSL_VERIFYPEER, 1L);
curl_easy_setopt(handle, CURLOPT_SSL_VERIFYHOST, 2L);

/* Set the CA certificate */
curl_easy_setopt(handle, CURLOPT_CAINFO, CA_CERT_FILE);

/* Set the write function */
curl_easy_setopt(handle, CURLOPT_WRITEFUNCTION, saveResponse);

/* Set the detection as TRUE for HTTP errors */
curl_easy_setopt(handle, CURLOPT_FAILONERROR, PAAS_TRUE);

Please let me know if any more information is required. Thank you for your
time and help.


List admin:
Received on 2014-11-13