File tree Expand file tree Collapse file tree 1 file changed +10
-8
lines changed Expand file tree Collapse file tree 1 file changed +10
-8
lines changed Original file line number Diff line number Diff line change 14
14
15
15
"""Support for SSL in PyMongo."""
16
16
17
+ from typing import Optional
18
+
17
19
from pymongo .errors import ConfigurationError
18
20
19
21
HAVE_SSL = True
41
43
BLOCKING_IO_ERRORS = _ssl .BLOCKING_IO_ERRORS
42
44
43
45
def get_ssl_context (
44
- certfile ,
45
- passphrase ,
46
- ca_certs ,
47
- crlfile ,
48
- allow_invalid_certificates ,
49
- allow_invalid_hostnames ,
50
- disable_ocsp_endpoint_check ,
51
- ):
46
+ certfile : Optional [ str ] ,
47
+ passphrase : Optional [ str ] ,
48
+ ca_certs : Optional [ str ] ,
49
+ crlfile : Optional [ str ] ,
50
+ allow_invalid_certificates : bool ,
51
+ allow_invalid_hostnames : bool ,
52
+ disable_ocsp_endpoint_check : bool ,
53
+ ) -> _ssl . SSLContext :
52
54
"""Create and return an SSLContext object."""
53
55
verify_mode = CERT_NONE if allow_invalid_certificates else CERT_REQUIRED
54
56
ctx = _ssl .SSLContext (_ssl .PROTOCOL_SSLv23 )
You can’t perform that action at this time.
0 commit comments