I am using curl to simply verify if an https site has a valid SSL certificate. My code to check it is :
CURL *curl = curl_easy_init();
CURLcode res;
int verifyresult;
curl_easy_setopt(curl, CURLOPT_URL, urlHttps.c_str());
res = curl_easy_perform(curl);
curl_easy_getinfo(curl, CURLINFO_SSL_VERIFYRESULT, &verifyresult);
cout << "Verify https : " << verifyresult << endl;
curl_easy_cleanup(curl);
The site I am checking has a valid certificate but curl_easy_getinfo() return 20 instead of 0. And the thing is also that the 20 return code doesn't exist : https://curl.haxx.se/libcurl/c/libcurl-errors.html So what is this 20 error code and why doesn't it returns a 0 error code?