Hugo Landau
0847e63ee5
QUIC QSM: Stream garbage collection
...
This allows QUIC_STREAM objects to be deleted when they are no longer
needed.
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:13 +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
723cbe8a73
QUIC CHANNEL: Do not copy terminate cause as it is not modified after termination
...
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
995ff28210
QUIC CHANNEL, APL: Reject policy 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
e8fe7a21ea
QUIC CHANNEL: Initialise state, FC credit for new streams correctly
...
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:11 +01:00
Hugo Landau
f20fdd16d8
QUIC CHANNEL: Handle incoming remotely-created streams
...
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:11 +01:00
Hugo Landau
2dbc39deac
QUIC APL: Add stream creation APIs
...
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:11 +01:00
Hugo Landau
26ad16ea84
QUIC CHANNEL: Handle any number of streams
...
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:11 +01:00
Hugo Landau
0815b725a8
QUIC CHANNEL: Store TPs for initial flow control in TX direction
...
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:11 +01:00
Hugo Landau
54562e899c
QUIC CHANNEL: Clarify role of RX TPs in preparation of storing TX TPs
...
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:11 +01:00
Hugo Landau
c6c0432cca
QUIC CHANNEL: Remove stream 0-specific code
...
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:10 +01:00
Hugo Landau
66ec534861
QUIC CHANNEL: Fix bug where time callback arg wasn't passed
...
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
f6f45c55ea
QUIC: Make QUIC_CHANNEL use newreno CC
...
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
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
Matt Caswell
7257188b70
Add support for rstream get/release record in the QUIC TLS layer
...
The QUIC TLS layer was taking an internal copy of rstream data while
reading. The QUIC rstream code has recently been extended to enable a
get/release model which avoids the need for this internal copy, so we use
that instead.
Reviewed-by: Tomas Mraz <tomas@openssl.org>
Reviewed-by: Paul Dale <pauli@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/20404 )
2023-04-12 11:02:01 +10:00
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