From ba6c208a3461260431583c80735bc945f2d6185b Mon Sep 17 00:00:00 2001 From: danmastrowtrusstai Date: Wed, 7 May 2025 17:16:19 +1000 Subject: [PATCH] Fix: Incorrect SSL context Without this change you're unable to connect to MyPureCloud APIs --- build/PureCloudPlatformClientV2/configuration.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/build/PureCloudPlatformClientV2/configuration.py b/build/PureCloudPlatformClientV2/configuration.py index 5c7f93965a..6dff451136 100644 --- a/build/PureCloudPlatformClientV2/configuration.py +++ b/build/PureCloudPlatformClientV2/configuration.py @@ -155,7 +155,7 @@ def config_file_path(self, value): def create_mtls_or_ssl_context(self): if self.ssl_context is None: # set_mtls_contents() or set_mtls_certificates() were not called. - ssl_context = ssl.create_default_context(purpose=ssl.Purpose.CLIENT_AUTH) + ssl_context = ssl.create_default_context(purpose=ssl.Purpose.SERVER_AUTH) if self.ssl_ca_cert: ssl_context.load_verify_locations(cafile=self.ssl_ca_cert) @@ -382,4 +382,4 @@ def on_modified(self, event): # only respond if the config file has been modified if type(event) == FileModifiedEvent and event.src_path == self.config_file_path: if self.configuration.live_reload_config: - self.configuration._update_config_from_file() \ No newline at end of file + self.configuration._update_config_from_file()