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
Hugo Landau
113be15a5e
QUIC APL: Implement optimised FIN API
...
Reviewed-by: Neil Horman <nhorman@openssl.org>
Reviewed-by: Matt Caswell <matt@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/23343 )
2024-01-23 14:20:06 +00:00
Frederik Wedel-Heinen
7f7a910b6e
Removes unsed function: ssl_bad_method()
...
Reviewed-by: Neil Horman <nhorman@openssl.org>
Reviewed-by: Matt Caswell <matt@openssl.org>
Reviewed-by: Tomas Mraz <tomas@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/23307 )
2024-01-19 14:06:20 +01:00
Matt Caswell
c1decd6246
Don't apply max_frag_len checking if no Max Fragment Length extension
...
Don't check the Max Fragment Length if the it hasn't been negotiated. We
were checking it anyway, and using the default value
(SSL3_RT_MAX_PLAIN_LENGTH). This works in most cases but KTLS can cause the
record length to actually exceed this in some cases.
Fixes #23169
Reviewed-by: Tomas Mraz <tomas@openssl.org>
Reviewed-by: Neil Horman <nhorman@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/23182 )
2024-01-18 15:20:18 +00:00
Frederik Wedel-Heinen
4897bd2022
Move increment of dtls epoch to change cipher state function
...
Reviewed-by: Matt Caswell <matt@openssl.org>
Reviewed-by: Tomas Mraz <tomas@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/23212 )
2024-01-18 12:48:46 +01:00
Matt Caswell
ead44e19fa
Document SSL_R_UNEXPECTED_EOF_WHILE_READING
...
Also document that it is ok to use this for control flow decisions.
Reviewed-by: Tom Cosgrove <tom.cosgrove@arm.com>
Reviewed-by: Tomas Mraz <tomas@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/23304 )
2024-01-18 11:18:09 +01:00
Hugo Landau
9eabb30ab4
QUIC RCIDM: Minor updates
...
Reviewed-by: Matt Caswell <matt@openssl.org>
Reviewed-by: Tomas Mraz <tomas@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/23022 )
2024-01-11 11:16:27 +01:00
Hugo Landau
3ba9345eb9
QUIC RCIDM: Fix ANSI compliance
...
Reviewed-by: Matt Caswell <matt@openssl.org>
Reviewed-by: Tomas Mraz <tomas@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/23022 )
2024-01-11 11:14:18 +01:00
Hugo Landau
9575b21851
QUIC RCIDM: Add counters to support RCID count enforcement
...
Reviewed-by: Matt Caswell <matt@openssl.org>
Reviewed-by: Tomas Mraz <tomas@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/23022 )
2024-01-11 11:14:18 +01:00
Hugo Landau
044fd04cb4
QUIC SRTM: Fixes for clang
...
Reviewed-by: Matt Caswell <matt@openssl.org>
Reviewed-by: Tomas Mraz <tomas@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/23022 )
2024-01-11 11:14:18 +01:00
Hugo Landau
3fe0899ab7
QUIC RCIDM: Minor fixes
...
Reviewed-by: Matt Caswell <matt@openssl.org>
Reviewed-by: Tomas Mraz <tomas@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/23022 )
2024-01-11 11:14:18 +01:00
Hugo Landau
63f77f0454
QUIC RCIDM: Add RCIDM
...
Reviewed-by: Matt Caswell <matt@openssl.org>
Reviewed-by: Tomas Mraz <tomas@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/23022 )
2024-01-11 11:14:18 +01:00
Frederik Wedel-Heinen
0a40b23cb8
Remove wpend_ret that was only assigned and never used.
...
Reviewed-by: Neil Horman <nhorman@openssl.org>
Reviewed-by: Hugo Landau <hlandau@openssl.org>
Reviewed-by: Matt Caswell <matt@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/23191 )
2024-01-11 10:04:14 +01:00
Frederik Wedel-Heinen
6fd3794814
Simplify ssl protocol version comparisons.
...
Reviewed-by: Tomas Mraz <tomas@openssl.org>
Reviewed-by: Matt Caswell <matt@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/23163 )
2024-01-03 15:55:17 +00:00
Dimitri Papadopoulos
164a541b93
Fix new typos found by codespell
...
Reviewed-by: Paul Yang <kaishen.yy@antfin.com>
Reviewed-by: Tomas Mraz <tomas@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/23133 )
2023-12-29 10:12:05 +01:00
Hugo Landau
d59c3febdc
QUIC: Move CID generation to quic_types.c
...
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:06 +00:00
Hugo Landau
fdd60dacc4
Minor updates
...
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:06 +00:00
Hugo Landau
04c561ce4b
QUIC PORT: Add explicit cast to get_time wrapper
...
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:06 +00:00
Hugo Landau
33ca076372
Minor fixes
...
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:06 +00:00
Hugo Landau
b71046b4a4
Minor updates
...
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:06 +00:00
Hugo Landau
22739cc3ac
QUIC APL, TSERVER: Start using a QUIC_ENGINE object
...
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:06 +00:00
Hugo Landau
53f78eb721
QUIC ENGINE: Add unused QUIC_ENGINE object
...
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:06 +00:00
Hugo Landau
3e4b8e8c53
QUIC CHANNEL: Remove obsolete SRT definitions
...
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:06 +00:00
Hugo Landau
f61a37d17b
QUIC PORT: Add missing copyright header
...
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:06 +00:00
Hugo Landau
3051339887
QUIC PORT: Fix BIO_dgram usage under Winsock due to bind requirement
...
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:06 +00:00
Hugo Landau
4df4add22d
QUIC PORT: Allow errors to be tracked at port level
...
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:06 +00:00
Hugo Landau
0225d42bce
QUIC PORT: Formalise states of a port
...
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:06 +00:00
Hugo Landau
963cf3a49a
QUIC PORT: Resolve TODOs
...
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:06 +00:00
Hugo Landau
6d76d13e54
QUIC DEMUX: Remove obsolete SRT handling code
...
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:06 +00:00
Hugo Landau
29fbdfafaf
QUIC CHANNEL, LCIDM: Factor duplicate CID generation function
...
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
4760116f5a
QUIC CHANNEL: Finish cleanup of LCIDM integration
...
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
5f86ae32c2
QUIC CHANNEL: Finish moving SRT handling to SRTM
...
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
da15093a31
QUIC DEMUX: Remove legacy routing code
...
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
ef95d8ddca
QUIC QRX: Remove legacy DEMUX-QRX routing code
...
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
52dfe6f1c1
QUIC CHANNEL: Phase out use of QRX-DEMUX routing in favour of PORT-LCIDM 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
cce6fccd4e
QUIC CHANNEL: Keep a reference to our LCIDM
...
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:11:59 +00:00
Hugo Landau
0df897321d
QUIC PORT: Enable injection of incoming URXEs into a channel via default handler rather than DEMUX 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:11:59 +00:00
Hugo Landau
d743afe7e8
QUIC DEMUX: Allow parsed DCID to be learnt in default packet handler
...
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:11:59 +00:00
Hugo Landau
bbae4bb325
QUIC PORT: Create a LCIDM
...
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:11:59 +00:00
Hugo Landau
6107619899
QUIC PORT: Partially move stateless reset handling to port
...
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:11:59 +00:00
Hugo Landau
a4be37b8ce
QUIC PORT: Add SRTM wiring
...
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:11:59 +00:00
Hugo Landau
073e5bc781
QUIC CHANNEL: Remove legacy calls for functionality moved to QUIC_PORT
...
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:11:59 +00:00
Hugo Landau
632b0c7e8c
QUIC PORT, CHANNEL: Move ticking code into QUIC_PORT
...
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:11:59 +00:00
Hugo Landau
4ed6b48d9d
QUIC PORT, CHANNEL: Move DEMUX and default packet handling out of CHANNEL
...
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:11:59 +00:00
Hugo Landau
2d80e45901
QUIC PORT: Make QUIC_PORT responsible for creation of all channels
...
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:11:59 +00:00
Hugo Landau
2954287041
QUIC PORT: Record a SSL_CTX for use when creating handshake layer objects
...
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:11:59 +00:00
Hugo Landau
ce503f5c85
QUIC PORT: Keep a list of all child channels
...
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:11:59 +00:00
Hugo Landau
f98bc5c95b
QUIC CHANNEL, PORT: Abstract time retrieval
...
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:11:59 +00:00
Hugo Landau
34fa182e1d
QUIC CHANNEL, TSERVER: Move to using libctx/propq/mutex/now_cb via QUIC_PORT
...
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:11:59 +00:00
Hugo Landau
496f0beb99
QUIC CHANNEL: Make a QUIC_PORT mandatory
...
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:11:59 +00:00