Matt Caswell
8aff8f89f7
Enable tracing of datagrams we have sent
...
Extend the tracing capability to also trace when we have a datagram to the
peer.
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
Matt Caswell
e8528c95a0
Enable tracing of packets that have been sent
...
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
Matt Caswell
45454cccf8
Extend tracing of frames to transmitted frames
...
Previously we were only doing tracing of frames received from the peer.
Now we do that for transmitted frames as well.
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
Matt Caswell
70f0ea280a
Support trace for QUIC Frames
...
Extend the existing QUIC tracing capability for frames.
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
Matt Caswell
2a35a1bec0
Support trace for QUIC Packets
...
We enable SSL_trace support for when we receive QUIC Packets. This is
called after header protection is removed, but before the packet is
decrypted.
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:27 +01:00
Matt Caswell
45aac10717
Support trace for QUIC datagrams
...
Extend SSL_trace so that it knows how to dump information about the
receipt of a QUIC datagram.
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:27 +01:00
Matt Caswell
63dfde87c4
Add initial QUIC support for the msg_callback
...
At this stage we just support msg_callback on receipt of a datagram.
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:27 +01:00
Hugo Landau
45b7c7e06e
QUIC APL: Unlock mutex before freeing (clang tsan error)
...
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:55 +01:00
Hugo Landau
629b408c12
QUIC: Fix bugs where threading is disabled
...
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:54 +01:00
Hugo Landau
faa3a180ef
QUIC APL: Make SSL_get_error per-stream, error raising refactor
...
This refactors the error raising code in the APL to automatically raise
errors in the correct SSL object, either a QCSO or QSSO depending on the
circumstances. The QCTX structure's responsibilities are expanded to
facilitate this. This further drives towards a unified mechanism for
generic dispatch precondition checking and error raising.
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
Hugo Landau
dea57ecf3d
QUIC RXDP: Ensure all stream-related frames autocreate a stream
...
RFC requirement.
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
Hugo Landau
3dde3435ab
QUIC FC: Correct operation of stream count mode
...
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
Hugo Landau
e8142d2ce8
QUIC QSM: Correct the logic for determining stream count limits
...
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
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
Hugo Landau
1df479a9f9
QUIC TSERVER: Allow detection of new incoming streams
...
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
80b9eca279
Add test for handling NEW_CONNECTION_ID frame
...
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
bbc9754026
quic_tserver: Add possibility to change the connection id
...
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
eff046524b
Add minimal handling of NEW_CONNECTION_ID frames
...
We actively use only the latest DCID received. And retire only
DCIDs requested by the peer to be retired.
Also changed the active_conn_id_limit to 2 as the minimum value allowed.
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
Hugo Landau
de521629c1
QUIC APL: De-publicise SSL_attach_stream/SSL_detach_stream
...
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:15 +01:00
Hugo Landau
83df44ae53
QUIC MSST: Rename SSL_set_incoming_stream_reject_policy
...
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:15 +01:00
Hugo Landau
3a61a96c1e
QUIC MSST: Clarify default XSO transitions
...
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:14 +01:00
Hugo Landau
433d107a9b
QUIC APL: Fix a bug where avail could be used uninitialized
...
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:14 +01:00
Hugo Landau
9cab4bd523
QUIC APL: Handle reference for multiple streams counting 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:14 +01:00
Hugo Landau
59c5c016e5
QUIC APL: Fix logic of SSL_get_stream_type
...
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:14 +01:00
Hugo Landau
22b1a96ff7
QUIC MSST: Minor fixes and cleanups
...
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:14 +01:00
Hugo Landau
93651dc245
QUIC QRX: Fix a list usage bug
...
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:14 +01:00
Hugo Landau
571aff4bfa
Minor fixups
...
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
acc6fde0d4
QUIC APL: Fix a bug where incoming unidirectional streams weren't detected
...
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
f0e22d1be8
QUIC TSERVER: Allow STOP_SENDING/RESET_STREAM to be queried
...
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
2289401685
QUIC TSERVER: Handle FINs correctly if ossl_quic_tserver_read is not called first
...
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
8b5278942b
QUIC QSM: Minor bugfixes
...
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
71e5551263
QUIC MSST: make update
...
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
9aaafc26e0
QUIC APL: Send STOP_SENDING/RESET_STREAM when XSO is freed
...
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
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
9cacba434b
QUIC FIFD: Add support for callback on frame ACK
...
We need to get acknowledgement notifications for our STOP_SENDING and
STREAM_RESET frames as this information is needed to know when we can
delete a QUIC_STREAM object.
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
c3a04ea2fd
QUIC DISPATCH/APL: Add SSL_stream_reset and status query 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:13 +01:00
Hugo Landau
b6fc2294a1
QUIC RXDP: Record STOP_SENDING/RESET_STREAM event AEC codes consistently
...
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
b89c81e43b
QUIC QSM: Handle STOP_SENDING 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: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
5bd9ddd86e
QUIC FC: Modify RXFC to support use for enforcing MAX_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:12 +01:00
Hugo Landau
999e13f40e
QUIC CHANNEL: Incoming streams implicitly create lower-numbered 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:12 +01:00
Hugo Landau
5d27e7e9ae
QUIC FIFD: Ensure QUIC_STREAM is updated after QUIC_SSTREAM loss
...
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
13ac037d01
QUIC APL: Fix locking in XSO code and fix tests
...
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
cb68ce9fa7
QUIC DISPATCH/APL: SSL_accept_stream, SSL_get_accept_queue_len
...
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
8a90df343e
QUIC DISPATCH/APL: Add SSL_set_incoming_stream_reject_policy (unwired)
...
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
8b7be3aa7e
QUIC DISPATCH/APL: Implement SSL_set_default_stream_mode, default XSO refactor
...
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