37 Commits

Author SHA1 Message Date
Bob Beck
2fab90bb5e 4.0-POST-CLANG-FORMAT-WEBKIT
Reviewed-by: Saša Nedvědický <sashan@openssl.org>
Reviewed-by: Neil Horman <nhorman@openssl.org>
Reviewed-by: Nikola Pajkovsky <nikolap@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/29242)
2025-12-09 00:28:19 -07:00
Alexandr Nedvedicky
1d92f3b8b0 Make SSL_poll() and SSL_shutdown() better friends
Some checks failed
GitHub CI / check_update (push) Has been cancelled
GitHub CI / check_docs (push) Has been cancelled
GitHub CI / check-c99 (push) Has been cancelled
GitHub CI / basic_gcc (push) Has been cancelled
GitHub CI / basic_clang (push) Has been cancelled
GitHub CI / linux-arm64 (push) Has been cancelled
GitHub CI / freebsd-x86_64 (push) Has been cancelled
GitHub CI / minimal (push) Has been cancelled
GitHub CI / no-deprecated (push) Has been cancelled
GitHub CI / no-shared-ubuntu (push) Has been cancelled
GitHub CI / no-shared-macos (macos-13) (push) Has been cancelled
GitHub CI / no-shared-macos (macos-14) (push) Has been cancelled
GitHub CI / non-caching (push) Has been cancelled
GitHub CI / address_ub_sanitizer (push) Has been cancelled
GitHub CI / fuzz_tests (push) Has been cancelled
GitHub CI / memory_sanitizer (push) Has been cancelled
GitHub CI / threads_sanitizer (push) Has been cancelled
GitHub CI / enable_non-default_options (push) Has been cancelled
GitHub CI / full_featured (push) Has been cancelled
GitHub CI / no-legacy (push) Has been cancelled
GitHub CI / legacy (push) Has been cancelled
GitHub CI / out-of-readonly-source-and-install-ubuntu (push) Has been cancelled
GitHub CI / out-of-readonly-source-and-install-macos (macos-13) (push) Has been cancelled
GitHub CI / out-of-readonly-source-and-install-macos (macos-14) (push) Has been cancelled
GitHub CI / external-tests-misc (push) Has been cancelled
GitHub CI / external-tests-oqs-provider (push) Has been cancelled
GitHub CI / external-tests-pkcs11-provider (push) Has been cancelled
GitHub CI / external-tests-pyca (3.9) (push) Has been cancelled
Compiler Zoo CI / compiler (map[cc:clang-11 distro:ubuntu-22.04]) (push) Has been cancelled
Compiler Zoo CI / compiler (map[cc:clang-12 distro:ubuntu-22.04]) (push) Has been cancelled
Compiler Zoo CI / compiler (map[cc:clang-13 distro:ubuntu-22.04]) (push) Has been cancelled
Compiler Zoo CI / compiler (map[cc:clang-14 distro:ubuntu-22.04]) (push) Has been cancelled
Compiler Zoo CI / compiler (map[cc:clang-15 distro:ubuntu-22.04 llvm-ppa-name:jammy]) (push) Has been cancelled
Compiler Zoo CI / compiler (map[cc:clang-16 distro:ubuntu-22.04 llvm-ppa-name:jammy]) (push) Has been cancelled
Compiler Zoo CI / compiler (map[cc:clang-17 distro:ubuntu-22.04 llvm-ppa-name:jammy]) (push) Has been cancelled
Compiler Zoo CI / compiler (map[cc:gcc-10 distro:ubuntu-22.04]) (push) Has been cancelled
Compiler Zoo CI / compiler (map[cc:gcc-11 distro:ubuntu-22.04]) (push) Has been cancelled
Compiler Zoo CI / compiler (map[cc:gcc-12 distro:ubuntu-22.04]) (push) Has been cancelled
Compiler Zoo CI / compiler (map[cc:gcc-13 distro:ubuntu-22.04 gcc-ppa-name:ubuntu-toolchain-r/test]) (push) Has been cancelled
Compiler Zoo CI / compiler (map[cc:gcc-9 distro:ubuntu-22.04]) (push) Has been cancelled
Cross Compile / cross-compilation (map[arch:aarch64-linux-gnu fips:no libs:libc6-dev-arm64-cross target:linux-aarch64]) (push) Has been cancelled
Cross Compile / cross-compilation (map[arch:alpha-linux-gnu fips:no libs:libc6.1-dev-alpha-cross target:linux-alpha-gcc]) (push) Has been cancelled
Cross Compile / cross-compilation (map[arch:arm-linux-gnueabi fips:no libs:libc6-dev-armel-cross target:linux-armv4 tests:-test_includes -test_store -test_x509_store]) (push) Has been cancelled
Cross Compile / cross-compilation (map[arch:arm-linux-gnueabihf fips:no libs:libc6-dev-armhf-cross target:linux-armv4 tests:-test_includes -test_store -test_x509_store]) (push) Has been cancelled
Cross Compile / cross-compilation (map[arch:hppa-linux-gnu fips:no libs:libc6-dev-hppa-cross target:-static -O1 linux-generic32 tests:-test_includes -test_store -test_x509_store]) (push) Has been cancelled
Cross Compile / cross-compilation (map[arch:hppa-linux-gnu libs:libc6-dev-hppa-cross target:linux-generic32 tests:none]) (push) Has been cancelled
Cross Compile / cross-compilation (map[arch:i386-pc-msdosdjgpp libs:libc-djgpp-dev libwatt-djgpp-dev djgpp-utils ppa:jwt27/djgpp-toolchain target:no-threads 386 DJGPP tests:none]) (push) Has been cancelled
Cross Compile / cross-compilation (map[arch:m68k-linux-gnu fips:no libs:libc6-dev-m68k-cross target:-static -m68040 linux-latomic -Wno-stringop-overflow tests:-test_includes -test_store -test_x509_store]) (push) Has been cancelled
Cross Compile / cross-compilation (map[arch:m68k-linux-gnu libs:libc6-dev-m68k-cross target:-mcfv4e -mxgot linux-latomic -Wno-stringop-overflow no-quic tests:none]) (push) Has been cancelled
Cross Compile / cross-compilation (map[arch:mips-linux-gnu fips:no libs:libc6-dev-mips-cross target:-static linux-mips32 tests:-test_includes -test_store -test_x509_store]) (push) Has been cancelled
Cross Compile / cross-compilation (map[arch:mips-linux-gnu libs:libc6-dev-mips-cross target:linux-mips32 tests:none]) (push) Has been cancelled
Cross Compile / cross-compilation (map[arch:mips64-linux-gnuabi64 fips:no libs:libc6-dev-mips64-cross target:-static linux64-mips64]) (push) Has been cancelled
Cross Compile / cross-compilation (map[arch:mips64-linux-gnuabi64 libs:libc6-dev-mips64-cross target:linux64-mips64 tests:none]) (push) Has been cancelled
Cross Compile / cross-compilation (map[arch:mipsel-linux-gnu fips:no libs:libc6-dev-mipsel-cross target:linux-mips32 tests:-test_includes -test_store -test_x509_store]) (push) Has been cancelled
Cross Compile / cross-compilation (map[arch:powerpc64le-linux-gnu fips:no libs:libc6-dev-ppc64el-cross target:linux-ppc64le]) (push) Has been cancelled
Cross Compile / cross-compilation (map[arch:riscv64-linux-gnu fips:no libs:libc6-dev-riscv64-cross target:linux64-riscv64]) (push) Has been cancelled
Cross Compile / cross-compilation (map[arch:s390x-linux-gnu fips:no libs:libc6-dev-s390x-cross target:linux64-s390x]) (push) Has been cancelled
Cross Compile / cross-compilation (map[arch:sh4-linux-gnu fips:no libs:libc6-dev-sh4-cross target:no-async linux-latomic tests:-test_includes -test_store -test_x509_store]) (push) Has been cancelled
Cross Compile / cross-compilation (map[arch:sparc64-linux-gnu libs:libc6-dev-sparc64-cross target:linux64-sparcv9 tests:none]) (push) Has been cancelled
Fuzz-checker CI / fuzz-checker (map[cc:afl-clang-fast config:enable-fuzz-afl no-module install:afl++ name:AFL]) (push) Has been cancelled
Fuzz-checker CI / fuzz-checker (map[cc:clang-18 config:enable-fuzz-libfuzzer enable-asan enable-ubsan -fno-sanitize=function -fsanitize-coverage=trace-cmp -DFUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION extra:enable-fips enable-lms enable-ec_nistp_64_gcc_128 -fno-sanitize=al… (push) Has been cancelled
Fuzz-checker CI / fuzz-checker (map[cc:clang-18 config:enable-fuzz-libfuzzer enable-asan enable-ubsan -fno-sanitize=function install:libfuzzer-18-dev libs:--with-fuzzer-lib=/usr/lib/llvm-18/lib/libFuzzer.a --with-fuzzer-include=/usr/include/clang/18/include/fuzzer linke… (push) Has been cancelled
CIFuzz / Fuzzing (push) Has been cancelled
Perl-minimal-checker CI / perl-minimal-checker (push) Has been cancelled
Cross Compile for RISC-V Extensions / cross-compilation-riscv (map[arch:riscv64-linux-gnu fips:no libs:libc6-dev-riscv64-cross opensslcaps:rv64gc_inlineasm opensslcapsname:riscvcap qemucpu:rv64,zbb=true,zbkb=true,zknh=true,zksh=true target:-march=rv64gc_zbb_zbkb_zknh_zksh linux64-riscv64]) (push) Has been cancelled
Cross Compile for RISC-V Extensions / cross-compilation-riscv (map[arch:riscv64-linux-gnu fips:no libs:libc6-dev-riscv64-cross opensslcaps:rv64gc_v_zbb opensslcapsname:riscvcap qemucpu:rv64,v=true,vlen=128,zbb=true,zvbb=false,zvkb=false target:linux64-riscv64]) (push) Has been cancelled
Cross Compile for RISC-V Extensions / cross-compilation-riscv (map[arch:riscv64-linux-gnu fips:no libs:libc6-dev-riscv64-cross opensslcaps:rv64gc_v_zvkb_zvbc opensslcapsname:riscvcap qemucpu:rv64,v=true,vlen=128,zvbb=true,zvbc=true,zvkg=false target:linux64-riscv64]) (push) Has been cancelled
Cross Compile for RISC-V Extensions / cross-compilation-riscv (map[arch:riscv64-linux-gnu fips:no libs:libc6-dev-riscv64-cross opensslcaps:rv64gc_v_zvkg opensslcapsname:riscvcap qemucpu:rv64,v=true,vlen=128,zvkg=true,zvbb=false target:linux64-riscv64]) (push) Has been cancelled
Cross Compile for RISC-V Extensions / cross-compilation-riscv (map[arch:riscv64-linux-gnu fips:no libs:libc6-dev-riscv64-cross opensslcaps:rv64gc_v_zvkned opensslcapsname:riscvcap qemucpu:rv64,v=true,vlen=128,zvkned=true,zvbb=false,zvkb=false,zvkg=false target:linux64-riscv64]) (push) Has been cancelled
Cross Compile for RISC-V Extensions / cross-compilation-riscv (map[arch:riscv64-linux-gnu fips:no libs:libc6-dev-riscv64-cross opensslcaps:rv64gc_zba_zbb_zbc_zbs_zbkb_zbkc_zbkx_zknd_zkne_zknh_zksed_zksh_zkr_zkt_v_zvbb_zvbc_zvkb_zvkg_zvkned_zvknha_zvknhb_zvksed_zvksh opensslcapsname:riscvca… (push) Has been cancelled
Cross Compile for RISC-V Extensions / cross-compilation-riscv (map[arch:riscv64-linux-gnu fips:no libs:libc6-dev-riscv64-cross opensslcaps:rv64gc_zbb_zbc_zbkb_zknd_zkne opensslcapsname:riscvcap qemucpu:rv64,zbb=true,zbc=true,zbkb=true,zknd=true,zkne=true target:linux64-riscv64]) (push) Has been cancelled
Cross Compile for RISC-V Extensions / cross-compilation-riscv (map[arch:riscv64-linux-gnu fips:no libs:libc6-dev-riscv64-cross opensslcaps:rv64gc_zbc opensslcapsname:riscvcap qemucpu:rv64,zbc=true,zbb=false,zbkb=false target:linux64-riscv64]) (push) Has been cancelled
Cross Compile for RISC-V Extensions / cross-compilation-riscv (map[arch:riscv64-linux-gnu fips:no libs:libc6-dev-riscv64-cross opensslcaps:rv64gc_zbc_zbb opensslcapsname:riscvcap qemucpu:rv64,zbc=true,zbb=true,zbkb=false target:linux64-riscv64]) (push) Has been cancelled
Run-checker CI / run-checker (enable-trace enable-fips) (push) Has been cancelled
Run-checker CI / run-checker (no-cmp) (push) Has been cancelled
Run-checker CI / run-checker (no-cms) (push) Has been cancelled
Run-checker CI / run-checker (no-default-thread-pool) (push) Has been cancelled
Run-checker CI / run-checker (no-dgram) (push) Has been cancelled
Run-checker CI / run-checker (no-dh) (push) Has been cancelled
Run-checker CI / run-checker (no-dtls) (push) Has been cancelled
Run-checker CI / run-checker (no-ec) (push) Has been cancelled
Run-checker CI / run-checker (no-ecx) (push) Has been cancelled
Run-checker CI / run-checker (no-http) (push) Has been cancelled
Run-checker CI / run-checker (no-legacy) (push) Has been cancelled
Run-checker CI / run-checker (no-ml-dsa) (push) Has been cancelled
Run-checker CI / run-checker (no-ml-kem) (push) Has been cancelled
Run-checker CI / run-checker (no-quic) (push) Has been cancelled
Run-checker CI / run-checker (no-sm2) (push) Has been cancelled
Run-checker CI / run-checker (no-sock) (push) Has been cancelled
Run-checker CI / run-checker (no-stdio) (push) Has been cancelled
Run-checker CI / run-checker (no-thread-pool) (push) Has been cancelled
Run-checker CI / run-checker (no-threads) (push) Has been cancelled
Run-checker CI / run-checker (no-tls) (push) Has been cancelled
Run-checker CI / run-checker (no-tls1_2) (push) Has been cancelled
Run-checker CI / run-checker (no-tls1_3) (push) Has been cancelled
Run-checker CI / run-checker (no-ui) (push) Has been cancelled
Run-checker merge / run-checker (enable-asan enable-ubsan no-shared no-asm -DOPENSSL_SMALL_FOOTPRINT -fno-sanitize=function) (push) Has been cancelled
Run-checker merge / run-checker (enable-pie) (push) Has been cancelled
Run-checker merge / run-checker (enable-ubsan no-asm -DOPENSSL_SMALL_FOOTPRINT -fno-sanitize=function) (push) Has been cancelled
Run-checker merge / run-checker (enable-weak-ssl-ciphers) (push) Has been cancelled
Run-checker merge / run-checker (enable-zlib) (push) Has been cancelled
Run-checker merge / run-checker (no-dso) (push) Has been cancelled
Run-checker merge / run-checker (no-dynamic-engine) (push) Has been cancelled
Run-checker merge / run-checker (no-ec2m enable-fips) (push) Has been cancelled
Run-checker merge / run-checker (no-engine no-shared) (push) Has been cancelled
Run-checker merge / run-checker (no-err) (push) Has been cancelled
Run-checker merge / run-checker (no-filenames) (push) Has been cancelled
Run-checker merge / run-checker (no-integrity-only-ciphers) (push) Has been cancelled
Run-checker merge / run-checker (no-module) (push) Has been cancelled
Run-checker merge / run-checker (no-ocsp) (push) Has been cancelled
Run-checker merge / run-checker (no-pinshared) (push) Has been cancelled
Run-checker merge / run-checker (no-srp) (push) Has been cancelled
Run-checker merge / run-checker (no-srtp) (push) Has been cancelled
Run-checker merge / run-checker (no-ts) (push) Has been cancelled
Run-checker merge / jitter (push) Has been cancelled
Run-checker merge / threads_sanitizer_atomic_fallback (push) Has been cancelled
Windows GitHub CI / shared (map[arch:amd64 config:enable-lms enable-fips no-thread-pool no-quic os:windows-2025 vcvars:C:\Program Files\Microsoft Visual Studio\2022\Enterprise\VC\Auxiliary\Build\vcvars64.bat]) (push) Has been cancelled
Windows GitHub CI / shared (map[arch:amd64 config:enable-lms enable-fips os:windows-2022 vcvars:C:\Program Files\Microsoft Visual Studio\2022\Enterprise\VC\Auxiliary\Build\vcvars64.bat]) (push) Has been cancelled
Windows GitHub CI / shared (map[arch:x86 config:--strict-warnings no-fips enable-lms os:windows-2022 vcvars:C:\Program Files\Microsoft Visual Studio\2022\Enterprise\VC\Auxiliary\Build\vcvars32.bat]) (push) Has been cancelled
Windows GitHub CI / plain (push) Has been cancelled
Windows GitHub CI / minimal (push) Has been cancelled
Windows GitHub CI / cygwin (windows-2022, map[arch:win64 config:-DCMAKE_C_COMPILER=gcc --strict-warnings enable-demos no-fips]) (push) Has been cancelled
Windows Compression GitHub CI / zstd (push) Has been cancelled
Windows Compression GitHub CI / brotli (push) Has been cancelled
Current QUIC stack may leave connection monitored by SSL_poll() to stale
during regular shutdown.  The issue is triggered when ACK for client's
FIN gets delayed. The sequeance of operations to trigger
the stale of QUIC connection at client goes as follows:

	- application calls SSL_shutdown() on connection,
	  the shutdown can not proceed, because bi-directional
	  stream must be flushed. The client awaits ACK from
	  server acknowledging reception of FIN on client's stream

	- the stream object gets destroyed, because application
	  received all data from server.

	- application updates poll set and passes to SSL_poll()

	- ssl poll ticks the engine. Engine receives delayed ACK
	  and marks stream as flushed. At this point the SSL_shutdown()
	  operation may proceed given the application calls the
	  SSL_shutdown(). However there is no mechanism to make SSL_poll()
	  return so application is unable to proceed with its event
	  loop where SSL_shutdown() may get called.

This change introduces ossl_quic_channel_notify_flush_done() function
which notifies channel when all streams are flushed (all FINs got ACKed).

The first thing SSL_shudown() does it calls ossl_quic_stream_map_begin_shutdown_flush().
The function walks list of all streams attached to channel and notes how many
streams is missing ACK for their FIN. In our test case it finds one such stream.
Call to SSL_shutdown() returns and application destroys the SSL stream object
and updates a poll set.

SSL_poll() gets called. The QUIC stack (engine) gets ticked and reads data
from socket. It processes delayed ACK now. The ACK-manager updates the
stream notifying the server ACKs the FIN sent by client. The stream
is flushed now. Thw shutdown_flush_done() for stream gets called on
behalf of ACK manager.

The shutdown_flush_done() does two things:
	- it marks stream as flushed
	- it decrements the num_shutdown_flush counter initialized
	  be earlier call to ossl_quic_stream_map_begin_shutdown_flush()
	  called by SSL_shutdown()
The change here calls ossl_quic_channel_notify_flush_done() when
num_shutdown_flush reaches zero.

The ossl_quic_channel_notify_flush_done() then calls function
ossl_quic_channel_notify_flush_done(), which just moves the state
of the channel (connection) from active to terminating state.
The change of channel state is sufficent for SSL_poll() to
signal _EC event on connection.

Once application receives _EC event on connection it should
check the state of the channel/reason of error. In regular case
the error/channel state hints application to call SSL_shutdown()
so connection object can proceed with connection shutdown.
The SSL_shutdown() call done now moves channel to terminated
state. So the next call to SSL_poll() can signal _ECD which
tells application it's time to stop polling on SSL connection
object and destroy it.

Fixes openssl/project#1291

Reviewed-by: Neil Horman <nhorman@openssl.org>
Reviewed-by: Tomas Mraz <tomas@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/28116)
2025-08-21 14:43:03 +02:00
sashan
cdbfacead0 ACK manager must avoid infinite probe time when waiting handshake confirmation
According to RFC 9002, section 6.2.2.1 the client the client must keep PTO (probe
time out) armed if it has not seen HANDSHAKE_DONE quic message from server.
Not following RFC spec here may cause the QUIC session to stale during TLS handshake.

Fixes openssl/project#1266

Reviewed-by: Neil Horman <nhorman@openssl.org>
Reviewed-by: Tomas Mraz <tomas@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/28023)
2025-07-27 04:48:28 -04:00
Tomas Mraz
a3af1c036c test: Silence warnings on Win64 builds
Reviewed-by: Saša Nedvědický <sashan@openssl.org>
Reviewed-by: Neil Horman <nhorman@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/27806)
2025-07-02 17:26:26 +02:00
openssl-machine
0c679f5566 Copyright year updates
Reviewed-by: Neil Horman <nhorman@openssl.org>
Reviewed-by: Matt Caswell <matt@openssl.org>
Release: yes
2025-03-12 13:35:59 +00:00
Neil Horman
d1c3bb2f74 Add tracking of receive credit for unvalidated connections
Reviewed-by: Tomas Mraz <tomas@openssl.org>
Reviewed-by: Saša Nedvědický <sashan@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/26178)
2025-02-17 11:27:33 -05:00
Neil Horman
5fdd623df3 Allow packetizer to accept an arg to set protocol version
In preparation for doing version negotiation, expose the ability to have
the packetiser for QUIC set a configured protocol version.  We only set
it to QUIC_VERSION_1 for now, but it allows for us to set different
protocols in the future.

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)
2025-02-17 11:27:33 -05:00
Hugo Landau
5d49f9ef9a QUIC TXP TEST: Remove dependency on legacy DEMUX-QRX routing
Reviewed-by: Tomas Mraz <tomas@openssl.org>
Reviewed-by: Matt Caswell <matt@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/22674)
2023-12-21 08:12:00 +00:00
Hugo Landau
461d41174b QUIC: Prevent incoming oversize tokens
Reviewed-by: Tomas Mraz <tomas@openssl.org>
Reviewed-by: Matt Caswell <matt@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/22436)
2023-10-20 16:31:40 +01:00
Matt Caswell
da1c088f59 Copyright year updates
Reviewed-by: Richard Levitte <levitte@openssl.org>
Release: yes
2023-09-07 09:59:15 +01:00
Tomas Mraz
64fd69911e ossl_quic_tx_packetiser_generate(): Always report if packets were sent
Even in case of later failure we need to flush
the previous packets.

