File tree Expand file tree Collapse file tree 2 files changed +7
-3
lines changed
Expand file tree Collapse file tree 2 files changed +7
-3
lines changed Original file line number Diff line number Diff line change @@ -166,8 +166,12 @@ def __init__(
166166 if self .server_config .type == APIType .LOCAL and verify_ssl :
167167 # To avoid security issues while authentication to local API, we add the following authority to
168168 # our HTTPS client trust store: https://ca.overkiz.com/overkiz-root-ca-2048.crt
169- # Create a new SSL context to avoid mutating the shared global context
170- self ._ssl = _create_local_ssl_context ()
169+ # Create a copy of the SSL context to avoid mutating the shared global context
170+ self ._ssl = ssl .SSLContext (SSL_CONTEXT_LOCAL_API .protocol )
171+ self ._ssl .load_verify_locations (
172+ cafile = os .path .dirname (os .path .realpath (__file__ ))
173+ + "/overkiz-root-ca-2048.crt"
174+ )
171175
172176 # Disable strict validation introduced in Python 3.13, which doesn't
173177 # work with Overkiz self-signed gateway certificates
Original file line number Diff line number Diff line change @@ -37,7 +37,7 @@ def create_server_config(
3737 configuration_url : str | None = None ,
3838) -> ServerConfig :
3939 """Generate server configuration with the provided endpoint and metadata."""
40- # ServerConfig.__init__ handles the enum conversion, but mypy doesn't recognize
40+ # TODO fix: ServerConfig.__init__ handles the enum conversion, but mypy doesn't recognize
4141 # this due to attrs @define decorator generating __init__ with stricter signatures,
4242 # so we need type: ignore comments.
4343 return ServerConfig (
You can’t perform that action at this time.
0 commit comments