]> git.ipfire.org Git - thirdparty/openssl.git/commit
Augment ossl_quic_wire_decode_pkt_hdr
authorNeil Horman <nhorman@openssl.org>
Fri, 15 Nov 2024 18:34:37 +0000 (13:34 -0500)
committerNeil Horman <nhorman@openssl.org>
Mon, 17 Feb 2025 16:27:33 +0000 (11:27 -0500)
commit2784112e9a5d844b7a54ae6de5ab9d06a9822ef6
tree6d5575450a45b3c44c3a5d19a56ee82d890a2434
parent41fe7a2b8e3ba7075aa34b9d2412037e87cfffb5
Augment ossl_quic_wire_decode_pkt_hdr

In preparation for supporting the handling of version negotiation, we
need to be able to detect why the decoding of quic header failed.
Specifically, ossl_quic_wire_decode_pkt_hdr fails if the version
provided in the header isn't QUIC_VERSION_1.  We want to keep that, as
we don't support anything else, but the server code needs to
differentiate when we fail decode because of a version problem, vs some
other more fatal malforming issue.

So add a uint64_t *fail_cause pointer that gets filled out with a
failure cause.  We only use VERSION failures right now, but we can
expand this later if needed

Reviewed-by: Tomas Mraz <tomas@openssl.org>
Reviewed-by: Saša Nedvědický <sashan@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/25968)
include/internal/quic_wire_pkt.h
ssl/quic/quic_port.c
ssl/quic/quic_record_rx.c
ssl/quic/quic_trace.c
ssl/quic/quic_wire_pkt.c
test/helpers/pktsplitbio.c
test/helpers/quictestlib.c
test/quic_record_test.c
test/quic_wire_test.c