]> git.ipfire.org Git - thirdparty/openssl.git/log
thirdparty/openssl.git
16 months agoFix test cases using NEW_CONNECTION_ID frame
Tomas Mraz [Fri, 5 May 2023 15:40:55 +0000 (17:40 +0200)] 
Fix test cases using NEW_CONNECTION_ID frame

seq_id must be >= retire_prior_to.

Add negative testcase.

Reviewed-by: Hugo Landau <hlandau@openssl.org>
Reviewed-by: Paul Dale <pauli@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/20892)

16 months agoAdd minimal handling of NEW_CONNECTION_ID frames
Tomas Mraz [Fri, 5 May 2023 14:51:28 +0000 (16:51 +0200)] 
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)

16 months agoquic_txp_test.c: Cleanup use of WPACKET
Tomas Mraz [Fri, 5 May 2023 14:46:42 +0000 (16:46 +0200)] 
quic_txp_test.c: Cleanup use of WPACKET

Reviewed-by: Hugo Landau <hlandau@openssl.org>
Reviewed-by: Paul Dale <pauli@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/20892)

16 months agoQUIC Documentation: update man(7) for multi-stream
Hugo Landau [Fri, 12 May 2023 14:05:19 +0000 (15:05 +0100)] 
QUIC Documentation: update man(7) for multi-stream

Reviewed-by: Matt Caswell <matt@openssl.org>
Reviewed-by: Tomas Mraz <tomas@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/19899)

16 months agoQUIC man(7) Documentation
Hugo Landau [Tue, 13 Dec 2022 16:37:17 +0000 (16:37 +0000)] 
QUIC man(7) Documentation

Reviewed-by: Matt Caswell <matt@openssl.org>
Reviewed-by: Tomas Mraz <tomas@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/19899)

16 months agoFix stack corruption in ui_read
Bernd Edlinger [Sat, 13 May 2023 07:04:18 +0000 (09:04 +0200)] 
Fix stack corruption in ui_read

This is an alternative to #20893

Additionally this fixes also a possible issue in UI_UTIL_read_pw:

When UI_new returns NULL, the result code would still be zero
as if UI_UTIL_read_pw succeeded, but the password buffer is left
uninitialized, with subsequent possible stack corruption or worse.

Reviewed-by: Richard Levitte <levitte@openssl.org>
Reviewed-by: Tomas Mraz <tomas@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/20957)

16 months agoFixed EVP_PKEY_CTX_set_ec_paramgen_curve_nid() for SM2 in ENGINEs
Yuan, Shuai [Wed, 10 May 2023 01:22:16 +0000 (21:22 -0400)] 
Fixed EVP_PKEY_CTX_set_ec_paramgen_curve_nid() for SM2 in ENGINEs

The CTRL translation is missing for SM2 key types.

Fixes #20899
Signed-off-by: Yuan, Shuai <shuai.yuan@intel.com>
Reviewed-by: Shane Lontis <shane.lontis@oracle.com>
Reviewed-by: Tomas Mraz <tomas@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/20900)

16 months agoQUIC: Documentation fix
Hugo Landau [Thu, 11 May 2023 11:38:23 +0000 (12:38 +0100)] 
QUIC: Documentation fix

Reviewed-by: Matt Caswell <matt@openssl.org>
Reviewed-by: Tomas Mraz <tomas@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/20765)

16 months agoQUIC APL: De-publicise SSL_attach_stream/SSL_detach_stream
Hugo Landau [Tue, 9 May 2023 10:35:16 +0000 (11:35 +0100)] 
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)

16 months agoQUIC: Fix CRYPTO_GET_REF
Hugo Landau [Mon, 8 May 2023 18:54:47 +0000 (19:54 +0100)] 
QUIC: Fix CRYPTO_GET_REF

Reviewed-by: Matt Caswell <matt@openssl.org>
Reviewed-by: Tomas Mraz <tomas@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/20765)

16 months agoQUIC MSST: Rename SSL_set_incoming_stream_reject_policy
Hugo Landau [Mon, 8 May 2023 18:52:45 +0000 (19:52 +0100)] 
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)

16 months agoQUIC MSST: Revise SSL_get_conn_close_info API (char)
Hugo Landau [Mon, 8 May 2023 18:46:25 +0000 (19:46 +0100)] 
QUIC MSST: Revise SSL_get_conn_close_info API (char)

Reviewed-by: Matt Caswell <matt@openssl.org>
Reviewed-by: Tomas Mraz <tomas@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/20765)

16 months agoQUIC MSST: Documentation fixes
Hugo Landau [Mon, 8 May 2023 18:42:40 +0000 (19:42 +0100)] 
QUIC MSST: Documentation fixes

Reviewed-by: Matt Caswell <matt@openssl.org>
Reviewed-by: Tomas Mraz <tomas@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/20765)

16 months agoQUIC MSST: Fix test on macOS
Hugo Landau [Tue, 2 May 2023 14:23:15 +0000 (15:23 +0100)] 
QUIC MSST: Fix test on macOS

Reviewed-by: Matt Caswell <matt@openssl.org>
Reviewed-by: Tomas Mraz <tomas@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/20765)

16 months agoQUIC MSST: Further documentation fixes
Hugo Landau [Tue, 2 May 2023 14:23:01 +0000 (15:23 +0100)] 
QUIC MSST: Further documentation fixes

