Skip to content

Return None from master_key() for TLS 1.3 connections - #1545

Open
jaipaulcheernam wants to merge 1 commit into
pyca:mainfrom
jaipaulcheernam:master-key-tls13-none
Open

jaipaulcheernam wants to merge 1 commit into
pyca:mainfrom
jaipaulcheernam:master-key-tls13-none

Conversation

@jaipaulcheernam

Copy link
Copy Markdown

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 #1544

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 pyca#1544
halstead pushed a commit to openembedded/openembedded-core that referenced this pull request Nov 2, 2026
- Patch is needed for openssl 4.1.0 upgrade and working on 4.0.3 as well
- PR is opened upstream pyca/pyopenssl#1545

ptest results:
  PASS: 432
  FAIL: 0
  ERROR: 0
  TOTAL: 1  FAIL: 0

Signed-off-by: Jaipaul Cheernam <jaipaul.cheernam@est.tech>
Signed-off-by: Mathieu Dubois-Briand <mathieu.dubois-briand@bootlin.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

Connection.master_key() raises OpenSSL.SSL.Error([]) on TLS 1.3 connections with openssl 4.1.0

1 participant