Home > Software engineering >  CURL using certificates access HTTPS CURLE_SSL_CERTPROBLEM return error
CURL using certificates access HTTPS CURLE_SSL_CERTPROBLEM return error

Time:09-23

Curl_easy_setopt (mycurl curl, CURLOPT_SSL_VERIFYPEER, 1);
Curl_easy_setopt (mycurl. Curl, CURLOPT_SSL_VERIFYHOST, 0);
Curl_easy_setopt (mycurl curl, CURLOPT_SSLCERT, "ca. Pem");
Curl_easy_setopt (mycurl curl, CURLOPT_POST, 1);
Curl_easy_setopt (mycurl curl, CURLOPT_POSTFIELDSIZE, strlen (postFields. C_str ()));
Curl_easy_setopt (mycurl curl, CURLOPT_POSTFIELDS, postFields c_str ());



Just run the third line of code, execute the following code will return an error CURLE_SSL_CERTPROBLEM, certificate I use openssl transformation, where is the problem?
CURLcode res=curl_easy_perform (mycurl - & gt; The curl);

CodePudding user response:

The corresponding certificate is not recognized, you create your own,
  • Related