Reviewed-by: Matt Caswell <matt@openssl.org>
Reviewed-by: Tomas Mraz <tomas@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/20765)

16 months agoQUIC MSST: Clarify default XSO transitions
Hugo Landau [Tue, 2 May 2023 07:29:43 +0000 (08:29 +0100)] 
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)

16 months agoQUIC MSST: Documentation fixes
Hugo Landau [Tue, 2 May 2023 07:29:29 +0000 (08:29 +0100)] 
QUIC MSST: Documentation fixes

Reviewed-by: Matt Caswell <matt@openssl.org>
Reviewed-by: Tomas Mraz <tomas@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/20765)

16 months agoQUIC APL: Fix a bug where avail could be used uninitialized
Hugo Landau [Thu, 27 Apr 2023 15:06:01 +0000 (16:06 +0100)] 
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)

16 months agoQUIC MSST: Test that SSL_free works in either order
Hugo Landau [Thu, 27 Apr 2023 14:54:12 +0000 (15:54 +0100)] 
QUIC MSST: Test that SSL_free works in either order

Reviewed-by: Matt Caswell <matt@openssl.org>
Reviewed-by: Tomas Mraz <tomas@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/20765)

16 months agoQUIC APL: Handle reference for multiple streams counting correctly
Hugo Landau [Thu, 27 Apr 2023 14:53:33 +0000 (15:53 +0100)] 
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)

16 months agoREFCOUNT: Add support for querying refcount
Hugo Landau [Thu, 27 Apr 2023 14:52:44 +0000 (15:52 +0100)] 
REFCOUNT: Add support for querying refcount

Reviewed-by: Matt Caswell <matt@openssl.org>
Reviewed-by: Tomas Mraz <tomas@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/20765)

16 months agoQUIC APL: Fix logic of SSL_get_stream_type
Hugo Landau [Wed, 26 Apr 2023 14:57:18 +0000 (15:57 +0100)] 
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)

16 months agoQUIC MSST: Minor fixes and cleanups
Hugo Landau [Wed, 26 Apr 2023 14:56:59 +0000 (15:56 +0100)] 
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)

16 months agoQUIC MSST: Documentation updates
Hugo Landau [Wed, 26 Apr 2023 14:55:33 +0000 (15:55 +0100)] 
QUIC MSST: Documentation updates

Reviewed-by: Matt Caswell <matt@openssl.org>
Reviewed-by: Tomas Mraz <tomas@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/20765)

16 months agoQUIC MSST: Fix tests on platforms with non-deterministic loopback interface behaviour...
Hugo Landau [Thu, 20 Apr 2023 14:39:18 +0000 (15:39 +0100)] 
QUIC MSST: Fix tests on platforms with non-deterministic loopback interface behaviour (Apple)

Reviewed-by: Matt Caswell <matt@openssl.org>
Reviewed-by: Tomas Mraz <tomas@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/20765)

16 months agoQUIC QRX: Fix a list usage bug
Hugo Landau [Wed, 19 Apr 2023 19:11:33 +0000 (20:11 +0100)] 
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)

16 months agoMinor fixups
Hugo Landau [Tue, 18 Apr 2023 18:37:49 +0000 (19:37 +0100)] 
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)

16 months agoQUIC MSST: Tests
Hugo Landau [Tue, 18 Apr 2023 18:30:56 +0000 (19:30 +0100)] 
QUIC MSST: Tests

Reviewed-by: Matt Caswell <matt@openssl.org>
Reviewed-by: Tomas Mraz <tomas@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/20765)

16 months agoQUIC APL: Fix a bug where incoming unidirectional streams weren't detected
Hugo Landau [Tue, 18 Apr 2023 18:30:56 +0000 (19:30 +0100)] 
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)

16 months agoQUIC TSERVER: Allow STOP_SENDING/RESET_STREAM to be queried
Hugo Landau [Tue, 18 Apr 2023 18:30:56 +0000 (19:30 +0100)] 
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)

16 months agoQUIC TSERVER: Handle FINs correctly if ossl_quic_tserver_read is not called first
Hugo Landau [Tue, 18 Apr 2023 18:30:56 +0000 (19:30 +0100)] 
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)

16 months agoQUIC QSM: Minor bugfixes
Hugo Landau [Tue, 18 Apr 2023 18:30:56 +0000 (19:30 +0100)] 
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)

16 months agoQUIC MSST: make update
Hugo Landau [Tue, 18 Apr 2023 18:30:56 +0000 (19:30 +0100)] 
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)

16 months agoQUIC MSST: Add documentation for new APIs
Hugo Landau [Tue, 18 Apr 2023 18:30:56 +0000 (19:30 +0100)] 
QUIC MSST: Add documentation for new APIs

Reviewed-by: Matt Caswell <matt@openssl.org>
Reviewed-by: Tomas Mraz <tomas@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/20765)

16 months agoQUIC APL: Send STOP_SENDING/RESET_STREAM when XSO is freed
Hugo Landau [Tue, 18 Apr 2023 18:30:56 +0000 (19:30 +0100)] 
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)

16 months agoQUIC QSM: Stream garbage collection
Hugo Landau [Tue, 18 Apr 2023 18:30:56 +0000 (19:30 +0100)] 
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)

