Skip to content

Commit

Permalink
python: use kodi provided cert if available
Browse files Browse the repository at this point in the history
  • Loading branch information
FernetMenta committed Jul 10, 2016
1 parent 907515b commit d63eea3
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions xbmc/interfaces/python/XBPython.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -593,9 +593,12 @@ bool XBPython::OnScriptInitialized(ILanguageInvoker *invoker)
CEnvironment::putenv(buf);
buf = "OS=win32";
CEnvironment::putenv(buf);
#endif

#elif defined(TARGET_ANDROID)
setenv("SSL_CERT_FILE", CSpecialProtocol::TranslatePath("special://xbmc/system/certs/cacert.pem").c_str(), 1);
#if !defined(TARGET_WINDOWS)
// use Kodi provided cert if available
if (XFILE::CFile::Exists("special://xbmc/system/certs/cacert.pem"))
setenv("SSL_CERT_FILE", CSpecialProtocol::TranslatePath("special://xbmc/system/certs/cacert.pem").c_str(), 1);
#endif

if (PyEval_ThreadsInitialized())
Expand Down

0 comments on commit d63eea3

Please sign in to comment.