Hugo Landau
f26feac760
QUIC QLOG: Fix indentation
...
Reviewed-by: Matt Caswell <matt@openssl.org>
Reviewed-by: Neil Horman <nhorman@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/22037 )
2024-02-02 11:50:30 +00:00
Hugo Landau
b58abf9822
QUIC QLOG: Use set0
...
Reviewed-by: Matt Caswell <matt@openssl.org>
Reviewed-by: Neil Horman <nhorman@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/22037 )
2024-02-02 11:50:30 +00:00
Hugo Landau
c71bde1e47
Minor fixes
...
Reviewed-by: Matt Caswell <matt@openssl.org>
Reviewed-by: Neil Horman <nhorman@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/22037 )
2024-02-02 11:50:30 +00:00
Hugo Landau
1cc04b777d
Minor fixes
...
Reviewed-by: Matt Caswell <matt@openssl.org>
Reviewed-by: Neil Horman <nhorman@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/22037 )
2024-02-02 11:50:30 +00:00
Hugo Landau
63aaa51b15
Minor fixes
...
Reviewed-by: Matt Caswell <matt@openssl.org>
Reviewed-by: Neil Horman <nhorman@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/22037 )
2024-02-02 11:50:30 +00:00
Hugo Landau
26e4bac4db
QUIC QLOG: Record implementation version
...
Reviewed-by: Matt Caswell <matt@openssl.org>
Reviewed-by: Neil Horman <nhorman@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/22037 )
2024-02-02 11:50:30 +00:00
Hugo Landau
6cb0026c63
QUIC QLOG: Allow PID to be overridden
...
Reviewed-by: Matt Caswell <matt@openssl.org>
Reviewed-by: Neil Horman <nhorman@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/22037 )
2024-02-02 11:50:30 +00:00
Hugo Landau
3c067dcb2c
QLOG: Fix filter lexing
...
Reviewed-by: Matt Caswell <matt@openssl.org>
Reviewed-by: Neil Horman <nhorman@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/22037 )
2024-02-02 11:50:30 +00:00
Hugo Landau
67f997697a
JSON_ENC: Fix initial value of error
...
Reviewed-by: Matt Caswell <matt@openssl.org>
Reviewed-by: Neil Horman <nhorman@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/22037 )
2024-02-02 11:50:29 +00:00
Hugo Landau
c55e144b89
QUIC CHANNEL: Ensure QLOG instance is used correctly on server side
...
Reviewed-by: Matt Caswell <matt@openssl.org>
Reviewed-by: Neil Horman <nhorman@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/22037 )
2024-02-02 11:50:29 +00:00
Hugo Landau
2acc1ebbd9
QUIC QTX: Refactor to enable qlog logging of injected frames
...
Reviewed-by: Matt Caswell <matt@openssl.org>
Reviewed-by: Neil Horman <nhorman@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/22037 )
2024-02-02 11:50:29 +00:00
Hugo Landau
572c449a10
QUIC TXP: Allow QLOG instance to be changed after instantiation
...
Reviewed-by: Matt Caswell <matt@openssl.org>
Reviewed-by: Neil Horman <nhorman@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/22037 )
2024-02-02 11:50:29 +00:00
Hugo Landau
4a3a9257db
QUIC QTX: Allow QLOG instance to be changed after instantiation
...
Reviewed-by: Matt Caswell <matt@openssl.org>
Reviewed-by: Neil Horman <nhorman@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/22037 )
2024-02-02 11:50:29 +00:00
Hugo Landau
484b8bd0f5
QUIC FIFD: Allow QLOG instance to be changed after instantiation
...
Reviewed-by: Matt Caswell <matt@openssl.org>
Reviewed-by: Neil Horman <nhorman@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/22037 )
2024-02-02 11:50:29 +00:00
Hugo Landau
ba8b093be7
QLOG: Minor updates
...
Reviewed-by: Matt Caswell <matt@openssl.org>
Reviewed-by: Neil Horman <nhorman@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/22037 )
2024-02-02 11:50:29 +00:00
Hugo Landau
ae300c0d5e
Minor updates
...
Reviewed-by: Matt Caswell <matt@openssl.org>
Reviewed-by: Neil Horman <nhorman@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/22037 )
2024-02-02 11:50:29 +00:00
Hugo Landau
a70665852c
QLOG: Treat empty environment variable as default filter
...
Reviewed-by: Matt Caswell <matt@openssl.org>
Reviewed-by: Neil Horman <nhorman@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/22037 )
2024-02-02 11:50:29 +00:00
Hugo Landau
de60b122b2
QLOG: Editorial fixes (QLOG is spelled 'qlog')
...
Reviewed-by: Matt Caswell <matt@openssl.org>
Reviewed-by: Neil Horman <nhorman@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/22037 )
2024-02-02 11:50:29 +00:00
Hugo Landau
39b9345234
JSON_ENC: Minor tweaks
...
Reviewed-by: Matt Caswell <matt@openssl.org>
Reviewed-by: Neil Horman <nhorman@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/22037 )
2024-02-02 11:50:03 +00:00
Hugo Landau
9dcad79795
QUIC QLOG: Rename QFILTER to OSSL_QFILTER
...
Reviewed-by: Matt Caswell <matt@openssl.org>
Reviewed-by: Neil Horman <nhorman@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/22037 )
2024-02-02 11:50:03 +00:00
Hugo Landau
0e6eb431e8
QLOG: Fix bit_set
...
Reviewed-by: Matt Caswell <matt@openssl.org>
Reviewed-by: Neil Horman <nhorman@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/22037 )
2024-02-02 11:49:34 +00:00
Hugo Landau
29bd1e2d24
QLOG: Minor updates
...
Reviewed-by: Matt Caswell <matt@openssl.org>
Reviewed-by: Neil Horman <nhorman@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/22037 )
2024-02-02 11:49:34 +00:00
Hugo Landau
43a128875d
QLOG: Minor fixes after port refactor
...
Reviewed-by: Matt Caswell <matt@openssl.org>
Reviewed-by: Neil Horman <nhorman@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/22037 )
2024-02-02 11:49:34 +00:00
Hugo Landau
b3706fd7e2
QLOG: JSON Encoder: Rename JSON_ENC
...
Reviewed-by: Matt Caswell <matt@openssl.org>
Reviewed-by: Neil Horman <nhorman@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/22037 )
2024-02-02 11:49:34 +00:00
Hugo Landau
5849dbe52e
QLOG: Events: Implement transport:packet_received
...
Reviewed-by: Matt Caswell <matt@openssl.org>
Reviewed-by: Neil Horman <nhorman@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/22037 )
2024-02-02 11:49:34 +00:00
Hugo Landau
fff66adfc8
QLOG: Events: Implement transport:packet_sent
...
Reviewed-by: Matt Caswell <matt@openssl.org>
Reviewed-by: Neil Horman <nhorman@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/22037 )
2024-02-02 11:49:34 +00:00
Hugo Landau
434d52a4b6
QLOG: Wiring: QUIC QTX
...
Reviewed-by: Matt Caswell <matt@openssl.org>
Reviewed-by: Neil Horman <nhorman@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/22037 )
2024-02-02 11:49:34 +00:00
Hugo Landau
fb1a0bb97a
QLOG: Wire title-setting code to QUIC_CHANNEL and SSL_CTX
...
Reviewed-by: Matt Caswell <matt@openssl.org>
Reviewed-by: Neil Horman <nhorman@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/22037 )
2024-02-02 11:49:34 +00:00
Hugo Landau
407bcc8d55
QLOG: QUIC CHANNEL: Allow a log title to be specified
...
Reviewed-by: Matt Caswell <matt@openssl.org>
Reviewed-by: Neil Horman <nhorman@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/22037 )
2024-02-02 11:49:34 +00:00
Hugo Landau
faf0912a2f
QLOG: Events: Implement recovery:packet_lost
...
Reviewed-by: Matt Caswell <matt@openssl.org>
Reviewed-by: Neil Horman <nhorman@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/22037 )
2024-02-02 11:49:34 +00:00
Hugo Landau
40c835dac7
QLOG: Wiring: QUIC TXPIM: Record the packet type
...
Reviewed-by: Matt Caswell <matt@openssl.org>
Reviewed-by: Neil Horman <nhorman@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/22037 )
2024-02-02 11:49:34 +00:00
Hugo Landau
3e52878039
QLOG: Wiring: QUIC FIFD
...
Reviewed-by: Matt Caswell <matt@openssl.org>
Reviewed-by: Neil Horman <nhorman@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/22037 )
2024-02-02 11:49:34 +00:00
Hugo Landau
285a76bda0
QLOG: Wiring: QUIC QRX: Report the datagram ID from the DEMUX
...
Reviewed-by: Matt Caswell <matt@openssl.org>
Reviewed-by: Neil Horman <nhorman@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/22037 )
2024-02-02 11:49:34 +00:00
Hugo Landau
266a827d81
QLOG: Wiring: QUIC DEMUX: Report a monotonically increasing datagram ID
...
Reviewed-by: Matt Caswell <matt@openssl.org>
Reviewed-by: Neil Horman <nhorman@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/22037 )
2024-02-02 11:49:34 +00:00
Hugo Landau
a0a3a94912
QLOG: Events: Implement connectivity:connection_closed
...
Reviewed-by: Matt Caswell <matt@openssl.org>
Reviewed-by: Neil Horman <nhorman@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/22037 )
2024-02-02 11:49:34 +00:00
Hugo Landau
da6a9a2e33
QLOG: Events: Implement transport:parameters_set
...
Reviewed-by: Matt Caswell <matt@openssl.org>
Reviewed-by: Neil Horman <nhorman@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/22037 )
2024-02-02 11:49:34 +00:00
Hugo Landau
8fbac4d70e
QLOG: Events: Implement connectivity:connection_state_updated
...
Reviewed-by: Matt Caswell <matt@openssl.org>
Reviewed-by: Neil Horman <nhorman@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/22037 )
2024-02-02 11:49:34 +00:00
Hugo Landau
4cecbc5400
QLOG: Events: Implement connectivity:connection_started
...
Reviewed-by: Matt Caswell <matt@openssl.org>
Reviewed-by: Neil Horman <nhorman@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/22037 )
2024-02-02 11:49:34 +00:00
Hugo Landau
2031c0e928
QLOG: Wiring: QUIC CHANNEL
...
Reviewed-by: Matt Caswell <matt@openssl.org>
Reviewed-by: Neil Horman <nhorman@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/22037 )
2024-02-02 11:49:34 +00:00
Hugo Landau
00b27f33e6
QLOG: Frontend: Implementation
...
Reviewed-by: Matt Caswell <matt@openssl.org>
Reviewed-by: Neil Horman <nhorman@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/22037 )
2024-02-02 11:49:34 +00:00
Hugo Landau
9c89b9fe1b
QLOG: JSON Encoder: Implementation
...
Reviewed-by: Matt Caswell <matt@openssl.org>
Reviewed-by: Neil Horman <nhorman@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/22037 )
2024-02-02 11:49:34 +00:00
Hugo Landau
89dd87e1e8
libssl: Make some global mutable structures constant
...
x
Reviewed-by: Matt Caswell <matt@openssl.org>
Reviewed-by: Neil Horman <nhorman@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/23450 )
2024-02-02 09:10:12 +00:00
Neil Horman
d2e7855f5b
Check all frames for stateless reset conditions
...
In writing the quic stateless reset test we found that the quic rx code
wasn't checking for stateless reest conditions, as the SRT frames were
getting discarded due to failed lcdim lookups. Move the SRT check above
the lcdim lookup in the rx path to ensure we handle SRT properly in the
client.
Reviewed-by: Hugo Landau <hlandau@openssl.org>
Reviewed-by: Tomas Mraz <tomas@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/23384 )
2024-01-31 08:45:56 -05:00
Matt Caswell
f7f2b665cf
Free the QUIC TLS object before freeing the channel
...
Freeing the QUIC TLS object may make calls back into QUIC so we should
free it first.
Reviewed-by: Hugo Landau <hlandau@openssl.org>
Reviewed-by: Tomas Mraz <tomas@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/23256 )
2024-01-31 10:10:55 +00:00
Matt Caswell
fa4b1151c8
Free the tserver TLS object before freeing the channel
...
The TLS object may make callbacks into QUIC during cleanup so we must
free it first.
Reviewed-by: Hugo Landau <hlandau@openssl.org>
Reviewed-by: Tomas Mraz <tomas@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/23256 )
2024-01-31 10:10:55 +00:00
Matt Caswell
4a0e4849af
Rationalise RECORD_LAYER_clear() and clear_record_layer()
...
We had two functions which were very similarly named, that did almost the
same thing, but not quite. We bring the two together. Doing this also fixes
a possible bug where some data may not be correctly freed when the
RECORD_LAYER_clear() version was used.
Reviewed-by: Hugo Landau <hlandau@openssl.org>
Reviewed-by: Tomas Mraz <tomas@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/23256 )
2024-01-31 10:10:55 +00:00
Matt Caswell
a86714041d
When selecting a method ensure we use the correct client/server version
...
Using the client one when the server once should be used could cause a
later call to SSL_set_accept_state() to unexpectedly fail.
Reviewed-by: Hugo Landau <hlandau@openssl.org>
Reviewed-by: Tomas Mraz <tomas@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/23256 )
2024-01-31 10:10:55 +00:00
Matt Caswell
5fb065589d
Fix an assertion failure in tls_common.c
...
When we clear the record layer, we better make sure we clear all relevant
fields, otherwise we can get ourselves into an unexpected state.
Fixes #23255
Reviewed-by: Hugo Landau <hlandau@openssl.org>
Reviewed-by: Tomas Mraz <tomas@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/23256 )
2024-01-31 10:10:41 +00:00
rilysh
0f644b96d2
replace strstr() with strchr() for single characters
...
strstr() is used to match multiple characters in the haystack,
whereas strchr() is used to matched only single character.
CLA: trivial
Reviewed-by: Tom Cosgrove <tom.cosgrove@arm.com>
Reviewed-by: Matt Caswell <matt@openssl.org>
Reviewed-by: Tomas Mraz <tomas@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/23347 )
2024-01-25 16:39:09 +01:00
Neil Horman
6f22bcd631
Add appropriate NULL checks in EVP_CIPHER api
...
The EVP_CIPHER api currently assumes that calls made into several APIs
have already initalized the cipher in a given context via a call to
EVP_CipherInit[_ex[2]]. If that hasnt been done, instead of an error,
the result is typically a SIGSEGV.
Correct that by adding missing NULL checks in the apropriate apis prior
to using ctx->cipher
Reviewed-by: Tomas Mraz <tomas@openssl.org>
Reviewed-by: Matt Caswell <matt@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/22995 )
2024-01-25 08:27:53 -05:00