16 months agoQUIC FIFD: Add support for callback on frame ACK
Hugo Landau [Tue, 18 Apr 2023 18:30:56 +0000 (19:30 +0100)] 
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)

16 months agoQUIC DISPATCH/APL: Add SSL_stream_reset and status query APIs
Hugo Landau [Tue, 18 Apr 2023 18:30:56 +0000 (19:30 +0100)] 
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)

16 months agoQUIC RXDP: Record STOP_SENDING/RESET_STREAM event AEC codes consistently
Hugo Landau [Tue, 18 Apr 2023 18:30:56 +0000 (19:30 +0100)] 
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)

16 months agoQUIC QSM: Clean up SEND_STREAM/RECV_STREAM handling
Hugo Landau [Tue, 18 Apr 2023 18:30:55 +0000 (19:30 +0100)] 
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)

16 months agoQUIC CHANNEL: Do not copy terminate cause as it is not modified after termination
Hugo Landau [Tue, 18 Apr 2023 18:30:55 +0000 (19:30 +0100)] 
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)

16 months agoQUIC QSM: Handle STOP_SENDING correctly
Hugo Landau [Tue, 18 Apr 2023 18:30:55 +0000 (19:30 +0100)] 
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)

16 months agoQUIC RXDP/QSM: Enforce MAX_STREAMS
Hugo Landau [Tue, 18 Apr 2023 18:30:55 +0000 (19:30 +0100)] 
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)

16 months agoQUIC TXP/CHANNEL: Generate MAX_STREAMS using RXFC
Hugo Landau [Tue, 18 Apr 2023 18:30:55 +0000 (19:30 +0100)] 
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)

16 months agoQUIC FC: Modify RXFC to support use for enforcing MAX_STREAMS
Hugo Landau [Tue, 18 Apr 2023 18:30:55 +0000 (19:30 +0100)] 
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)

16 months agoQUIC CHANNEL: Incoming streams implicitly create lower-numbered streams
Hugo Landau [Tue, 18 Apr 2023 18:30:55 +0000 (19:30 +0100)] 
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)

16 months agoQUIC: Update faults test to use streams correctly
Hugo Landau [Tue, 18 Apr 2023 18:30:55 +0000 (19:30 +0100)] 
QUIC: Update faults test to use 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)

16 months agoQUIC FIFD: Ensure QUIC_STREAM is updated after QUIC_SSTREAM loss
Hugo Landau [Tue, 18 Apr 2023 18:30:55 +0000 (19:30 +0100)] 
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)

16 months agoQUIC APL: Fix locking in XSO code and fix tests
Hugo Landau [Tue, 18 Apr 2023 18:30:55 +0000 (19:30 +0100)] 
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)

16 months agoQUIC CHANNEL, APL: Reject policy handling
Hugo Landau [Tue, 18 Apr 2023 18:30:55 +0000 (19:30 +0100)] 
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)

16 months agoQUIC DISPATCH/APL: SSL_accept_stream, SSL_get_accept_queue_len
Hugo Landau [Tue, 18 Apr 2023 18:30:55 +0000 (19:30 +0100)] 
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)

16 months agoQUIC DISPATCH/APL: Add SSL_set_incoming_stream_reject_policy (unwired)
Hugo Landau [Tue, 18 Apr 2023 18:30:55 +0000 (19:30 +0100)] 
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)

16 months agoQUIC DISPATCH/APL: Implement SSL_set_default_stream_mode, default XSO refactor
Hugo Landau [Tue, 18 Apr 2023 18:30:55 +0000 (19:30 +0100)] 
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)

16 months agoQUIC DISPATCH/APL: Implement SSL_get_stream_id
Hugo Landau [Tue, 18 Apr 2023 18:30:55 +0000 (19:30 +0100)] 
QUIC DISPATCH/APL: Implement SSL_get_stream_id

Reviewed-by: Matt Caswell <matt@openssl.org>
Reviewed-by: Tomas Mraz <tomas@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/20765)

16 months agoQUIC DISPATCH/APL: Implement SSL_get_stream_type
Hugo Landau [Tue, 18 Apr 2023 18:30:55 +0000 (19:30 +0100)] 
QUIC DISPATCH/APL: Implement 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)

16 months agoQUIC DISPATCH/APL: Implement SSL_is_connection
Hugo Landau [Tue, 18 Apr 2023 18:30:54 +0000 (19:30 +0100)] 
QUIC DISPATCH/APL: Implement SSL_is_connection

Reviewed-by: Matt Caswell <matt@openssl.org>
Reviewed-by: Tomas Mraz <tomas@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/20765)

16 months agoQUIC DISPATCH/APL: Implement SSL_get0_connection
Hugo Landau [Tue, 18 Apr 2023 18:30:54 +0000 (19:30 +0100)] 
QUIC DISPATCH/APL: Implement SSL_get0_connection

Reviewed-by: Matt Caswell <matt@openssl.org>
Reviewed-by: Tomas Mraz <tomas@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/20765)

16 months agoQUIC APL: Defer default XSO creation
Hugo Landau [Tue, 18 Apr 2023 18:30:54 +0000 (19:30 +0100)] 
QUIC APL: Defer default XSO creation

