Skip to content

Commit

Permalink
RDBC-788 Make CA path optional
Browse files Browse the repository at this point in the history
  • Loading branch information
poissoncorp committed Jan 22, 2024
1 parent 3b1ce3e commit def555a
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions ravendb/changes/database_changes.py
Original file line number Diff line number Diff line change
Expand Up @@ -88,8 +88,9 @@ def _connect_websocket_secured(self, url: str) -> None:
server_certificate = base64.b64decode(self._get_server_certificate())
ssl_context = ssl.SSLContext(ssl.PROTOCOL_TLSv1_2)
ssl_context.load_cert_chain(self._request_executor.certificate_path)
ssl_context.load_verify_locations(self._request_executor.trust_store_path)
ssl_context.verify_mode = ssl.CERT_REQUIRED
if self._request_executor.trust_store_path:
ssl_context.verify_mode = ssl.CERT_REQUIRED
ssl_context.load_verify_locations(self._request_executor.trust_store_path)

# Create SSL WebSocket and connect it
self.client_websocket = WebSocket(sslopt={"context": ssl_context})
Expand Down

0 comments on commit def555a

Please sign in to comment.