Commit 6c9a20a 1 parent 53943ac commit 6c9a20a Copy full SHA for 6c9a20a
File tree 2 files changed +4
-20
lines changed
2 files changed +4
-20
lines changed Original file line number Diff line number Diff line change 98
98
WriteError ,
99
99
)
100
100
from pymongo .operations import InsertOne , ReplaceOne , UpdateOne
101
- from pymongo .ssl_support import get_ssl_context
102
101
from pymongo .write_concern import WriteConcern
103
102
104
103
_IS_SYNC = False
@@ -2879,15 +2878,8 @@ async def asyncSetUp(self):
2879
2878
async def http_post (self , path , data = None ):
2880
2879
# Note, the connection to the mock server needs to be closed after
2881
2880
# 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 )
2891
2883
conn = http .client .HTTPSConnection ("127.0.0.1:9003" , context = ctx )
2892
2884
try :
2893
2885
if data is not None :
Original file line number Diff line number Diff line change 95
95
WriteError ,
96
96
)
97
97
from pymongo .operations import InsertOne , ReplaceOne , UpdateOne
98
- from pymongo .ssl_support import get_ssl_context
99
98
from pymongo .synchronous import encryption
100
99
from pymongo .synchronous .encryption import Algorithm , ClientEncryption , QueryType
101
100
from pymongo .synchronous .mongo_client import MongoClient
@@ -2861,15 +2860,8 @@ def setUp(self):
2861
2860
def http_post (self , path , data = None ):
2862
2861
# Note, the connection to the mock server needs to be closed after
2863
2862
# 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 )
2873
2865
conn = http .client .HTTPSConnection ("127.0.0.1:9003" , context = ctx )
2874
2866
try :
2875
2867
if data is not None :
You can’t perform that action at this time.
0 commit comments