Skip to content
Extraits de code Groupes Projets
Vérifiée Valider 4a6264cd rédigé par Kubat's avatar Kubat
Parcourir les fichiers

Fix the 'SSL peer certificate or SSH remote key was not OK' on Fedora.

Set CURLOPT_SSL_VERIFYPEER and CURLOPT_SSL_VERIFYHOST to 0 for the
easy_perform, this is not ok in any way, but should works (be aware of
MITM attacks)
parent 27b875dc
Branches
Étiquettes
1 requête de fusion!151Fix the 'SSL peer certificate or SSH remote key was not OK' on Fedora.
...@@ -235,8 +235,12 @@ __json_dl(const char *url, char **json) ...@@ -235,8 +235,12 @@ __json_dl(const char *url, char **json)
curl_easy_setopt(curl_handle, CURLOPT_WRITEFUNCTION, __write_mem); curl_easy_setopt(curl_handle, CURLOPT_WRITEFUNCTION, __write_mem);
curl_easy_setopt(curl_handle, CURLOPT_WRITEDATA, (void *) &file); curl_easy_setopt(curl_handle, CURLOPT_WRITEDATA, (void *) &file);
curl_easy_setopt(curl_handle, CURLOPT_USERAGENT, "libcurl-agent/1.0"); curl_easy_setopt(curl_handle, CURLOPT_USERAGENT, "libcurl-agent/1.0");
res = curl_easy_perform(curl_handle);
// 'SSL peer certificate or SSH remote key was not OK' on Fedora
curl_easy_setopt(curl_handle, CURLOPT_SSL_VERIFYPEER, 0);
curl_easy_setopt(curl_handle, CURLOPT_SSL_VERIFYHOST, 0);
res = curl_easy_perform(curl_handle);
if (res != CURLE_OK) { if (res != CURLE_OK) {
LOG_ERROR("CURL", "curl_easy_perform failed on url %s: %s", url, curl_easy_strerror(res)); LOG_ERROR("CURL", "curl_easy_perform failed on url %s: %s", url, curl_easy_strerror(res));
goto err; goto err;
......
0% Chargement en cours ou .
You are about to add 0 people to the discussion. Proceed with caution.
Veuillez vous inscrire ou vous pour commenter