deleted file mode 100644
@@ -1,66 +0,0 @@
-From a0d7c02047a991ad2bd32621ac5f1b57062dc296 Mon Sep 17 00:00:00 2001
-From: Jaipaul Cheernam <jaipaul.cheernam@est.tech>
-Date: Thu, 29 Oct 2026 07:44:15 +0000
-Subject: [PATCH] Return None from master_key() for TLS 1.3 connections
-
-TLS 1.3 has no master secret, so SSL_SESSION_get_master_key() reports a
-length of 0. master_key() asserted length > 0 and raised
-OpenSSL.SSL.Error([]) for TLS 1.3 connections; return None instead,
-matching the existing bytes | None return type.
-
-Fixes https://github.com/pyca/pyopenssl/issues/1544
-
-Upstream-Status: Submitted [https://github.com/pyca/pyopenssl/pull/1545]
-
-Note: Exclude ChangeLog change for backport
-
-Signed-off-by: Jaipaul Cheernam <jaipaul.cheernam@est.tech>
----
- src/OpenSSL/SSL.py | 7 +++++--
- tests/test_ssl.py | 8 +++++++-
- 2 files changed, 12 insertions(+), 3 deletions(-)
-
-diff --git a/src/OpenSSL/SSL.py b/src/OpenSSL/SSL.py
-index b7d5887..15ac4ab 100644
---- a/src/OpenSSL/SSL.py
-+++ b/src/OpenSSL/SSL.py
-@@ -2803,14 +2803,17 @@ class Connection:
- """
- Retrieve the value of the master key for this session.
-
-- :return: A string representing the state
-+ :return: The master key, or :obj:`None` if there is no session or the
-+ connection uses TLS 1.3, which has no master secret.
- """
- session = _lib.SSL_get_session(self._ssl)
- if session == _ffi.NULL:
- return None
-
- length = _lib.SSL_SESSION_get_master_key(session, _ffi.NULL, 0)
-- _openssl_assert(length > 0)
-+ # TLS 1.3 has no master secret, so the length is 0.
-+ if length == 0:
-+ return None
- outp = _no_zero_allocator("unsigned char[]", length)
- _lib.SSL_SESSION_get_master_key(session, outp, length)
- return _ffi.buffer(outp, length)[:]
-diff --git a/tests/test_ssl.py b/tests/test_ssl.py
-index a551fc7..085ab35 100644
---- a/tests/test_ssl.py
-+++ b/tests/test_ssl.py
-@@ -4259,8 +4259,13 @@ class TestMemoryBIO:
- # speaking any more.
- assert interact_in_memory(client_conn, server_conn) is None
-
-- # Now that the handshake is done, there should be a key and nonces.
-- assert server_conn.master_key() is not None
-+ # Now that the handshake is done, there should be nonces. For TLS <=
-+ # 1.2 there is also a master secret; TLS 1.3 has none, so master_key()
-+ # may be None there (it is with OpenSSL 4.1+) and must not raise.
-+ if server_conn.get_protocol_version() < TLS1_3_VERSION:
-+ assert server_conn.master_key() is not None
-+ else:
-+ server_conn.master_key()
- assert server_conn.client_random() is not None
- assert server_conn.server_random() is not None
- assert server_conn.client_random() == client_conn.client_random()
similarity index 81%
rename from meta/recipes-devtools/python/python3-pyopenssl_26.4.0.bb
rename to meta/recipes-devtools/python/python3-pyopenssl_26.5.1.bb
@@ -5,8 +5,8 @@ LIC_FILES_CHKSUM = "file://LICENSE;md5=3b83ef96387f14655fc854ddc3c6bd57"
DEPENDS += "openssl python3-cryptography"
-SRC_URI += "file://0001-Return-None-from-master_key-for-TLS-1.3-connections.patch"
-SRC_URI[sha256sum] = "28dfcce0162b9211413e26dfbfdf1d24317fbeba18fc93c12400a1856b2a0bc7"
+SRC_URI += "${PYPI_SRC_URI}"
+SRC_URI[sha256sum] = "390635a570ced549027a8cad18315b2a08c6c6fa06a71d6ad0cd3bb40bb1fcaa"
inherit pypi setuptools3 ptest-python-pytest
Hello, this email is a notification from the Auto Upgrade Helper that the automatic attempt to upgrade the recipe(s) *python3-pyopenssl* to *26.5.1* has Succeeded. Next steps: - apply the patch: git am 0001-python3-pyopenssl-upgrade-26.4.0-26.5.1.patch - check the changes to upstream patches and summarize them in the commit message, - compile an image that contains the package - perform some basic sanity tests - amend the patch and sign it off: git commit -s --reset-author --amend - send it to the appropriate mailing list Alternatively, if you believe the recipe should not be upgraded at this time, you can fill RECIPE_NO_UPDATE_REASON in respective recipe file so that automatic upgrades would no longer be attempted. Please review the attached files for further information and build/update failures. Any problem please file a bug at https://bugzilla.yoctoproject.org/enter_bug.cgi?product=Automated%20Update%20Handler Regards, The Upgrade Helper -- >8 -- From 51743ae227c61eed547beebe2643fd02dca3e80c Mon Sep 17 00:00:00 2001 From: Upgrade Helper <auh@yoctoproject.org> Date: Wed, 2 Dec 2026 06:01:11 +0000 Subject: [PATCH] python3-pyopenssl: upgrade 26.4.0 -> 26.5.1 26.5.1 (2026-12-02) ------------------- Backward-incompatible changes: ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ Deprecations: ^^^^^^^^^^^^^ Changes: ^^^^^^^^ - Fixed invalid markup in the changelog that prevented 26.5.0 from being uploaded to PyPI. There are no other changes from 26.5.0. 26.5.0 (2026-12-02) ------------------- Backward-incompatible changes: ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - ``OpenSSL.crypto.X509.set_serial_number()`` now raises ``ValueError`` for a negative serial number, which `RFC 5280 section 4.1.2.2 <https://datatracker.ietf.org/doc/html/rfc5280#section-4.1.2.2>`_ does not permit. Passing one previously crashed the interpreter. [`#1534 < >`_] Deprecations: ^^^^^^^^^^^^^ Changes: ^^^^^^^^ - Fixed a race in which an exception raised by a verify, ALPN selection, OCSP, or DTLS cookie callback for one ``Connection`` could be raised on an unrelated ``Connection`` created from the same ``Context`` and used concurrently from another thread. Exceptions from these callbacks are now tracked per ``Connection``. Discovered and reported by SecDim Security Research. - Fixed exceptions raised by a verify callback registered with ``Connection.set_verify`` being swallowed instead of being propagated to the caller. - ``Connection.master_key()`` now returns ``None`` for TLS 1.3 connections, which have no master secret, instead of raising ``OpenSSL.SSL.Error``. - Maximum supported ``cryptography`` version is now 51.x. --- ...m-master_key-for-TLS-1.3-connections.patch | 66 ------------------- ..._26.4.0.bb => python3-pyopenssl_26.5.1.bb} | 4 +- 2 files changed, 2 insertions(+), 68 deletions(-) delete mode 100644 meta/recipes-devtools/python/python3-pyopenssl/0001-Return-None-from-master_key-for-TLS-1.3-connections.patch rename meta/recipes-devtools/python/{python3-pyopenssl_26.4.0.bb => python3-pyopenssl_26.5.1.bb} (81%)