File tree Expand file tree Collapse file tree 2 files changed +2
-10
lines changed
src/snowflake/connector/vendored/urllib3/contrib Expand file tree Collapse file tree 2 files changed +2
-10
lines changed Original file line number Diff line number Diff line change @@ -46,7 +46,7 @@ install_requires =
4646 cffi>=1.9,<2.0.0
4747 cryptography>=3.1.0,<41.0.0
4848 oscrypto<2.0.0
49- pyOpenSSL>=16.2.0,<23 .0.0
49+ pyOpenSSL>=16.2.0,<24 .0.0
5050 pycryptodomex!=3.5.0,>=3.2,<4.0.0
5151 pyjwt<3.0.0
5252 pytz
Original file line number Diff line number Diff line change 4949
5050import OpenSSL .SSL
5151from cryptography import x509
52- from cryptography .hazmat .backends .openssl import backend as openssl_backend
53- from cryptography .hazmat .backends .openssl .x509 import _Certificate
5452
5553try :
5654 from cryptography .x509 import UnsupportedExtension
@@ -215,13 +213,7 @@ def get_subj_alt_name(peer_cert):
215213 """
216214 Given an PyOpenSSL certificate, provides all the subject alternative names.
217215 """
218- # Pass the cert to cryptography, which has much better APIs for this.
219- if hasattr (peer_cert , "to_cryptography" ):
220- cert = peer_cert .to_cryptography ()
221- else :
222- # This is technically using private APIs, but should work across all
223- # relevant versions before PyOpenSSL got a proper API for this.
224- cert = _Certificate (openssl_backend , peer_cert ._x509 )
216+ cert = peer_cert .to_cryptography ()
225217
226218 # We want to find the SAN extension. Ask Cryptography to locate it (it's
227219 # faster than looping in Python)
You can’t perform that action at this time.
0 commit comments