Use ca configuration if defined

This commit is contained in:
kidburglar 2019-08-17 21:28:47 +02:00
parent 0f284e7329
commit e99db76a92
2 changed files with 8 additions and 2 deletions

View File

@ -129,6 +129,11 @@ class SyncplayClient(object):
self._serverSupportsTLS = True self._serverSupportsTLS = True
"""Override certPath if defined in the configuration"""
if config['ca']:
certPath = config['ca']
os.environ['SSL_CERT_FILE'] = certPath
if constants.LIST_RELATIVE_CONFIGS and 'loadedRelativePaths' in self._config and self._config['loadedRelativePaths']: if constants.LIST_RELATIVE_CONFIGS and 'loadedRelativePaths' in self._config and self._config['loadedRelativePaths']:
paths = "; ".join(self._config['loadedRelativePaths']) paths = "; ".join(self._config['loadedRelativePaths'])
self.ui.showMessage(getMessage("relative-config-notification").format(paths), noPlayer=True, noTimestamp=True) self.ui.showMessage(getMessage("relative-config-notification").format(paths), noPlayer=True, noTimestamp=True)

View File

@ -92,7 +92,8 @@ class ConfigurationGetter(object):
"notificationTimeout": 3, "notificationTimeout": 3,
"alertTimeout": 5, "alertTimeout": 5,
"chatTimeout": 7, "chatTimeout": 7,
"publicServers": [] "publicServers": [],
"ca": None
} }
self._defaultConfig = self._config.copy() self._defaultConfig = self._config.copy()
@ -191,7 +192,7 @@ class ConfigurationGetter(object):
"autoplayInitialState", "mediaSearchDirectories", "autoplayInitialState", "mediaSearchDirectories",
"sharedPlaylistEnabled", "loopAtEndOfPlaylist", "sharedPlaylistEnabled", "loopAtEndOfPlaylist",
"loopSingleFiles", "loopSingleFiles",
"onlySwitchToTrustedDomains", "trustedDomains", "publicServers"], "onlySwitchToTrustedDomains", "trustedDomains", "publicServers", "ca"],
"gui": [ "gui": [
"showOSD", "showOSDWarnings", "showSlowdownOSD", "showOSD", "showOSDWarnings", "showSlowdownOSD",
"showDifferentRoomOSD", "showSameRoomOSD", "showDifferentRoomOSD", "showSameRoomOSD",