Hack around TLS v1.2 issue that causes machines to spuriously go offline

This commit is contained in:
Cameron Gutman 2018-03-28 01:02:45 -07:00
parent ddd7310e38
commit b186c42bf0

View File

@ -86,6 +86,9 @@ int http_request(char* url, PHTTP_DATA data) {
curl_easy_setopt(curl, CURLOPT_WRITEDATA, data); curl_easy_setopt(curl, CURLOPT_WRITEDATA, data);
curl_easy_setopt(curl, CURLOPT_URL, url); curl_easy_setopt(curl, CURLOPT_URL, url);
// HACK: Connecting with TLS v1.2 causes unexpected TLS alerts
curl_easy_setopt(curl, CURLOPT_SSLVERSION, CURL_SSLVERSION_TLSv1_1);
if (data->size > 0) { if (data->size > 0) {
free(data->memory); free(data->memory);
data->memory = malloc(1); data->memory = malloc(1);