openssl/ssl/quic
Neil Horman 89e2c6f61e Fix encryption level ordering
It was noticed recently that the enum for QUIC encryption levels doesn't
match the ordering that is outlined in the RFC.  RFC 9000 s. 12.2 and
RFC 9002 s 14.4.1 indicate that encryption level ordering is
INITIAL/0RTT/HANDSHAKE/1RTT, but our enum is in the order
INITAL/HANDSHAKE/0RTT/1RTT.

Our enum isn't a direct wire translation, so as long as the wire->enum
mapping done in ossl_quic_pkt_type_to_enc_level is done consistently it
ideally wouldn't matter, but because we do coalescing in
ossl_quic_tx_packetiser_generate by iterating through all the values in
the enum, its possible we may coalesce in the wrong order when we do
start implementing 0RTT support.

Fix it by adjusting the enum properly to match the RFC order.  This also
necessitates and adjustment to the archetypes array, which is a two
dimensional array indexed by encryption level and frame archetype
(PROBE/NORMAL/ACK ONLY).  Moving the 0RTT enc level to index 1 requires
moving the (formerly) index 2 0RTT array row to be at index 1.

Fixes #26324

Reviewed-by: Matt Caswell <matt@openssl.org>
Reviewed-by: Tomas Mraz <tomas@openssl.org>
Reviewed-by: Saša Nedvědický <sashan@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/26334)
2025-01-08 11:17:01 -05:00
..
build.info QLOG: Minor updates 2024-02-02 11:50:29 +00:00
cc_newreno.c Resolve some of the TODO(QUIC) items 2023-08-08 15:58:59 +02:00
json_enc.c Copyright year updates 2024-04-09 13:43:26 +02:00
qlog.c Copyright year updates 2024-04-09 13:43:26 +02:00
qlog_event_helpers.c Copyright year updates 2024-04-09 13:43:26 +02:00
quic_ackm.c If the loss detection timer has fired we may not have lost packets 2023-10-30 08:01:58 +00:00
quic_cfq.c Copyright year updates 2024-09-05 09:35:49 +02:00
quic_channel.c Copyright year updates 2024-04-09 13:43:26 +02:00
quic_channel_local.h QUIC CHANNEL: Optimise struct packing 2024-02-08 16:50:01 +00:00
quic_demux.c use-of-uninitialized-value in quic_tserver_test 2025-01-06 20:46:08 +01:00
quic_engine.c Rename list macros 2024-09-26 10:02:30 +02:00
quic_engine_local.h Minor updates 2023-12-21 08:12:06 +00:00
quic_fc.c Copyright year updates 2024-04-09 13:43:26 +02:00
quic_fifd.c Copyright year updates 2024-04-09 13:43:26 +02:00
quic_impl.c Fix SSL_write_[ex|ex2] on blocking quic streams 2024-11-21 09:41:15 -05:00
quic_lcidm.c QUIC CHANNEL, LCIDM: Factor duplicate CID generation function 2023-12-21 08:12:00 +00:00
quic_local.h Copyright year updates 2024-04-09 13:43:26 +02:00
quic_method.c Copyright year updates 2023-09-07 09:59:15 +01:00
quic_port.c Keep hold of a reference to the user SSL in QUIC 2024-11-07 12:05:23 +01:00
quic_port_local.h Minor updates 2023-12-21 08:12:06 +00:00
quic_rcidm.c Rename list macros 2024-09-26 10:02:30 +02:00
quic_reactor.c Copyright year updates 2023-09-07 09:59:15 +01:00
quic_record_rx.c Copyright year updates 2024-04-09 13:43:26 +02:00
quic_record_shared.c ossl_qrl_enc_level_set_provide_secret(): Avoid leaking keyslot in error condition 2023-11-06 07:47:17 +00:00
quic_record_shared.h TX key update support, RX time and PN reporting, general refactoring 2022-09-02 10:03:55 +02:00
quic_record_tx.c Copyright year updates 2024-04-09 13:43:26 +02:00
quic_record_util.c Copyright year updates 2024-09-05 09:35:49 +02:00
quic_rstream.c Copyright year updates 2023-09-07 09:59:15 +01:00
quic_rx_depack.c Copyright year updates 2024-04-09 13:43:26 +02:00
quic_sf_list.c Copyright year updates 2023-09-07 09:59:15 +01:00
quic_srt_gen.c QUIC SRT GEN: Minor updates 2023-11-25 09:14:05 +00:00
quic_srtm.c Copyright year updates 2024-04-09 13:43:26 +02:00
quic_sstream.c QUIC SSTREAM: Fix bug in ossl_quic_sstream_is_totally_acked 2023-11-02 08:49:01 +00:00
quic_statm.c Copyright year updates 2023-09-07 09:59:15 +01:00
quic_stream_map.c Add (void) cast to result of ossl_quic_rxfc_on_retire() 2024-07-08 18:17:15 +02:00
quic_thread_assist.c Copyright year updates 2024-04-09 13:43:26 +02:00
quic_tls.c Copyright year updates 2024-04-09 13:43:26 +02:00
quic_trace.c Copyright year updates 2024-09-05 09:35:49 +02:00
quic_tserver.c Use correctly formatted ALPN data in tserver 2024-06-27 10:30:51 +01:00
quic_txp.c Fix encryption level ordering 2025-01-08 11:17:01 -05:00
quic_txpim.c Copyright year updates 2023-09-07 09:59:15 +01:00
quic_types.c QUIC: Move CID generation to quic_types.c 2023-12-21 08:12:06 +00:00
quic_wire.c Copyright year updates 2024-04-09 13:43:26 +02:00
quic_wire_pkt.c Fix memory leaks in ossl_quic_calculate_retry_integrity_tag() 2024-10-23 15:14:08 +02:00
uint_set.c Copyright year updates 2023-09-07 09:59:15 +01:00