Skip to content

Commit b259bfb

Browse files
authored
Expose SSL_OP_LEGACY_SERVER_CONNECT binding (#1234)
* Expose `SSL_OP_LEGACY_SERVER_CONNECT` binding based on pyca/cryptography#9303 refs mitmproxy/mitmproxy#6281 * Update CHANGELOG.rst
1 parent a81306e commit b259bfb

File tree

2 files changed

+8
-0
lines changed

2 files changed

+8
-0
lines changed

CHANGELOG.rst

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,8 @@ Backward-incompatible changes:
1313
- Dropped support for Python 3.6.
1414
- The minimum ``cryptography`` version is now 41.0.0.
1515
- Removed ``OpenSSL.crypto.loads_pkcs7`` and ``OpenSSL.crypto.loads_pkcs12`` which had been deprecated for 3 years.
16+
- Added ``OpenSSL.SSL.OP_LEGACY_SERVER_CONNECT`` to allow legacy insecure renegotiation between OpenSSL and unpatched servers.
17+
`#1234 <https://github.com/pyca/pyopenssl/pull/1234>`_.
1618

1719
Deprecations:
1820
^^^^^^^^^^^^^

src/OpenSSL/SSL.py

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -217,6 +217,12 @@
217217
except AttributeError:
218218
pass
219219

220+
try:
221+
OP_LEGACY_SERVER_CONNECT = _lib.SSL_OP_LEGACY_SERVER_CONNECT
222+
__all__.append("OP_LEGACY_SERVER_CONNECT")
223+
except AttributeError:
224+
pass
225+
220226
OP_ALL = _lib.SSL_OP_ALL
221227

222228
VERIFY_PEER = _lib.SSL_VERIFY_PEER

0 commit comments

Comments
 (0)