Skip to content

Commit

Permalink
UWP curl https fix - CURLOPT_CAINFO required
Browse files Browse the repository at this point in the history
  • Loading branch information
Chicopower committed Jun 8, 2021
1 parent db745ac commit 4411206
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion xbmc/filesystem/CurlFile.cpp
Expand Up @@ -675,9 +675,12 @@ void CCurlFile::SetCommonOptions(CReadState* state, bool failOnError /* = true *
// set CA bundle file
std::string caCert = CSpecialProtocol::TranslatePath(
CServiceBroker::GetSettingsComponent()->GetAdvancedSettings()->m_caTrustFile);
#ifdef TARGET_WINDOWS_STORE
// UWP Curl - Setting CURLOPT_CAINFO with a valid cacert file path is required for UWP
g_curlInterface.easy_setopt(h, CURLOPT_CAINFO, "system\\certs\\cacert.pem");
#endif
if (!caCert.empty() && XFILE::CFile::Exists(caCert))
g_curlInterface.easy_setopt(h, CURLOPT_CAINFO, caCert.c_str());

}

void CCurlFile::SetRequestHeaders(CReadState* state)
Expand Down

0 comments on commit 4411206

Please sign in to comment.