diff options
| author | beck <> | 2025-12-04 21:16:17 +0000 |
|---|---|---|
| committer | beck <> | 2025-12-04 21:16:17 +0000 |
| commit | dccd1f43a0c2de3852d9515f57353d756629c97a (patch) | |
| tree | 7ffb1e1927c856374b227b21ca57105f14121045 /src/lib/libssl/s3_lib.c | |
| parent | f8fcf556caab3fb1fb9d9b496d2724345c90a3eb (diff) | |
| download | openbsd-dccd1f43a0c2de3852d9515f57353d756629c97a.tar.gz openbsd-dccd1f43a0c2de3852d9515f57353d756629c97a.tar.bz2 openbsd-dccd1f43a0c2de3852d9515f57353d756629c97a.zip | |
Hook up X25519MKLEM768 to the TLS 1.3 handshake
This does the following:
1) Adds a second key share prediction to the TLS 1.3 handshake.
We only add one as we are unlikely to want to send more than
one PQ one, and one classical one and are unlikely to waste
bytes on a second PQ algorithm (anything that wants something
else that we support can HRR to get it)
2) Adds X25519MLKEM768 (4588) to our list of supported groups.
We add this to our preferred client and server key shares for TLS 1.3
and we now have a separate list for TLS 1.2 which does not do this,
cleaning up the old "full list" from the comments.
3) Updates the golden magic numbers in the regression tests to allow
for the above two things changing the handshake, so the regress
tests pass.
With this you can successfully hybrid PQ with servers and clients
that support it.
ok tb@ kenjiro@
Diffstat (limited to 'src/lib/libssl/s3_lib.c')
| -rw-r--r-- | src/lib/libssl/s3_lib.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/src/lib/libssl/s3_lib.c b/src/lib/libssl/s3_lib.c index 86b32aec15..bcf26bec40 100644 --- a/src/lib/libssl/s3_lib.c +++ b/src/lib/libssl/s3_lib.c | |||
| @@ -1,4 +1,4 @@ | |||
| 1 | /* $OpenBSD: s3_lib.c,v 1.257 2024/07/23 14:40:53 jsing Exp $ */ | 1 | /* $OpenBSD: s3_lib.c,v 1.258 2025/12/04 21:16:17 beck Exp $ */ |
| 2 | /* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) | 2 | /* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) |
| 3 | * All rights reserved. | 3 | * All rights reserved. |
| 4 | * | 4 | * |
| @@ -1286,6 +1286,7 @@ ssl3_free(SSL *s) | |||
| 1286 | sk_X509_pop_free(s->s3->hs.peer_certs_no_leaf, X509_free); | 1286 | sk_X509_pop_free(s->s3->hs.peer_certs_no_leaf, X509_free); |
| 1287 | sk_X509_pop_free(s->s3->hs.verified_chain, X509_free); | 1287 | sk_X509_pop_free(s->s3->hs.verified_chain, X509_free); |
| 1288 | tls_key_share_free(s->s3->hs.key_share); | 1288 | tls_key_share_free(s->s3->hs.key_share); |
| 1289 | tls_key_share_free(s->s3->hs.tls13.key_share); | ||
| 1289 | 1290 | ||
| 1290 | tls13_secrets_destroy(s->s3->hs.tls13.secrets); | 1291 | tls13_secrets_destroy(s->s3->hs.tls13.secrets); |
| 1291 | freezero(s->s3->hs.tls13.cookie, s->s3->hs.tls13.cookie_len); | 1292 | freezero(s->s3->hs.tls13.cookie, s->s3->hs.tls13.cookie_len); |
| @@ -1337,6 +1338,8 @@ ssl3_clear(SSL *s) | |||
| 1337 | 1338 | ||
| 1338 | tls_key_share_free(s->s3->hs.key_share); | 1339 | tls_key_share_free(s->s3->hs.key_share); |
| 1339 | s->s3->hs.key_share = NULL; | 1340 | s->s3->hs.key_share = NULL; |
| 1341 | tls_key_share_free(s->s3->hs.tls13.key_share); | ||
| 1342 | s->s3->hs.tls13.key_share = NULL; | ||
| 1340 | 1343 | ||
| 1341 | tls13_secrets_destroy(s->s3->hs.tls13.secrets); | 1344 | tls13_secrets_destroy(s->s3->hs.tls13.secrets); |
| 1342 | s->s3->hs.tls13.secrets = NULL; | 1345 | s->s3->hs.tls13.secrets = NULL; |