QUIC in single-stream mode could be used with a protocol where the
server writes first or the client writes first. This determines
whether the single stream would be client or server initiated,
which affects the stream ID allocated to the stream. We should support
both client-sends-first and server-sends-first application protocols.
Thus, defer default XSO creation until the point in time at which
we know whether a client-first or server-first application protocol
is being used. We do this by taking whether SSL_read() or SSL_write()
is called first as a cue.

Reviewed-by: Matt Caswell <matt@openssl.org>
Reviewed-by: Tomas Mraz <tomas@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/20765)

16 months agoQUIC TSERVER: Add support for multiple streams
Hugo Landau [Tue, 18 Apr 2023 18:30:54 +0000 (19:30 +0100)] 
QUIC TSERVER: Add support for multiple streams

Reviewed-by: Matt Caswell <matt@openssl.org>
Reviewed-by: Tomas Mraz <tomas@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/20765)

16 months agoQUIC CHANNEL: Initialise state, FC credit for new streams correctly
Hugo Landau [Tue, 18 Apr 2023 18:30:54 +0000 (19:30 +0100)] 
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)

16 months agoQUIC CHANNEL: Handle incoming remotely-created streams
Hugo Landau [Tue, 18 Apr 2023 18:30:54 +0000 (19:30 +0100)] 
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)

16 months agoQUIC APL: Add stream creation APIs
Hugo Landau [Tue, 18 Apr 2023 18:30:54 +0000 (19:30 +0100)] 
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)

16 months agoQUIC APL: Refactor stream-related code into QUIC_XSO object
Hugo Landau [Tue, 18 Apr 2023 18:30:54 +0000 (19:30 +0100)] 
QUIC APL: Refactor stream-related code into QUIC_XSO object

Reviewed-by: Matt Caswell <matt@openssl.org>
Reviewed-by: Tomas Mraz <tomas@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/20765)

16 months agoQUIC CHANNEL: Handle any number of streams
Hugo Landau [Tue, 18 Apr 2023 18:30:54 +0000 (19:30 +0100)] 
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)

16 months agoQUIC CHANNEL: Store TPs for initial flow control in TX direction
Hugo Landau [Tue, 18 Apr 2023 18:30:54 +0000 (19:30 +0100)] 
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)

16 months agoQUIC CHANNEL: Clarify role of RX TPs in preparation of storing TX TPs
Hugo Landau [Tue, 18 Apr 2023 18:30:54 +0000 (19:30 +0100)] 
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)

16 months agoQUIC CHANNEL: Remove stream 0-specific code
Hugo Landau [Tue, 18 Apr 2023 18:30:54 +0000 (19:30 +0100)] 
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)

16 months agoQUIC APL: Create QUIC CHANNEL up front rather than deferring creation
Hugo Landau [Tue, 18 Apr 2023 18:30:54 +0000 (19:30 +0100)] 
QUIC APL: Create QUIC CHANNEL up front rather than deferring creation

We switch to instantiating the QUIC_CHANNEL up front at QCSO
instantiation time. This creates the QUIC_STREAM_MAP early and makes it
easy for us to allocate streams prior to connection initiation. The role
(client or server) is determined at QCSO allocation time and cannot be
changed.

SSL_set_connect/accept_state() are still modelled but their usage must
be consistent with the chosen SSL_METHOD which dictates which role is
being used.

Reviewed-by: Matt Caswell <matt@openssl.org>
Reviewed-by: Tomas Mraz <tomas@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/20765)

16 months agoQUIC: Base client/server identity on SSL method, not SSL_set_connect/accept_state
Hugo Landau [Tue, 18 Apr 2023 18:30:54 +0000 (19:30 +0100)] 
QUIC: Base client/server identity on SSL method, not SSL_set_connect/accept_state

In QUIC, we have an architectural need (in future, when we implement
0-RTT, etc.) to be able to create streams before we start connecting.
This requires we allocate a stream, including a stream ID, after
creating a QCSO but prior to connecting. However stream IDs are
dependent on whether the endpoint is in the client or server role,
therefore we must know whether we are going to be a client or server
before any pre-connection streams are created. Moreover, the originally
defined QUIC_client_method() and QUIC_server_method() functions heavily
implied the original plan was to have different SSL_METHODs for clients
and servers. Up until now we had been relying on
SSL_set_connect/accept_state() instead.

Solve these problems by basing client/server identity on whether
QUIC_server_method() is used (in future, when we support servers). This
ensures that once a QCSO is created its client/server identity are fixed
and cannot change, allowing pre-connection stream IDs, etc. to be
allocated.

Client/server uncertainty was the primary reason why QUIC_CHANNEL
creation was deferred until connection time up until now, so this
enables further refactoring to facilitate eager allocation of the
QUIC_CHANNEL at QCSO allocation time. This is important as allocating a
stream including its write buffers is hard without having the
QUIC_CHANNEL (which owns the QUIC_STREAM_MAP) in existence.

Reviewed-by: Matt Caswell <matt@openssl.org>
Reviewed-by: Tomas Mraz <tomas@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/20765)

16 months agoQUIC Dispatch: Update ssl_lib.c frontend to use new dispatch style
Hugo Landau [Tue, 18 Apr 2023 18:30:53 +0000 (19:30 +0100)] 
QUIC Dispatch: Update ssl_lib.c frontend to use new dispatch style