Reviewed-by: Hugo Landau <hlandau@openssl.org>
Reviewed-by: Matt Caswell <matt@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/21700)
2023-08-23 17:18:48 +02:00
Pauli
cdd916313a quic: process stateless resets
Reviewed-by: Hugo Landau <hlandau@openssl.org>
Reviewed-by: Tomas Mraz <tomas@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/21649)
2023-08-16 12:07:17 +02:00
Hugo Landau
ec2b45f59b QUIC TXP: Re-enable accidentially disabled tests
Reviewed-by: Tomas Mraz <tomas@openssl.org>
Reviewed-by: Matt Caswell <matt@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/21565)
2023-08-10 18:19:50 +01:00
Hugo Landau
371c29582a QUIC CFQ: Unreliable transmission for PATH_RESPONSE
Reviewed-by: Tomas Mraz <tomas@openssl.org>
Reviewed-by: Matt Caswell <matt@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/21547)
2023-08-08 14:33:42 +01:00
Hugo Landau
833840be97 QUIC TXP: Add extra test
Reviewed-by: Tomas Mraz <tomas@openssl.org>
Reviewed-by: Paul Dale <pauli@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/21513)
2023-07-25 11:05:26 +10:00
Hugo Landau
9441624ee9 QUIC TXP: Update tests for refactor
Reviewed-by: Paul Dale <pauli@openssl.org>
Reviewed-by: Tomas Mraz <tomas@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/21458)
2023-07-21 08:43:52 +02:00
Hugo Landau
d49c6ca7b9 QUIC TXP: Test packet size boundary cases
Reviewed-by: Paul Dale <pauli@openssl.org>
Reviewed-by: Tomas Mraz <tomas@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/21458)
2023-07-21 08:43:52 +02:00
Hugo Landau
6c1d0e2865 QUIC CONFORMANCE: Enforce minimal frame type encoding
Reviewed-by: Tomas Mraz <tomas@openssl.org>
Reviewed-by: Matt Caswell <matt@openssl.org>
Reviewed-by: Paul Dale <pauli@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/21135)
2023-07-17 08:17:57 +10:00
Hugo Landau
28d0e35cd6 QUIC QSM: Free unneeded stream buffers, calculate RESET_STREAM final size correctly
Reviewed-by: Tomas Mraz <tomas@openssl.org>
Reviewed-by: Matt Caswell <matt@openssl.org>
Reviewed-by: Paul Dale <pauli@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/21135)
2023-07-17 08:17:57 +10:00
Hugo Landau
2f018d14f0 QUIC QSM/STREAM: Refactor to use RFC stream states
Reviewed-by: Tomas Mraz <tomas@openssl.org>
Reviewed-by: Matt Caswell <matt@openssl.org>
Reviewed-by: Paul Dale <pauli@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/21135)
2023-07-17 08:17:57 +10:00
Hugo Landau
a3a51d6ec3 QUIC TXP: Refactor status output to use an extensible structure
Reviewed-by: Tomas Mraz <tomas@openssl.org>
Reviewed-by: Matt Caswell <matt@openssl.org>
Reviewed-by: Paul Dale <pauli@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/21029)
2023-06-16 09:26:27 +10:00
Matt Caswell
b09e246aba Properly handling stream/crypto frames while tracing
Reviewed-by: Tomas Mraz <tomas@openssl.org>
Reviewed-by: Hugo Landau <hlandau@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/20914)
2023-05-24 12:18:33 +01:00
Hugo Landau
5915a900af QUIC QSM: Allow QSM to know if we are in the server role
Reviewed-by: Matt Caswell <matt@openssl.org>
Reviewed-by: Tomas Mraz <tomas@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/20856)
2023-05-24 10:34:47 +01:00
Tomas Mraz
c301149ad4 Fix test cases using NEW_CONNECTION_ID frame
seq_id must be >= retire_prior_to.

