]> 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>
Sat, 11 Jan 2025 21:02:29 +0000 (16:02 -0500)
commit69e6e986721e3e82b294272d89f3f5cd2ea25494
tree83e1b2afaa2f0b1fe94e635d65653bee3e8154d5
parent3de398a4f59b9007986f9ad687a761000d8030d5
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