From patchwork Fri Dec 4 19:17:22 2026 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tim Orling X-Patchwork-Id: 107472 Received: from mail-pl1-f173.google.com (mail-pl1-f173.google.com [209.85.214.173]) by mx.groups.io with SMTP id smtpd.msgproc02-g2.32.1796411975867648516 for ; Fri, 04 Dec 2026 11:19:35 -0800 Authentication-Results: mx.groups.io; dkim=pass header.i=@konsulko.com header.s=google header.b=ANGKausN; spf=pass (domain: konsulko.com, ip: 209.85.214.173, mailfrom: tim.orling@konsulko.com) Received: by mail-pl1-f173.google.com with SMTP id d9443c01a7336-2f03920c477so12285845ad.2 for ; Fri, 04 Dec 2026 11:19:35 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=konsulko.com; s=google; t=1796411975; x=1797016775; darn=lists.openembedded.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to:content-type; bh=MDezURjYbdu76gvBypPuqijLBZpj0TVq8QE/RPGArSM=; b=ANGKausNpuEstNQdk1azJX3gszqAVVbvV3vspoFSUeNjTqaLBy1qEUEBjDA3ebH0JS FmqbXCFQaPJtSgST/B1nI+lKzljv6yI8DHdgAXRqtoD9+n8pVu5I6GeJKTzgngCuuoNH u139Mo+5sXxs3t6uZ5jJVoYCqj13LDPvUazHk= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20260707; t=1796411975; x=1797016775; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-gg:x-gm-message-state:from :to:cc:subject:date:message-id:reply-to:content-type; bh=MDezURjYbdu76gvBypPuqijLBZpj0TVq8QE/RPGArSM=; b=v6F4+w7FAdT/SCkirjG17tmnurgbX6hrgR8kfZaX2Fw5B+Pl22OJt2qoEEibRo2las LNBP2Vqj3nuTmNr2CW3Lw1pSt7T8Q8M22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hc= X-Received: by 2002:a17:902:cf04:b0:2f1:6255:589e with SMTP id d9443c01a7336-2f1ba16eff8mr28107595ad.27.1796411975123; Fri, 04 Dec 2026 11:19:35 -0800 (PST) Return-Path: Received: from localhost ([2606:c800:6024:2000:5eeb:9d70:b81f:8b6]) by smtp.gmail.com with ESMTPSA id d9443c01a7336-2f1b78f92b3sm17842635ad.21.2026.12.04.11.19.34 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 04 Dec 2026 11:19:34 -0800 (PST) From: Tim Orling To: openembedded-core@lists.openembedded.org Cc: Tim Orling Subject: [PATCH 5/7] python3-pyopenssl: upgrade 26.4.0 -> 26.5.1 Date: Fri, 4 Dec 2026 11:17:22 -0800 Message-ID: <20261204191922.676542-5-tim.orling@konsulko.com> X-Mailer: git-send-email 2.47.3 In-Reply-To: <20261204191922.676542-1-tim.orling@konsulko.com> References: <20261204191922.676542-1-tim.orling@konsulko.com> MIME-Version: 1.0 List-Id: X-Webhook-Received: from 45-33-107-173.ip.linodeusercontent.com [45.33.107.173] by lin-tor-korg-lkml-alma10-1 with HTTPS for ; Fri, 04 Dec 2026 19:19:36 -0000 X-Groupsio-URL: https://lists.openembedded.org/g/openembedded-core/message/252096 Drop the master_key() TLS 1.3 patch, merged upstream in 26.5.0. 26.5.0 also allows cryptography 51.x, which the next commit needs, and fixes a race in callback exception handling between connections that share a Context. Changelog: https://github.com/pyca/pyopenssl/blob/26.5.1/CHANGELOG.rst Tested with core-image-ptest-python3-pyopenssl on qemux86-64. AI-Generated: Uses Claude Code (Claude Opus 5.5) Signed-off-by: Tim Orling --- Test results: ptest on qemux86-64 (KVM): 434 passed, 1 skipped, 0 failed. ...m-master_key-for-TLS-1.3-connections.patch | 66 ------------------- ..._26.4.0.bb => python3-pyopenssl_26.5.1.bb} | 3 +- 2 files changed, 1 insertion(+), 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%) diff --git a/meta/recipes-devtools/python/python3-pyopenssl/0001-Return-None-from-master_key-for-TLS-1.3-connections.patch b/meta/recipes-devtools/python/python3-pyopenssl/0001-Return-None-from-master_key-for-TLS-1.3-connections.patch deleted file mode 100644 index 0942cbdc56..0000000000 --- a/meta/recipes-devtools/python/python3-pyopenssl/0001-Return-None-from-master_key-for-TLS-1.3-connections.patch +++ /dev/null @@ -1,66 +0,0 @@ -From a0d7c02047a991ad2bd32621ac5f1b57062dc296 Mon Sep 17 00:00:00 2001 -From: Jaipaul Cheernam -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 ---- - 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() diff --git a/meta/recipes-devtools/python/python3-pyopenssl_26.4.0.bb b/meta/recipes-devtools/python/python3-pyopenssl_26.5.1.bb 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 index 500027fa25..0273a63e01 100644 --- a/meta/recipes-devtools/python/python3-pyopenssl_26.4.0.bb +++ b/meta/recipes-devtools/python/python3-pyopenssl_26.5.1.bb @@ -5,8 +5,7 @@ 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[sha256sum] = "390635a570ced549027a8cad18315b2a08c6c6fa06a71d6ad0cd3bb40bb1fcaa" inherit pypi setuptools3 ptest-python-pytest