summaryrefslogtreecommitdiff
path: root/test/quic_record_test.c
Commit message (Collapse)AuthorAgeFilesLines
* QUIC DEMUX: Allow MTU to vary over time and autodetect MTUHugo Landau2023-01-131-1/+0
| | | | | | Reviewed-by: Tomas Mraz <tomas@openssl.org> Reviewed-by: Matt Caswell <matt@openssl.org> (Merged from https://github.com/openssl/openssl/pull/19703)
* QUIC: Remove RX depacketiser tests from QRL test suiteHugo Landau2023-01-131-142/+45
| | | | | | | | | | | These create significant coupling between the QRL tests and the RXDP. Moreover, the RXDP has no state of its own and is implemented as part of the QUIC_CHANNEL, ergo it doesn't make that much sense to test it in isolation. Reviewed-by: Tomas Mraz <tomas@openssl.org> Reviewed-by: Matt Caswell <matt@openssl.org> (Merged from https://github.com/openssl/openssl/pull/19703)
* QUIC RX: Refactor unsafe DCID consistency checkingHugo Landau2023-01-131-13/+12
| | | | | | | | | | | | | | Previously, we enforced the requirement that the DCIDs be the same for all packets in a datagram by keeping a pointer to the first RXE generated from a datagram. This is unsafe and could lead to a UAF if the first packet is malformed, meaning that no RXE ended up being generated from it. Keep track of the DCID directly instead, as we should enforce this correctly even if the first packet in a datagram is malformed (but has an intelligible header with a DCID and length). Reviewed-by: Tomas Mraz <tomas@openssl.org> Reviewed-by: Matt Caswell <matt@openssl.org> (Merged from https://github.com/openssl/openssl/pull/19703)
* QUIC Wire Encoding: Support Retry Integrity Tag CalculationHugo Landau2023-01-131-3/+41
| | | | | | | | | | | This adds support for calculating and verifying retry integrity tags. In order to support this, an 'unused' field is added to the QUIC packet header structure so we can ensure that the serialization of the header is bit-for-bit identical to what was decoded. Reviewed-by: Tomas Mraz <tomas@openssl.org> Reviewed-by: Matt Caswell <matt@openssl.org> (Merged from https://github.com/openssl/openssl/pull/19703)
* QUIC RX: Do not handle auto-discard of Initial EL inside the QRXHugo Landau2023-01-131-15/+10
| | | | | | | | | | | While the QUIC RFCs state that the Initial EL should be auto-discarded when successfully processing a packet at a higher EL, doing this inside the QRX was not a good idea as this should be handled by the CSM. We remove this functionality and adapt tests accordingly. Reviewed-by: Tomas Mraz <tomas@openssl.org> Reviewed-by: Matt Caswell <matt@openssl.org> (Merged from https://github.com/openssl/openssl/pull/19703)
* QUIC RX: Support refcounted packets and eliminate wrapperHugo Landau2023-01-131-8/+8
| | | | | | | | | | | | | | Previously, the QRX filled in a OSSL_QRX_PKT structure provided by the caller. This necessitated the caller managing reference counting itself using a OSSL_QRX_PKT_WRAP structure. The need for this structure has been eliminated by adding refcounting support to the QRX itself. The QRX now outputs a pointer to an OSSL_QRX_PKT instead of filling in a structure provided by the caller. The OSSL_QRX_PKT_WRAP structure has been eliminated. Reviewed-by: Tomas Mraz <tomas@openssl.org> Reviewed-by: Matt Caswell <matt@openssl.org> (Merged from https://github.com/openssl/openssl/pull/19703)
* QUIC TX Packetiser and Streams MapperHugo Landau2022-11-241-39/+1
| | | | | | | Reviewed-by: Tomas Mraz <tomas@openssl.org> Reviewed-by: Paul Dale <pauli@openssl.org> Reviewed-by: Matt Caswell <matt@openssl.org> (Merged from https://github.com/openssl/openssl/pull/19346)
* test: condition out code that relies on CHACHA.Pauli2022-10-101-2/+23
| | | | | | | | | | | | | Run checker does a no-chacha build and tests fail because it can't be fetched. Fixes #19363 Reviewed-by: Dmitry Belyavskiy <beldmit@gmail.com> Reviewed-by: Shane Lontis <shane.lontis@oracle.com> Reviewed-by: Tomas Mraz <tomas@openssl.org> Reviewed-by: Tim Hudson <tjh@openssl.org> Reviewed-by: Matt Caswell <matt@openssl.org> (Merged from https://github.com/openssl/openssl/pull/19366)
* Modify test/quic_record_test.c to also depacketizeRichard Levitte2022-09-231-61/+185
| | | | | | | Reviewed-by: Hugo Landau <hlandau@openssl.org> Reviewed-by: Paul Dale <pauli@openssl.org> Reviewed-by: Tomas Mraz <tomas@openssl.org> (Merged from https://github.com/openssl/openssl/pull/18838)
* Add deferred datagram limit to QUIC Record Layer RXHugo Landau2022-09-221-1/+2
| | | | | | Reviewed-by: Tomas Mraz <tomas@openssl.org> Reviewed-by: Richard Levitte <levitte@openssl.org> (Merged from https://github.com/openssl/openssl/pull/19251)
* TX key update support, RX time and PN reporting, general refactoringHugo Landau2022-09-021-4/+592
| | | | | | | | | | | | | | | | | | - Adds an RX time field to the OSSL_QRX_PKT structure. - Adds a timekeeping argument to ossl_demux_new which is used to determine packet reception time. - Adds a decoded PN field to the OSSL_QRX_PKT structure. This has to be decoded by the QRX anyway, and its omission was an oversight. - Key update support for the TX side. - Minor refactoring. Reviewed-by: Paul Dale <pauli@openssl.org> Reviewed-by: Tomas Mraz <tomas@openssl.org> (Merged from https://github.com/openssl/openssl/pull/18949)
* QUIC Record Layer (Refactor and TX Side)Hugo Landau2022-09-021-319/+735
| | | | | | Reviewed-by: Paul Dale <pauli@openssl.org> Reviewed-by: Tomas Mraz <tomas@openssl.org> (Merged from https://github.com/openssl/openssl/pull/18949)
* QUIC Demuxer and Record Layer (RX Side)Hugo Landau2022-09-021-0/+2378
Reviewed-by: Paul Dale <pauli@openssl.org> Reviewed-by: Tomas Mraz <tomas@openssl.org> (Merged from https://github.com/openssl/openssl/pull/18949)