This amends the dispatch code from ssl_lib.c to the QUIC API Personality
Layer to use the new approach of dispatching using SSL object pointers
rather than raw QUIC_CONNECTION pointers. This completes the said
refactor.

Reviewed-by: Matt Caswell <matt@openssl.org>
Reviewed-by: Tomas Mraz <tomas@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/20765)

16 months agoQUIC Dispatch: Add simple way to determine if SSL object is QUIC-related
Hugo Landau [Tue, 18 Apr 2023 18:30:53 +0000 (19:30 +0100)] 
QUIC Dispatch: Add simple way to determine if SSL object is QUIC-related

Reviewed-by: Matt Caswell <matt@openssl.org>
Reviewed-by: Tomas Mraz <tomas@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/20765)

16 months agoQUIC Dispatch: Refactor APL interface to use SSL pointers not QC pointers
Hugo Landau [Tue, 18 Apr 2023 18:30:53 +0000 (19:30 +0100)] 
QUIC Dispatch: Refactor APL interface to use SSL pointers not QC pointers

We now refactor the interface between ssl_lib.c frontend functions and
the QUIC API Personality Layer so that the respective functions
comprising the interface use SSL object pointers rather than raw
QUIC_CONNECTION pointers. This is in preparation for stream support
since once streams are supported, calls to e.g. ossl_quic_write() may be
made on a QUIC_CONNECTION or a QUIC_XSO (that is, a stream object). Thus
we take a uniform approach across all functions comprising the interface
between the ssl_lib.c frontend and the QUIC API Personality Layer of
using SSL pointers always. This provides a uniform approach  and
ensures that any function of the API personality layer can be easily
adapted to support being called on a stream object in the future.

Reviewed-by: Matt Caswell <matt@openssl.org>
Reviewed-by: Tomas Mraz <tomas@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/20765)

16 months agoQUIC Dispatch: Introduce the QUIC_XSO object
Hugo Landau [Tue, 18 Apr 2023 18:30:53 +0000 (19:30 +0100)] 
QUIC Dispatch: Introduce the QUIC_XSO object

The QUIC_XSO (external stream object) is to a QUIC stream what a
QUIC_CONNECTION is to a QUIC connection. Both are SSL objects. The
QUIC_CONNECTION type is the internal representation of a QUIC connection
SSL object (QCSO) and the QUIC_XSO type is the internal representation
of a QUIC stream SSL object (QSSO) type. The name QUIC_XSO has been
chosen to be distinct from the existing QUIC_STREAM type which is our
existing internal stream type. QUIC_XSO is to a QUIC_STREAM what
QUIC_CONNECTION is to a QUIC_CHANNEL; in other words, QUIC_CONNECTION
and QUIC_XSO objects form part of the API personality layer, whereas
QUIC_CHANNEL and QUIC_STREAM objects form part of the QUIC core and are
distinct from the API personality layer.

Reviewed-by: Matt Caswell <matt@openssl.org>
Reviewed-by: Tomas Mraz <tomas@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/20765)

16 months agoQUIC Dispatch: Enhance SSL object unwrapping functions (core)
Hugo Landau [Tue, 18 Apr 2023 18:30:53 +0000 (19:30 +0100)] 
QUIC Dispatch: Enhance SSL object unwrapping functions (core)

Uniform changes to all dispatch functions to use the new dispatch
functionality follows this commit. Separated into a core commit
and a commit containing the uniform pattern (monotonous) changes
for ease of review.

Reviewed-by: Matt Caswell <matt@openssl.org>
Reviewed-by: Tomas Mraz <tomas@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/20765)

16 months agoCMP client: fix checking new cert enrolled with oldcert and without private key
Dr. David von Oheimb [Tue, 25 Apr 2023 17:26:36 +0000 (19:26 +0200)] 
CMP client: fix checking new cert enrolled with oldcert and without private key

Reviewed-by: Tomas Mraz <tomas@openssl.org>
Reviewed-by: Todd Short <todd.short@me.com>
Reviewed-by: David von Oheimb <david.von.oheimb@siemens.com>
(Merged from https://github.com/openssl/openssl/pull/20832)

16 months agoCMP client: fix error response on -csr without private key, also in docs
Dr. David von Oheimb [Tue, 25 Apr 2023 17:14:34 +0000 (19:14 +0200)] 
CMP client: fix error response on -csr without private key, also in docs

Reviewed-by: Tomas Mraz <tomas@openssl.org>
Reviewed-by: Todd Short <todd.short@me.com>
Reviewed-by: David von Oheimb <david.von.oheimb@siemens.com>
(Merged from https://github.com/openssl/openssl/pull/20832)

16 months agoapps/openssl.cnf: fix reference to insta.ca.crt
Dr. David von Oheimb [Tue, 25 Apr 2023 10:21:33 +0000 (12:21 +0200)] 
apps/openssl.cnf: fix reference to insta.ca.crt

Reviewed-by: Tomas Mraz <tomas@openssl.org>
Reviewed-by: Todd Short <todd.short@me.com>
Reviewed-by: David von Oheimb <david.von.oheimb@siemens.com>
(Merged from https://github.com/openssl/openssl/pull/20832)

16 months agoprovider: return error if buf too small when getting ec pubkey param
Yi Li [Fri, 5 May 2023 03:30:05 +0000 (11:30 +0800)] 
provider: return error if buf too small when getting ec pubkey param

Fixes #20889

There was an incorrect value passed to EC_POINT_point2oct() for the
buffer size of the param passed-in.

Added testcases.

Signed-off-by: Yi Li <yi1.li@intel.com>
Reviewed-by: Paul Dale <pauli@openssl.org>
Reviewed-by: Tomas Mraz <tomas@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/20890)

16 months agoFix typos found by codespell
Dimitri Papadopoulos [Wed, 10 May 2023 10:10:57 +0000 (12:10 +0200)] 
Fix typos found by codespell

Fix only typos in doc/man* for inclusion in 3.* branches.

Other typos have been fixed in a different commit.

Reviewed-by: Paul Dale <pauli@openssl.org>
Reviewed-by: Tomas Mraz <tomas@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/20924)

16 months agoClarify documentation of SSL_SESSION_dup
Watson Ladd [Thu, 27 Apr 2023 17:16:49 +0000 (10:16 -0700)] 
Clarify documentation of SSL_SESSION_dup

Reviewed-by: Matt Caswell <matt@openssl.org>
Reviewed-by: Todd Short <todd.short@me.com>
Reviewed-by: Tomas Mraz <tomas@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/20848)

