diff --git a/CHANGELOG.rst b/CHANGELOG.rst index 6e23770d..4258fe8b 100644 --- a/CHANGELOG.rst +++ b/CHANGELOG.rst @@ -4,6 +4,23 @@ Changelog Versions are year-based with a strict backward-compatibility policy. The third digit is only for regressions. +24.1.0 (UNRELEASED) +------------------- + +Backward-incompatible changes: +^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + +- ``pyOpenSSL`` now sets ``SSL_MODE_ACCEPT_MOVING_WRITE_BUFFER`` by default, matching CPython's behavior. `#1287 `_. +- The minimum ``cryptography`` version is now 42.0.0. + +Deprecations: +^^^^^^^^^^^^^ + +Changes: +^^^^^^^^ + + + 24.0.0 (2024-01-22) ------------------- diff --git a/setup.py b/setup.py index 2f023168..790d3518 100644 --- a/setup.py +++ b/setup.py @@ -93,7 +93,7 @@ def find_meta(meta): packages=find_packages(where="src"), package_dir={"": "src"}, install_requires=[ - "cryptography>=41.0.5,<43", + "cryptography>=42.0.0,<43", ], extras_require={ "test": ["flaky", "pretend", "pytest>=3.0.1"], diff --git a/src/OpenSSL/SSL.py b/src/OpenSSL/SSL.py index e5c82cb7..c28596f6 100644 --- a/src/OpenSSL/SSL.py +++ b/src/OpenSSL/SSL.py @@ -223,11 +223,8 @@ except AttributeError: pass -try: - OP_LEGACY_SERVER_CONNECT = _lib.SSL_OP_LEGACY_SERVER_CONNECT - __all__.append("OP_LEGACY_SERVER_CONNECT") -except AttributeError: - pass +OP_LEGACY_SERVER_CONNECT = _lib.SSL_OP_LEGACY_SERVER_CONNECT +__all__.append("OP_LEGACY_SERVER_CONNECT") OP_ALL = _lib.SSL_OP_ALL @@ -855,8 +852,10 @@ def __init__(self, method): self._ocsp_data = None self._cookie_generate_helper = None self._cookie_verify_helper = None - - self.set_mode(_lib.SSL_MODE_ENABLE_PARTIAL_WRITE) + self.set_mode( + _lib.SSL_MODE_ENABLE_PARTIAL_WRITE + | _lib.SSL_MODE_ACCEPT_MOVING_WRITE_BUFFER + ) if version is not None: self.set_min_proto_version(version) self.set_max_proto_version(version) diff --git a/tox.ini b/tox.ini index d0543d6a..771a0c74 100644 --- a/tox.ini +++ b/tox.ini @@ -18,7 +18,7 @@ extras = test deps = coverage>=4.2 - cryptographyMinimum: cryptography==41.0.5 + cryptographyMinimum: cryptography==42.0.0 randomorder: pytest-randomly setenv = # Do not allow the executing environment to pollute the test environment