Add negative testcase.

Reviewed-by: Hugo Landau <hlandau@openssl.org>
Reviewed-by: Paul Dale <pauli@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/20892)
2023-05-17 14:04:18 +01:00
Tomas Mraz
dbca844cb3 quic_txp_test.c: Cleanup use of WPACKET
Reviewed-by: Hugo Landau <hlandau@openssl.org>
Reviewed-by: Paul Dale <pauli@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/20892)
2023-05-17 14:04:17 +01:00
Hugo Landau
e8b9f63235 QUIC QSM: Clean up SEND_STREAM/RECV_STREAM handling
Reviewed-by: Matt Caswell <matt@openssl.org>
Reviewed-by: Tomas Mraz <tomas@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/20765)
2023-05-12 14:47:12 +01:00
Hugo Landau
90cecc406f QUIC RXDP/QSM: Enforce MAX_STREAMS
Also use accept queue popping by the application as the retirement
event, i.e., as the cue to increase the limit.

Reviewed-by: Matt Caswell <matt@openssl.org>
Reviewed-by: Tomas Mraz <tomas@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/20765)
2023-05-12 14:47:12 +01:00
Hugo Landau
a6b6ea1737 QUIC TXP/CHANNEL: Generate MAX_STREAMS using RXFC
Though the RXFC was designed for stream flow control, its logic
is generic enough to use to control MAX_STREAMS generation.

