File tree Expand file tree Collapse file tree 3 files changed +13
-2
lines changed Expand file tree Collapse file tree 3 files changed +13
-2
lines changed Original file line number Diff line number Diff line change 11"""Version of nc_py_api."""
22
3- __version__ = "0.18.1 "
3+ __version__ = "0.18.2 "
Original file line number Diff line number Diff line change 3333SSL certificates (a.k.a CA bundle) used to verify the identity of requested hosts. Either **True** (default CA bundle),
3434a path to an SSL certificate file, or **False** (which will disable verification)."""
3535str_val = environ .get ("NPA_NC_CERT" , "True" )
36- NPA_NC_CERT = True
36+ # https://github.com/encode/httpx/issues/302
37+ # when "httpx" will switch to use "truststore" by default - uncomment next line
38+ # NPA_NC_CERT = True
3739if str_val .lower () in ("false" , "0" ):
3840 NPA_NC_CERT = False
3941elif str_val .lower () not in ("true" , "1" ):
4042 NPA_NC_CERT = str_val
43+ else :
44+ # Temporary workaround, see comment above.
45+ # Use system certificate stores
46+
47+ import ssl
48+ import truststore
49+
50+ NPA_NC_CERT = truststore .SSLContext (ssl .PROTOCOL_TLS_CLIENT )
4151
4252CHUNKED_UPLOAD_V2 = environ .get ("CHUNKED_UPLOAD_V2" , True )
4353"""Option to enable/disable **version 2** chunked upload(better Object Storages support).
Original file line number Diff line number Diff line change @@ -50,6 +50,7 @@ dependencies = [
5050 " pydantic>=2.1.1" ,
5151 " python-dotenv>=1" ,
5252 " xmltodict>=0.13" ,
53+ " truststore==0.10.0" ,
5354]
5455optional-dependencies.app = [
5556 " uvicorn[standard]>=0.23.2" ,
You can’t perform that action at this time.
0 commit comments