Libcurl code 35 definition:
SSL CONNECT ERROR

I encountered this issue in the following two situations:

  1. SSL certificate verification. You can add corresponding headers to cancel or add verification.
1
2
3
4
5
6
7
8
9
curl_easy_setopt(curl, CURLOPT_URL, combinePath.c_str());
curl_easy_setopt(curl, CURLOPT_WRITEDATA, fp);
curl_easy_setopt(curl, CURLOPT_TIMEOUT, 10L);

curl_easy_setopt(curl, CURLOPT_SSL_VERIFYPEER, 1);
curl_easy_setopt(curl, CURLOPT_SSL_VERIFYHOST, 1);

curl_easy_setopt(curl, CURLOPT_NOSIGNAL, 1L);
curl_easy_setopt(curl, CURLOPT_WRITEFUNCTION, curlWriteFunction);
  1. Carelessness. Forgot to adjust the ‘https’ server interface to ‘http’ protocol during local debugging.