Control of when _we_ can open streams is already done in a bespoke
fashion and doesn't use a TXFC, however (see
ossl_quic_stream_map_update_state).

Reviewed-by: Matt Caswell <matt@openssl.org>
Reviewed-by: Tomas Mraz <tomas@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/20765)
2023-05-12 14:47:12 +01:00
Hugo Landau
90699176b0 QUIC CC: Major revisions to CC abstract interface
Reviewed-by: Tomas Mraz <tomas@openssl.org>
Reviewed-by: Matt Caswell <matt@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/20423)
2023-05-01 11:03:54 +01:00
Hugo Landau
134b79c056 QUIC TXP: Allow caller to determine if an ACK-eliciting packet was sent
Reviewed-by: Tomas Mraz <tomas@openssl.org>
Reviewed-by: Matt Caswell <matt@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/20348)
2023-03-30 11:14:08 +01:00
Hugo Landau
2477e99f10 QUIC Probes Support: Minor tweaks
Reviewed-by: Matt Caswell <matt@openssl.org>
Reviewed-by: Tomas Mraz <tomas@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/19925)
2023-01-30 09:44:59 +01:00
Hugo Landau
fee8f48e35 QUIC TXP: Allow TXP to generate probes
Reviewed-by: Matt Caswell <matt@openssl.org>
Reviewed-by: Tomas Mraz <tomas@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/19925)
2023-01-30 09:44:59 +01:00
Hugo Landau
d7668ff213 QUIC DEMUX: Allow MTU to vary over time and autodetect MTU
Reviewed-by: Tomas Mraz <tomas@openssl.org>
Reviewed-by: Matt Caswell <matt@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/19703)
2023-01-13 13:20:17 +00:00
Hugo Landau
cbe7f586ad QUIC Stream Mapper: CSM-related changes, stream limits handling
Reviewed-by: Tomas Mraz <tomas@openssl.org>
Reviewed-by: Matt Caswell <matt@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/19703)
2023-01-13 13:20:15 +00:00
Hugo Landau
cda88bafe7 QUIC TXP: Don't send STREAM frames until handshake is complete
Reviewed-by: Tomas Mraz <tomas@openssl.org>
Reviewed-by: Matt Caswell <matt@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/19703)
2023-01-13 13:20:12 +00:00
Hugo Landau
6d5d5fc9a9 QUIC RX: Support refcounted packets and eliminate wrapper
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)
2023-01-13 13:20:10 +00:00
Hugo Landau
a73078b79f QUIC TX Packetiser and Streams Mapper
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)
2022-11-24 08:15:20 +00:00