Выполняя этот код, я получаю сообщение об ошибке «curl_easy_perform () failed: SSL peer certificate or S SH remote key was not OK»
#include <stdio.h>
#include <curl/curl.h>
int main(void)
{
CURL* curl;
CURLcode res;
curl = curl_easy_init();
if (curl) {
/* First set the URL that is about to receive our POST. This URL can
just as well be a https:// URL if that is what should receive the
data. */
curl_easy_setopt(curl, CURLOPT_URL, "https://www.quandl.com/api/v3/datasets/WIKI/FB/data.json?api_key=MY-CODE-HERE");
curl_easy_setopt(curl, CURLOPT_HTTPGET, 1);
/* Perform the request, res will get the return code */
res = curl_easy_perform(curl);
if (res != CURLE_OK)
{
fprintf(stderr, "curl_easy_perform() failed: %s\n", curl_easy_strerror(res));
}
/* always cleanup */
curl_easy_cleanup(curl);
}
return 0;
}
На веб-сайте quandl есть пример, использующий именно этот Получить запрос. Хотя он использует curl.exe, но я не думаю, что он имеет к этому какое-либо отношение.
Нет, где на веб-сайте quandl упоминается, как получить сертификат или ключ, поэтому мои первоначальные мысли заключаются в том, что они не разрешайте использовать libcurl напрямую ИЛИ curl.exe извлекает некоторые сертификаты с сервера quandl.
Я также пробовал google.com и получил ту же ошибку.
Кто-нибудь сталкивался с этим?
EDIT
Я не хочу обходить проверку SSL.