File tree Expand file tree Collapse file tree 2 files changed +4
-20
lines changed Expand file tree Collapse file tree 2 files changed +4
-20
lines changed Original file line number Diff line number Diff line change 9898 WriteError ,
9999)
100100from pymongo .operations import InsertOne , ReplaceOne , UpdateOne
101- from pymongo .ssl_support import get_ssl_context
102101from pymongo .write_concern import WriteConcern
103102
104103_IS_SYNC = False
@@ -2879,15 +2878,8 @@ async def asyncSetUp(self):
28792878 async def http_post (self , path , data = None ):
28802879 # Note, the connection to the mock server needs to be closed after
28812880 # each request because the server is single threaded.
2882- ctx : ssl .SSLContext = get_ssl_context (
2883- CLIENT_PEM , # certfile
2884- None , # passphrase
2885- CA_PEM , # ca_certs
2886- None , # crlfile
2887- False , # allow_invalid_certificates
2888- False , # allow_invalid_hostnames
2889- False , # disable_ocsp_endpoint_check
2890- )
2881+ ctx = ssl .create_default_context (cafile = CA_PEM )
2882+ ctx .load_cert_chain (CLIENT_PEM )
28912883 conn = http .client .HTTPSConnection ("127.0.0.1:9003" , context = ctx )
28922884 try :
28932885 if data is not None :
Original file line number Diff line number Diff line change 9595 WriteError ,
9696)
9797from pymongo .operations import InsertOne , ReplaceOne , UpdateOne
98- from pymongo .ssl_support import get_ssl_context
9998from pymongo .synchronous import encryption
10099from pymongo .synchronous .encryption import Algorithm , ClientEncryption , QueryType
101100from pymongo .synchronous .mongo_client import MongoClient
@@ -2861,15 +2860,8 @@ def setUp(self):
28612860 def http_post (self , path , data = None ):
28622861 # Note, the connection to the mock server needs to be closed after
28632862 # each request because the server is single threaded.
2864- ctx : ssl .SSLContext = get_ssl_context (
2865- CLIENT_PEM , # certfile
2866- None , # passphrase
2867- CA_PEM , # ca_certs
2868- None , # crlfile
2869- False , # allow_invalid_certificates
2870- False , # allow_invalid_hostnames
2871- False , # disable_ocsp_endpoint_check
2872- )
2863+ ctx = ssl .create_default_context (cafile = CA_PEM )
2864+ ctx .load_cert_chain (CLIENT_PEM )
28732865 conn = http .client .HTTPSConnection ("127.0.0.1:9003" , context = ctx )
28742866 try :
28752867 if data is not None :
You can’t perform that action at this time.
0 commit comments