16 months agoClear ownership when duplicating sessions
Watson Ladd [Thu, 27 Apr 2023 17:14:51 +0000 (10:14 -0700)] 
Clear ownership when duplicating sessions

Reviewed-by: Matt Caswell <matt@openssl.org>
Reviewed-by: Todd Short <todd.short@me.com>
Reviewed-by: Tomas Mraz <tomas@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/20848)

16 months agoecp_nistp256.c: Fix exponent in comment
Jonas Lindstrøm [Wed, 10 May 2023 10:47:10 +0000 (12:47 +0200)] 
ecp_nistp256.c: Fix exponent in comment

CLA: trivial

Reviewed-by: Hugo Landau <hlandau@openssl.org>
Reviewed-by: Tomas Mraz <tomas@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/20926)

16 months agofix SSL_get_wbio may return rbio on quic
ihciah [Wed, 10 May 2023 15:07:08 +0000 (15:07 +0000)] 
fix SSL_get_wbio may return rbio on quic

CLA: trivial

Reviewed-by: Hugo Landau <hlandau@openssl.org>
Reviewed-by: Paul Dale <pauli@openssl.org>
Reviewed-by: Tomas Mraz <tomas@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/20930)

16 months agoFixed TLS1.3 handshake issue for legacy engine API.
Yuan, Shuai [Wed, 10 May 2023 08:49:54 +0000 (04:49 -0400)] 
Fixed TLS1.3 handshake issue for legacy engine API.

Signed-off-by: Yuan, Shuai <shuai.yuan@intel.com>
Reviewed-by: Matt Caswell <matt@openssl.org>
Reviewed-by: Tomas Mraz <tomas@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/20922)

16 months agoFix a typo found by codespell in a variable name
Dimitri Papadopoulos [Tue, 9 May 2023 10:21:36 +0000 (12:21 +0200)] 
Fix a typo found by codespell in a variable name

The change is limited to a single C file.

CLA: trivial

Reviewed-by: Hugo Landau <hlandau@openssl.org>
Reviewed-by: Richard Levitte <levitte@openssl.org>
Reviewed-by: Paul Dale <pauli@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/20912)

16 months agorestrict rsaBITS algorithm name check in speed
Michael Baentsch [Mon, 8 May 2023 04:32:37 +0000 (06:32 +0200)] 
restrict rsaBITS algorithm name check in speed

Reviewed-by: Matt Caswell <matt@openssl.org>
Reviewed-by: Paul Dale <pauli@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/20898)

16 months agoCMP app: fix deallocated host/port fields in APP_HTTP_TLS_INFO
Dr. David von Oheimb [Mon, 16 Jan 2023 14:48:24 +0000 (15:48 +0100)] 
CMP app: fix deallocated host/port fields in APP_HTTP_TLS_INFO

Reviewed-by: Tomas Mraz <tomas@openssl.org>
Reviewed-by: Matt Caswell <matt@openssl.org>
Reviewed-by: Hugo Landau <hlandau@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/20034)

16 months agoCMP app and app_http_tls_cb(): pick the right TLS hostname (also without port)
Dr. David von Oheimb [Thu, 12 Jan 2023 09:54:50 +0000 (10:54 +0100)] 
CMP app and app_http_tls_cb(): pick the right TLS hostname (also without port)

Fixes #20031

Reviewed-by: Tomas Mraz <tomas@openssl.org>
Reviewed-by: Matt Caswell <matt@openssl.org>
Reviewed-by: Hugo Landau <hlandau@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/20034)

16 months agoFix a typo found by codespell in a Makefile variable
Dimitri Papadopoulos [Tue, 9 May 2023 09:50:06 +0000 (11:50 +0200)] 
Fix a typo found by codespell in a Makefile variable

I have no experience with building on Windows, so I don't know the
effect of fixing this typo. I guess that this will fix a bug at worst.

CLA: trivial

Reviewed-by: Hugo Landau <hlandau@openssl.org>
Reviewed-by: Paul Dale <pauli@openssl.org>
Reviewed-by: Richard Levitte <levitte@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/20911)

