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,