Hugo Landau
9cf091a3c5
QUIC Thread Assisted mode: miscellaneous fixes
...
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:16 +01:00
Hugo Landau
c4208a6a98
QUIC Thread Assisted Mode: Fix typos and use of CRYPTO_RWLOCK type
...
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:10 +01:00
Hugo Landau
3b1ab5a3a0
Enhance quic_tserver test to fully test thread assisted mode
...
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:09 +01:00
Hugo Landau
4648eac533
QUIC CHANNEL: Fix idle timeout handling
...
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:09 +01:00
Hugo Landau
b212d554e7
QUIC CHANNEL: Allow time source to be overridden
...
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:09 +01:00
Hugo Landau
ccd3103771
Add channel-only tick mode and use it for thread assisted mode
...
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
4847599b54
Move channel mutex out of QUIC_CHANNEL for init/teardown flexibility
...
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:07 +01:00
Hugo Landau
fb2245c44b
QUIC Channel: Add a mutex
...
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:07 +01:00
Hugo Landau
553a4e00aa
QUIC: Add support for datagram injection
...
Reviewed-by: Tomas Mraz <tomas@openssl.org>
Reviewed-by: Paul Dale <pauli@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/20451 )
2023-03-22 10:14:25 +11:00
Matt Caswell
c2212dc19e
Make sure the QRX and QTX are associated with a libctx
...
If a libctx has been associated with the channel, it must be passed down
to the QRX and QTX.
Reviewed-by: Tomas Mraz <tomas@openssl.org>
Reviewed-by: Paul Dale <pauli@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/20514 )
2023-03-20 09:35:38 +11:00
Tomas Mraz
2113ea584c
Improve the QUIC_RSTREAM implementation
...
Add API calls to avoid copying data when reading
These are ossl_quic_rstream_get_record() and
ossl_quic_rstream_release_record().
Add side storage for the stream frame data.
When there are too many packets referenced by the
receiving stream the function ossl_quic_rstream_move_to_rbuf()
can be called to move the data to a ring buffer.
Reviewed-by: Matt Caswell <matt@openssl.org>
Reviewed-by: Hugo Landau <hlandau@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/19794 )
2023-03-06 12:26:16 +01:00
Matt Caswell
c12e111336
Rename various functions OSSL_QUIC_FAULT -> QTEST_FAULT
...
Reviewed-by: Hugo Landau <hlandau@openssl.org>
Reviewed-by: Tomas Mraz <tomas@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/20030 )
2023-02-22 05:34:06 +00:00
Matt Caswell
ce8f20b6ae
Don't treat the Tserver as connected until the handshake is confirmed
...
Reviewed-by: Hugo Landau <hlandau@openssl.org>
Reviewed-by: Tomas Mraz <tomas@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/20030 )
2023-02-22 05:34:04 +00:00
Matt Caswell
62d0da12e3
Raise a protocol error if we have not received transport params from peer
...
If we complete the TLS handshake but transport params were not received
then this is a protcol error and we should fail.
Reviewed-by: Hugo Landau <hlandau@openssl.org>
Reviewed-by: Tomas Mraz <tomas@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/20030 )
2023-02-22 05:34:04 +00:00
Matt Caswell
d03fe5de8d
Add the ability to mutate TLS handshake messages before they are written
...
We add callbacks so that TLS handshake messages can be modified by the test
framework before they are passed to the handshake hash, possibly encrypted
and written to the network. This enables us to simulate badly behaving
endpoints.
Reviewed-by: Hugo Landau <hlandau@openssl.org>
Reviewed-by: Tomas Mraz <tomas@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/20030 )
2023-02-22 05:34:03 +00:00
Matt Caswell
149a8e6c0a
Enable QUIC test server to find out the termination reason
...
We enable querying of the termination reason which is useful for tests.
Reviewed-by: Hugo Landau <hlandau@openssl.org>
Reviewed-by: Tomas Mraz <tomas@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/20030 )
2023-02-22 05:34:03 +00:00
Matt Caswell
14e3140939
Add the ability to mutate QUIC packets before they are written
...
We add callbacks so that QUIC packets can be modified by the test
framework before they are encrypted and written to the network. This
enables us to simulate badly behaving endpoints.
Reviewed-by: Hugo Landau <hlandau@openssl.org>
Reviewed-by: Tomas Mraz <tomas@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/20030 )
2023-02-22 05:33:23 +00:00
Hugo Landau
e8043229ea
QUIC: Refine SSL_shutdown and begin to implement SSL_shutdown_ex
...
Reviewed-by: Tomas Mraz <tomas@openssl.org>
Reviewed-by: Matt Caswell <matt@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/19897 )
2023-01-27 14:19:14 +00:00
Matt Caswell
2723d705b5
Replace use of the Dummy Handshake Layer with the real one
...
We start using the QUIC TLS implementation rather than the dummy one.
Reviewed-by: Hugo Landau <hlandau@openssl.org>
Reviewed-by: Tomas Mraz <tomas@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/19748 )
2023-01-24 17:16:29 +00:00
Hugo Landau
091f532e0e
QUIC Test Server: Minor fixups
...
Reviewed-by: Matt Caswell <matt@openssl.org>
Reviewed-by: Tomas Mraz <tomas@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/19734 )
2023-01-19 13:17:49 +00:00
Hugo Landau
b1b06da2a3
QUIC CHANNEL: Add basic server support for testing
...
Reviewed-by: Matt Caswell <matt@openssl.org>
Reviewed-by: Tomas Mraz <tomas@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/19734 )
2023-01-19 13:17:39 +00:00
Hugo Landau
3c567a52c2
QUIC CHANNEL: Transport params: Offer reason text and add server support
...
Reviewed-by: Matt Caswell <matt@openssl.org>
Reviewed-by: Tomas Mraz <tomas@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/19734 )
2023-01-19 13:17:39 +00:00
Hugo Landau
b639475a94
QUIC API: Rename want_net_read and want_net_write
...
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:38 +00:00
Hugo Landau
df15e990ff
QUIC CHANNEL: Handle network errors as connection-fatal events
...
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:37 +00:00
Hugo Landau
75b2920a21
QUIC CSM: Minor style fixes
...
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:35 +00:00
Hugo Landau
9f0ade7c47
QUIC: Minor cleanup
...
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:35 +00:00
Hugo Landau
79534440c5
QUIC: Use ossl_assert
...
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:22 +00:00
Hugo Landau
e28f512f04
QUIC CHANNEL: Minor cleanups and bug fix
...
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:20 +00:00
Hugo Landau
9bbc5b54b0
QUIC CHANNEL: Revise inaccurate comments
...
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:19 +00:00
Matt Caswell
45ecfc9b52
Separate handling of RX and TX enc level
...
Reviewed-by: Tomas Mraz <tomas@openssl.org>
Reviewed-by: Hugo Landau <hlandau@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/19703 )
2023-01-13 13:20:18 +00:00
Hugo Landau
3bf4dc8c21
QUIC CHANNEL: Only pump the demuxer once per tick
...
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
92282a17c9
QUIC CHANNEL: Only reprocess after an RX secret has been provisioned
...
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
d1ac77b1a5
QUIC Front-End I/O API: Ensure BIOs are reffed and freed correctly
...
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
4e64437a5f
QUIC_CHANNEL: Handle deferred packet processing after yielding of secrets correctly
...
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
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
6292519cd8
QUIC: Enable building with QUIC support disabled
...
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:16 +00:00
Hugo Landau
f538b42155
QUIC_CHANNEL: Implementation
...
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:14 +00:00