16 months agoDLTS → DTLS
Dimitri Papadopoulos [Tue, 9 May 2023 06:04:20 +0000 (08:04 +0200)] 
DLTS → DTLS

Fix a typo that is confusing for newcomers.

CLA: trivial

Reviewed-by: Hugo Landau <hlandau@openssl.org>
Reviewed-by: Tomas Mraz <tomas@openssl.org>
Reviewed-by: Paul Dale <pauli@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/20909)

16 months agoFix memory leak in engine_cleanup_add_first()
Kovalev Vasiliy [Thu, 4 May 2023 12:12:33 +0000 (16:12 +0400)] 
Fix memory leak in engine_cleanup_add_first()

Fixes #20870

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/20880)

16 months agoaes-gcm-armv8_64 asm support bigdian
JerryDevis [Sat, 11 Mar 2023 10:35:23 +0000 (18:35 +0800)] 
aes-gcm-armv8_64 asm support bigdian

Reviewed-by: Tom Cosgrove <tom.cosgrove@arm.com>
Reviewed-by: Tomas Mraz <tomas@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/20489)

(cherry picked from commit 32344a74b7ee2693a5bfda361c40ec60ab5be624)

16 months agoFix stack use-after-free in QUIC
Juergen Christ [Mon, 8 May 2023 09:15:32 +0000 (11:15 +0200)] 
Fix stack use-after-free in QUIC

When running test_quicapi on master on a Fedora 38 with santizier, a stack
use-after-free is reported:

```
75-test_quicapi.t ..
=================================================================
==28379==ERROR: AddressSanitizer: stack-use-after-return on address 0x03ffa22a2961 at pc 0x03ffa507384a bp 0x03fffb576d68 sp 0x03fffb576550
READ of size 8 at 0x03ffa22a2961 thread T0
    #0 0x3ffa5073849 in memcpy (/usr/lib64/libasan.so.8+0x73849) (BuildId: ce24d4ce2e06892c2e9105155979b957089a182c)
    #1 0x118b883 in tls_handle_alpn ssl/statem/statem_srvr.c:2221
    #2 0x111569d in tls_parse_all_extensions ssl/statem/extensions.c:813
    #3 0x118e2bf in tls_early_post_process_client_hello ssl/statem/statem_srvr.c:1957
    #4 0x118e2bf in tls_post_process_client_hello ssl/statem/statem_srvr.c:2290
    #5 0x113d797 in read_state_machine ssl/statem/statem.c:712
    #6 0x113d797 in state_machine ssl/statem/statem.c:478
    #7 0x10729f3 in SSL_do_handshake ssl/ssl_lib.c:4669
    #8 0x11cec2d in ossl_quic_tls_tick ssl/quic/quic_tls.c:717
    #9 0x11afb03 in ch_tick ssl/quic/quic_channel.c:1296
    #10 0x10cd1a9 in ossl_quic_reactor_tick ssl/quic/quic_reactor.c:79
    #11 0x10d948b in ossl_quic_tserver_tick ssl/quic/quic_tserver.c:160
    #12 0x1021ead in qtest_create_quic_connection test/helpers/quictestlib.c:273
    #13 0x102b81d in test_quic_write_read test/quicapitest.c:54
    #14 0x12035a9 in run_tests test/testutil/driver.c:370
    #15 0x1013203 in main test/testutil/main.c:30
    #16 0x3ffa463262b in __libc_start_call_main (/usr/lib64/libc.so.6+0x3262b) (BuildId: 6bd4a775904d85009582d6887da4767128897d0e)
    #17 0x3ffa463272d in __libc_start_main_impl (/usr/lib64/libc.so.6+0x3272d) (BuildId: 6bd4a775904d85009582d6887da4767128897d0e)
    #18 0x101efb9  (/root/openssl/test/quicapitest+0x101efb9) (BuildId: 075e387adf6d0032320aaa18061f13e9565ab481)
Address 0x03ffa22a2961 is located in stack of thread T0 at offset 33 in frame
    #0 0x10d868f in alpn_select_cb ssl/quic/quic_tserver.c:49
  This frame has 1 object(s):
    [32, 41) 'alpn' (line 50) <== Memory access at offset 33 is inside this variable
HINT: this may be a false positive if your program uses some custom stack unwind mechanism, swapcontext or vfork
      (longjmp and C++ exceptions *are* supported)
SUMMARY: AddressSanitizer: stack-use-after-return (/usr/lib64/libasan.so.8+0x73849) (BuildId: ce24d4ce2e06892c2e9105155979b957089a182c) in memcpy
Shadow bytes around the buggy address:
  0x03ffa22a2680: f5 f5 f5 f5 f5 f5 f5 f5 f5 f5 f5 f5 f5 f5 f5 f5
  0x03ffa22a2700: f5 f5 f5 f5 f5 f5 f5 f5 f5 f5 f5 f5 f5 f5 f5 f5
  0x03ffa22a2780: f5 f5 f5 f5 f5 f5 f5 f5 f5 f5 f5 f5 f5 f5 f5 f5
  0x03ffa22a2800: f5 f5 f5 f5 f5 f5 f5 f5 f5 f5 f5 f5 f5 f5 f5 f5
  0x03ffa22a2880: f5 f5 f5 f5 f5 f5 f5 f5 f5 f5 f5 f5 f5 f5 f5 f5
=>0x03ffa22a2900: f5 f5 f5 f5 f5 f5 f5 f5 f5 f5 f5 f5[f5]f5 f5 f5
  0x03ffa22a2980: f5 f5 f5 f5 f5 f5 f5 f5 f5 f5 f5 f5 f5 f5 f5 f5
  0x03ffa22a2a00: f5 f5 f5 f5 f5 f5 f5 f5 f5 f5 f5 f5 f5 f5 f5 f5
  0x03ffa22a2a80: f5 f5 f5 f5 f5 f5 f5 f5 f5 f5 f5 f5 f5 f5 f5 f5
  0x03ffa22a2b00: f5 f5 f5 f5 f5 f5 f5 f5 f5 f5 f5 f5 f5 f5 f5 f5
  0x03ffa22a2b80: f5 f5 f5 f5 f5 f5 f5 f5 f5 f5 f5 f5 f5 f5 f5 f5
Shadow byte legend (one shadow byte represents 8 application bytes):
  Addressable:           00
  Partially addressable: 01 02 03 04 05 06 07
  Heap left redzone:       fa
  Freed heap region:       fd
  Stack left redzone:      f1
  Stack mid redzone:       f2
  Stack right redzone:     f3
  Stack after return:      f5
  Stack use after scope:   f8
  Global redzone:          f9
  Global init order:       f6
  Poisoned by user:        f7
  Container overflow:      fc
  Array cookie:            ac
  Intra object redzone:    bb
  ASan internal:           fe
  Left alloca redzone:     ca
  Right alloca redzone:    cb
==28379==ABORTING
../../util/wrap.pl ../../test/quicapitest default ../../test/default.cnf ../../test/certs => 1
not ok 1 - running quicapitest
```

