curl / Mailing Lists / curl-library / Single Mail
Buy commercial curl support from WolfSSL. We help you work out your issues, debug your libcurl applications, use the API, port to new platforms, add new features and more. With a team lead by the curl founder himself.

MbedTLS problem

From: Thomas Hua via curl-library <>
Date: Wed, 6 Jan 2021 13:06:39 +0100


I have some issues with the libcurl. I'm trying to integrate the libcurl in
my application. It's currently working fine with the protocol HTTP but when
I try to do a request with HTTPS I have this :
* Connected to ( port 443 (#0)
* mbedTLS: Connecting to
* mbedTLS: ssl_init failed
* Closing connection 0
curl_easy_perform() failed: SSL connect error

I was wondering if you could help me setup the library correctly so it
works with HTTPS.

I'm working on mingw32 which help me to configure my ESP8266.

I sent you my config file for curl it may help you.

Also here is my code

CURL *curl;
CURLcode res;

curl = curl_easy_init();

if(curl) {

curl_easy_setopt(curl, CURLOPT_URL, "");
// curl_easy_setopt(curl, CURLOPT_URL, "");

/* ask libcurl to show us the verbose output */
curl_easy_setopt(curl, CURLOPT_VERBOSE, 1L);

// curl_easy_setopt(curl, CURLOPT_NOSIGNAL, 1L);
/* is redirected, so we tell libcurl to follow redirection */
curl_easy_setopt(curl, CURLOPT_FOLLOWLOCATION, 1L);

/* Perform the request, res will get the return code */
res = curl_easy_perform(curl);
/* Check for errors */
if(res != CURLE_OK)
 fprintf(stderr, "curl_easy_perform() failed: %s\n",

/* always cleanup */

Best regards,


Received on 2021-01-06