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 authored and popcornmix committed Apr 3, 2020
1 parent de4b541 commit 2f7a50c
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions xbmc/interfaces/python/XBPython.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -589,6 +589,12 @@ bool XBPython::OnScriptInitialized(ILanguageInvoker *invoker)
#endif
#endif

#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

Py_Initialize();

// If this is not the first time we initialize Python, the interpreter
Expand Down

0 comments on commit 2f7a50c

Please sign in to comment.