Fix this be making the protocols to select static constants and thereby moving
them out of the stack frame of the callback function.

Signed-off-by: Juergen Christ <jchrist@linux.ibm.com>
Reviewed-by: Paul Dale <pauli@openssl.org>
Reviewed-by: Tom Cosgrove <tom.cosgrove@arm.com>
Reviewed-by: Matt Caswell <matt@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/20904)

16 months agoUpdate the corpora submodule
Matt Caswell [Fri, 28 Apr 2023 10:08:33 +0000 (11:08 +0100)] 
Update the corpora submodule

We update the corpora submodule to include a fuzz testcase for the conf
timeout.

Reviewed-by: Paul Dale <pauli@openssl.org>
Reviewed-by: Tim Hudson <tjh@openssl.org>
Reviewed-by: Tomas Mraz <tomas@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/20839)

16 months agoPrevent a fuzzing timeout in the conf fuzzer
Matt Caswell [Wed, 26 Apr 2023 14:04:42 +0000 (15:04 +0100)] 
Prevent a fuzzing timeout in the conf fuzzer

The fuzzer was creating a config file with large numbers of includes
which are expensive to process. However this should not cause a security
issue, and should never happen in normal operation so we can ignore it.

Fixes ossfuzz issue 57718.

Reviewed-by: Paul Dale <pauli@openssl.org>
Reviewed-by: Tim Hudson <tjh@openssl.org>
Reviewed-by: Tomas Mraz <tomas@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/20839)

16 months agoDon't attempt a QUIC connection without specifying ALPN
Matt Caswell [Fri, 24 Mar 2023 12:02:37 +0000 (12:02 +0000)] 
Don't attempt a QUIC connection without specifying ALPN

ALPN is required for a successful QUIC connection, so do not allow the
-quic option for s_client without -alpn

Reviewed-by: Hugo Landau <hlandau@openssl.org>
Reviewed-by: Tim Hudson <tjh@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/20580)

16 months agoAdd some documentation for the new QUIC mode in s_client
Matt Caswell [Thu, 23 Mar 2023 16:24:52 +0000 (16:24 +0000)] 
Add some documentation for the new QUIC mode in s_client

Also mentions the new FIN command in s_client advance mode

Reviewed-by: Hugo Landau <hlandau@openssl.org>
Reviewed-by: Tim Hudson <tjh@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/20580)

16 months agoAdd the ability to send FIN on a QUIC stream from s_client
Matt Caswell [Tue, 21 Mar 2023 16:52:32 +0000 (16:52 +0000)] 
Add the ability to send FIN on a QUIC stream from s_client

Reviewed-by: Hugo Landau <hlandau@openssl.org>
Reviewed-by: Tim Hudson <tjh@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/20580)

16 months agoAdd QUIC support to s_client
Matt Caswell [Thu, 9 Mar 2023 17:06:33 +0000 (17:06 +0000)] 
Add QUIC support to s_client

Reviewed-by: Hugo Landau <hlandau@openssl.org>
Reviewed-by: Tim Hudson <tjh@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/20580)

16 months agoremove unused macro in common.h
zhangzhilei [Thu, 4 May 2023 12:33:38 +0000 (20:33 +0800)] 
remove unused macro in common.h

Reviewed-by: Todd Short <todd.short@me.com>
Reviewed-by: Tomas Mraz <tomas@openssl.org>
Reviewed-by: Paul Dale <pauli@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/20881)