Skip to content

Commit

Permalink
Remove fallback for antique OpenSSL without TLS 1.2 (#1343)
Browse files Browse the repository at this point in the history
  • Loading branch information
alex authored Aug 5, 2024
1 parent 15ab815 commit 3ada747
Showing 1 changed file with 1 addition and 10 deletions.
11 changes: 1 addition & 10 deletions tests/test_ssl.py
Original file line number Diff line number Diff line change
Expand Up @@ -598,19 +598,10 @@ def test_method(self):
`SSLv3_METHOD`, `SSLv23_METHOD`, `TLSv1_METHOD`, `TLSv1_1_METHOD`,
or `TLSv1_2_METHOD`.
"""
methods = [SSLv23_METHOD, TLSv1_METHOD]
methods = [SSLv23_METHOD, TLSv1_METHOD, TLSv1_1_METHOD, TLSv1_2_METHOD]
for meth in methods:
Context(meth)

maybe = [TLSv1_1_METHOD, TLSv1_2_METHOD]
for meth in maybe:
try:
Context(meth)
except (Error, ValueError):
# Some versions of OpenSSL have SSLv2 / TLSv1.1 / TLSv1.2, some
# don't. Difficult to say in advance.
pass

with pytest.raises(TypeError):
Context("")
with pytest.raises(ValueError):
Expand Down

0 comments on commit 3ada747

Please sign in to comment.