Fix curl 421 errors when disabling verify peer
``` == Info: WARNING: disabling hostname validation also disables SNI. ``` which leads to a "431 Misdirected Request" reply for servers with shared hosting.
This commit is contained in:
@@ -103,9 +103,6 @@ _pingback (void *arg)
|
||||
|
||||
#ifdef MIXBUS
|
||||
curl_easy_setopt (h.curl (), CURLOPT_FOLLOWLOCATION, 1);
|
||||
/* do not check cert */
|
||||
curl_easy_setopt (h.curl (), CURLOPT_SSL_VERIFYPEER, 0);
|
||||
curl_easy_setopt (h.curl (), CURLOPT_SSL_VERIFYHOST, 0);
|
||||
#endif
|
||||
|
||||
ping_call* cm = static_cast<ping_call*> (arg);
|
||||
|
||||
@@ -348,8 +348,5 @@ SoundcloudUploader::setcUrlOptions()
|
||||
// Allow connections to time out (without using signals)
|
||||
curl_easy_setopt(curl_handle, CURLOPT_NOSIGNAL, 1);
|
||||
curl_easy_setopt(curl_handle, CURLOPT_CONNECTTIMEOUT, 30);
|
||||
|
||||
curl_easy_setopt(curl_handle, CURLOPT_SSL_VERIFYHOST, 0);
|
||||
curl_easy_setopt(curl_handle, CURLOPT_SSL_VERIFYPEER, 0);
|
||||
}
|
||||
|
||||
|
||||
@@ -96,6 +96,10 @@ CCurl::curl () const
|
||||
void
|
||||
CCurl::ca_setopt (CURL* c)
|
||||
{
|
||||
#if defined PLATFORM_WINDOWS || defined __APPLE__
|
||||
/* winSSL and DarwinSSL does not need this, use defaults w/VERIFYHOST */
|
||||
return;
|
||||
#endif
|
||||
if (ca_info) {
|
||||
curl_easy_setopt (c, CURLOPT_CAINFO, ca_info);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user