openssl/ssl
Sergey Kandaurov 403ba31a02 Preserve connection custom extensions in SSL_set_SSL_CTX()
The SSL_set_SSL_CTX() function is used to switch SSL contexts for
the given SSL object.  If contexts differ, this includes updating
a cert structure with custom extensions from the new context.  This
however overwrites connection custom extensions previously set on
top of inherited from the old context.

The fix is to preserve connection custom extensions using a newly
introduced flag SSL_EXT_FLAG_CONN in custom_ext_copy_conn().
Similar to custom_ext_copy(), it is a no-op if there are no custom
extensions to copy.

The only such consumer is ossl_quic_tls_configure() used to set the
"quic_transport_parameters" extension.  Before this change, context
switch resulted in transport parameters not being sent due to the
missing extension.

Initially reported at https://github.com/nginx/nginx/issues/711

Reviewed-by: Tomas Mraz <tomas@openssl.org>
Reviewed-by: Matt Caswell <matt@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/27706)
2025-06-20 15:55:29 +01:00
..
quic Begin incorporating stdbool usage when json encoding 2025-06-13 11:26:46 -04:00
record Fix DTLS handling when receiving a no_renegotiation alert 2025-06-04 17:21:16 +02:00
rio ossl_rio_poll_builder_add_fd(): Fixup pfds after reallocation 2025-06-13 12:37:50 +02:00
statem Preserve connection custom extensions in SSL_set_SSL_CTX() 2025-06-20 15:55:29 +01:00
bio_ssl.c Copyright year updates 2025-03-12 13:35:59 +00:00
build.info Move ssl_err.c into libcrypto 2025-03-01 14:46:03 -05:00
d1_lib.c Copyright year updates 2025-03-12 13:35:59 +00:00
d1_msg.c Copyright year updates 2025-03-12 13:35:59 +00:00
d1_srtp.c Copyright year updates 2025-03-12 13:35:59 +00:00
methods.c Update some inclusions of <openssl/macros.h> 2019-11-07 11:37:25 +01:00
pqueue.c Stop raising ERR_R_MALLOC_FAILURE in most places 2022-10-05 14:02:03 +02:00
priority_queue.c Copyright year updates 2024-09-05 09:35:49 +02:00
s3_enc.c Copyright year updates 2025-03-12 13:35:59 +00:00
s3_lib.c s3_lib.c: Use illegal_parameter for failing encapsulation in ml_kem 2025-05-16 11:11:07 +02:00
s3_msg.c Copyright year updates 2025-03-12 13:35:59 +00:00
ssl_asn1.c RFC7250 (RPK) support 2023-03-28 13:49:54 -04:00
ssl_cert.c Ensure we pass the user SSL object for the SSL_set_verify callback 2025-06-17 16:12:39 -04:00
ssl_cert_comp.c Copyright year updates 2025-03-12 13:35:59 +00:00
ssl_cert_table.h Make ssl_cert_info read-only 2023-11-27 07:51:33 +00:00
ssl_ciph.c Copyright year updates 2025-03-12 13:35:59 +00:00
ssl_conf.c Add SSL_CTX_set_ec_point_formats() and SSL_set_ec_point_formats() 2025-04-14 14:56:40 +01:00
ssl_err_legacy.c Copyright year updates 2025-03-12 13:35:59 +00:00
ssl_init.c Copyright year updates 2025-03-12 13:35:59 +00:00
ssl_lib.c Preserve connection custom extensions in SSL_set_SSL_CTX() 2025-06-20 15:55:29 +01:00
ssl_local.h Preserve connection custom extensions in SSL_set_SSL_CTX() 2025-06-20 15:55:29 +01:00
ssl_mcnf.c Copyright year updates 2024-09-05 09:35:49 +02:00
ssl_rsa.c Copyright year updates 2025-03-12 13:35:59 +00:00
ssl_rsa_legacy.c Copyright year updates 2025-03-12 13:35:59 +00:00
ssl_sess.c Stop a TLSv1.3 server emitting an unsolicited PSK extension 2025-05-13 14:12:21 +02:00
ssl_stat.c Copyright year updates 2025-03-12 13:35:59 +00:00
ssl_txt.c Copyright year updates 2024-09-05 09:35:49 +02:00
ssl_utst.c Remove the old buffer management code 2022-10-20 14:39:33 +01:00
t1_enc.c Copyright year updates 2025-03-12 13:35:59 +00:00
t1_lib.c ssl/t1_lib.c: Free gix if sk_TLS_GROUP_IX_push() fails to avoid memory leak 2025-05-19 08:38:25 +02:00
t1_trce.c Fix duplicate cipher definition in ssl/t1_trce.c 2025-04-15 15:53:26 +01:00
tls13_enc.c Ensure client read app data secret change occurs after write for QUIC 2025-06-03 17:06:31 +01:00
tls_depr.c Copyright year updates 2025-03-12 13:35:59 +00:00
tls_srp.c Copyright year updates 2025-03-12 13:35:59 +00:00