Skip to content

Commit

Permalink
Removed redundant code in SSL.py that depended on old version of cryp…
Browse files Browse the repository at this point in the history
…tography (#1290)
  • Loading branch information
julianz- authored Jan 28, 2024
1 parent 1508c4b commit 482b95e
Showing 1 changed file with 5 additions and 14 deletions.
19 changes: 5 additions & 14 deletions src/OpenSSL/SSL.py
Original file line number Diff line number Diff line change
Expand Up @@ -163,20 +163,11 @@
DTLS_SERVER_METHOD = 11
DTLS_CLIENT_METHOD = 12

try:
SSL3_VERSION = _lib.SSL3_VERSION
TLS1_VERSION = _lib.TLS1_VERSION
TLS1_1_VERSION = _lib.TLS1_1_VERSION
TLS1_2_VERSION = _lib.TLS1_2_VERSION
TLS1_3_VERSION = _lib.TLS1_3_VERSION
except AttributeError:
# Hardcode constants for cryptography < 3.4, see
# https://github.com/pyca/pyopenssl/pull/985#issuecomment-775186682
SSL3_VERSION = 768
TLS1_VERSION = 769
TLS1_1_VERSION = 770
TLS1_2_VERSION = 771
TLS1_3_VERSION = 772
SSL3_VERSION = _lib.SSL3_VERSION
TLS1_VERSION = _lib.TLS1_VERSION
TLS1_1_VERSION = _lib.TLS1_1_VERSION
TLS1_2_VERSION = _lib.TLS1_2_VERSION
TLS1_3_VERSION = _lib.TLS1_3_VERSION

OP_NO_SSLv2 = _lib.SSL_OP_NO_SSLv2
OP_NO_SSLv3 = _lib.SSL_OP_NO_SSLv3
Expand Down

0 comments on commit 482b95e

Please sign in to comment.