openssl.git
8 months agoQUIC APL: Implement SSL_want
Hugo Landau [Thu, 31 Aug 2023 10:53:32 +0000 (11:53 +0100)]
QUIC APL: Implement SSL_want

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

8 months agoQUIC APL: Revise I/O error setting so that the last error is set on success
Hugo Landau [Thu, 31 Aug 2023 10:53:07 +0000 (11:53 +0100)]
QUIC APL: Revise I/O error setting so that the last error is set on success

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

8 months agoQUIC APL: Adjust expect_quic_conn_only
Hugo Landau [Thu, 31 Aug 2023 10:52:38 +0000 (11:52 +0100)]
QUIC APL: Adjust expect_quic_conn_only

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

8 months agoQUIC RXDP: Reuse allocations between ACK frame processing
Hugo Landau [Thu, 31 Aug 2023 12:28:34 +0000 (13:28 +0100)]
QUIC RXDP: Reuse allocations between ACK frame processing

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

8 months agoQUIC WIRE: When peeking at number of ACK ranges, ensure enough data is available
Hugo Landau [Thu, 31 Aug 2023 12:20:05 +0000 (13:20 +0100)]
QUIC WIRE: When peeking at number of ACK ranges, ensure enough data is available

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

8 months agoComment on internal flag
Hugo Landau [Thu, 31 Aug 2023 11:47:25 +0000 (12:47 +0100)]
Comment on internal flag

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

8 months agoMinor fixes
Hugo Landau [Wed, 30 Aug 2023 16:42:04 +0000 (17:42 +0100)]
Minor fixes

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

8 months agoFix after rebase
Hugo Landau [Wed, 30 Aug 2023 15:48:45 +0000 (16:48 +0100)]
Fix after rebase

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

8 months agoQUIC: Note differences in SSL_want
Hugo Landau [Wed, 30 Aug 2023 15:36:11 +0000 (16:36 +0100)]
QUIC: Note differences in SSL_want

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

8 months agoQUIC: Update API overview document
Hugo Landau [Wed, 30 Aug 2023 15:22:27 +0000 (16:22 +0100)]
QUIC: Update API overview document

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

8 months agoQUIC: Note that SSL_set_shutdown is not supported
Hugo Landau [Wed, 30 Aug 2023 15:19:05 +0000 (16:19 +0100)]
QUIC: Note that SSL_set_shutdown is not supported

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

8 months agoQUIC APL: Report that we do not support SSL_clear correctly
Hugo Landau [Wed, 30 Aug 2023 15:18:50 +0000 (16:18 +0100)]
QUIC APL: Report that we do not support SSL_clear correctly

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

8 months agoQUIC: Update API table
Hugo Landau [Wed, 30 Aug 2023 15:18:39 +0000 (16:18 +0100)]
QUIC: Update API table

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

8 months agoBIO: Emphasise API contract for BIO_sendmmsg/BIO_recvmmsg
Hugo Landau [Wed, 30 Aug 2023 13:00:14 +0000 (14:00 +0100)]
BIO: Emphasise API contract for BIO_sendmmsg/BIO_recvmmsg

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

8 months agoBIO: Allow third parties to use integers instead of pointers for poll descriptors
Hugo Landau [Wed, 30 Aug 2023 12:45:40 +0000 (13:45 +0100)]
BIO: Allow third parties to use integers instead of pointers for poll descriptors

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

8 months agoQUIC: Make TLS1_FLAGS_QUIC private
Hugo Landau [Wed, 30 Aug 2023 12:43:35 +0000 (13:43 +0100)]
QUIC: Make TLS1_FLAGS_QUIC private

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

8 months agoQUIC API: Revise SSL_get_conn_close_info to use a flags field
Hugo Landau [Wed, 30 Aug 2023 12:41:39 +0000 (13:41 +0100)]
QUIC API: Revise SSL_get_conn_close_info to use a flags field

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

8 months agoDocument OSSL_get_thread_support_flags()
Hugo Landau [Wed, 30 Aug 2023 12:19:40 +0000 (13:19 +0100)]
Document OSSL_get_thread_support_flags()

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

8 months agoQUIC APL: Allow stream origin to be queried
Hugo Landau [Wed, 30 Aug 2023 12:09:13 +0000 (13:09 +0100)]
QUIC APL: Allow stream origin to be queried

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

8 months agoMinor fixes
Hugo Landau [Wed, 30 Aug 2023 16:00:16 +0000 (17:00 +0100)]
Minor fixes

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

8 months agoMinor updates
Hugo Landau [Fri, 18 Aug 2023 11:06:10 +0000 (12:06 +0100)]
Minor updates

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

8 months agoAdd manpages
Hugo Landau [Thu, 10 Aug 2023 18:49:17 +0000 (19:49 +0100)]
Add manpages

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

8 months agoMinor fixes
Hugo Landau [Thu, 10 Aug 2023 18:29:27 +0000 (19:29 +0100)]
Minor fixes

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

8 months agoQUIC DDD: Final report
Hugo Landau [Wed, 9 Aug 2023 16:46:34 +0000 (17:46 +0100)]
QUIC DDD: Final report

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

8 months agoQUIC DDD: ddd-02-conn-nonblocking-threads: Unplanned changes
Hugo Landau [Wed, 9 Aug 2023 16:46:34 +0000 (17:46 +0100)]
QUIC DDD: ddd-02-conn-nonblocking-threads: Unplanned changes

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

8 months agoQUIC DDD: ddd-02-conn-nonblocking-threads: Planned changes
Hugo Landau [Wed, 9 Aug 2023 16:46:34 +0000 (17:46 +0100)]
QUIC DDD: ddd-02-conn-nonblocking-threads: Planned changes

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

8 months agoQUIC DDD: ddd-06-mem-uv: Unplanned changes
Hugo Landau [Wed, 9 Aug 2023 16:46:34 +0000 (17:46 +0100)]
QUIC DDD: ddd-06-mem-uv: Unplanned changes

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

8 months agoQUIC DDD: ddd-06-mem-uv: Planned changes
Hugo Landau [Wed, 9 Aug 2023 16:46:34 +0000 (17:46 +0100)]
QUIC DDD: ddd-06-mem-uv: Planned changes

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

8 months agoQUIC DDD: ddd-05-mem-nonblocking: Unplanned changes
Hugo Landau [Wed, 9 Aug 2023 16:46:34 +0000 (17:46 +0100)]
QUIC DDD: ddd-05-mem-nonblocking: Unplanned changes

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

8 months agoQUIC DDD: ddd-05-mem-nonblocking: Planned changes
Hugo Landau [Wed, 9 Aug 2023 16:46:33 +0000 (17:46 +0100)]
QUIC DDD: ddd-05-mem-nonblocking: Planned changes

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

8 months agoQUIC DDD: ddd-04-fd-nonblocking: Unplanned changes
Hugo Landau [Wed, 9 Aug 2023 16:46:33 +0000 (17:46 +0100)]
QUIC DDD: ddd-04-fd-nonblocking: Unplanned changes

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

8 months agoQUIC DDD: ddd-04-fd-nonblocking: Planned changes
Hugo Landau [Wed, 9 Aug 2023 16:46:33 +0000 (17:46 +0100)]
QUIC DDD: ddd-04-fd-nonblocking: Planned changes

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

8 months agoQUIC DDD: ddd-03-fd-blocking: Unplanned changes
Hugo Landau [Wed, 9 Aug 2023 16:46:33 +0000 (17:46 +0100)]
QUIC DDD: ddd-03-fd-blocking: Unplanned changes

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

8 months agoQUIC DDD: ddd-03-fd-blocking: Planned changes
Hugo Landau [Wed, 9 Aug 2023 16:46:33 +0000 (17:46 +0100)]
QUIC DDD: ddd-03-fd-blocking: Planned changes

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

8 months agoQUIC DDD: ddd-02-conn-nonblocking: Unplanned changes
Hugo Landau [Wed, 9 Aug 2023 16:46:33 +0000 (17:46 +0100)]
QUIC DDD: ddd-02-conn-nonblocking: Unplanned changes

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

8 months agoQUIC DDD: ddd-02-conn-nonblocking: Planned changes
Hugo Landau [Wed, 9 Aug 2023 16:46:33 +0000 (17:46 +0100)]
QUIC DDD: ddd-02-conn-nonblocking: Planned changes

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

8 months agoQUIC DDD: ddd-01-conn-blocking: Unplanned changes
Hugo Landau [Wed, 9 Aug 2023 16:46:33 +0000 (17:46 +0100)]
QUIC DDD: ddd-01-conn-blocking: Unplanned changes

- QUIC_client_method() renamed due to namespacing
- QUIC mandates use of ALPN

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

8 months agoQUIC DDD: ddd-01-conn-blocking: Planned changes
Hugo Landau [Wed, 9 Aug 2023 16:46:33 +0000 (17:46 +0100)]
QUIC DDD: ddd-01-conn-blocking: Planned changes

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

8 months agoQUIC DDD: Update makefile
Hugo Landau [Wed, 9 Aug 2023 16:46:33 +0000 (17:46 +0100)]
QUIC DDD: Update makefile

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

8 months agoQUIC DDD: Add unchanged copy of ddd-02-conn-nonblocking to serve as base for thread...
Hugo Landau [Wed, 9 Aug 2023 16:46:33 +0000 (17:46 +0100)]
QUIC DDD: Add unchanged copy of ddd-02-conn-nonblocking to serve as base for thread-assisted variant

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

8 months agoQUIC DDD: Allow target host:port to be set from command line
Hugo Landau [Wed, 9 Aug 2023 16:46:33 +0000 (17:46 +0100)]
QUIC DDD: Allow target host:port to be set from command line

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

8 months agoQUIC DDD: Fix bug in ddd-06-mem-uv
Hugo Landau [Wed, 9 Aug 2023 16:46:33 +0000 (17:46 +0100)]
QUIC DDD: Fix bug in ddd-06-mem-uv

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

8 months agoQUIC APL: Introduce addressed v. non-addressed mode handling
Hugo Landau [Wed, 9 Aug 2023 16:46:33 +0000 (17:46 +0100)]
QUIC APL: Introduce addressed v. non-addressed mode handling

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

8 months agoBIO_s_dgram_pair: Correct implementation of BIO_CTRL_DGRAM_GET_LOCAL_ADDR_ENABLE
Hugo Landau [Wed, 9 Aug 2023 16:46:33 +0000 (17:46 +0100)]
BIO_s_dgram_pair: Correct implementation of BIO_CTRL_DGRAM_GET_LOCAL_ADDR_ENABLE

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

8 months agoBIO_s_datagram: Wire capability negotiation for BIO_s_datagram
Hugo Landau [Wed, 9 Aug 2023 16:46:33 +0000 (17:46 +0100)]
BIO_s_datagram: Wire capability negotiation for BIO_s_datagram

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

8 months agoBIO: Add BIO_dgram_detect_peer_addr API
Hugo Landau [Wed, 9 Aug 2023 16:46:33 +0000 (17:46 +0100)]
BIO: Add BIO_dgram_detect_peer_addr API

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

8 months agoBIO_s_datagram: Support configuring non-blocking mode
Hugo Landau [Wed, 9 Aug 2023 16:46:32 +0000 (17:46 +0100)]
BIO_s_datagram: Support configuring non-blocking mode

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

8 months agoBIO_s_connect: Support configuration of non-blocking mode in datagram mode
Hugo Landau [Wed, 9 Aug 2023 16:46:32 +0000 (17:46 +0100)]
BIO_s_connect: Support configuration of non-blocking mode in datagram mode

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

8 months agoQUIC CHANNEL: Introduce concept of (non-)addressed mode
Hugo Landau [Wed, 9 Aug 2023 16:46:32 +0000 (17:46 +0100)]
QUIC CHANNEL: Introduce concept of (non-)addressed mode

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

8 months agoQUIC APL: Refactor blocking configuration to allow late blocking support detection
Hugo Landau [Wed, 9 Aug 2023 16:46:32 +0000 (17:46 +0100)]
QUIC APL: Refactor blocking configuration to allow late blocking support detection

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

8 months agoQUIC CHANNEL: Cleanup poll descriptor management
Hugo Landau [Wed, 9 Aug 2023 16:46:32 +0000 (17:46 +0100)]
QUIC CHANNEL: Cleanup poll descriptor management

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

8 months agoQUIC REACTOR: Move can-poll flags into reactor
Hugo Landau [Wed, 9 Aug 2023 16:46:32 +0000 (17:46 +0100)]
QUIC REACTOR: Move can-poll flags into reactor

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

8 months agoQUIC APL: Autoconfigure BIOs as non-blocking
Hugo Landau [Wed, 9 Aug 2023 16:46:32 +0000 (17:46 +0100)]
QUIC APL: Autoconfigure BIOs as non-blocking

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

8 months agoBIO_ssl: Make helper functions configure BIOs for QUIC correctly
Hugo Landau [Wed, 9 Aug 2023 16:46:32 +0000 (17:46 +0100)]
BIO_ssl: Make helper functions configure BIOs for QUIC correctly

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

8 months agoQUIC APL: Better error reporting
Hugo Landau [Wed, 9 Aug 2023 16:46:32 +0000 (17:46 +0100)]
QUIC APL: Better error reporting

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

8 months agoQUIC CHANNEL: Only handle the first protocol error raised
Hugo Landau [Wed, 9 Aug 2023 16:46:32 +0000 (17:46 +0100)]
QUIC CHANNEL: Only handle the first protocol error raised

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

8 months agoBIO_s_connect: Add support for datagram mode
Hugo Landau [Wed, 9 Aug 2023 16:46:32 +0000 (17:46 +0100)]
BIO_s_connect: Add support for datagram mode

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

8 months agoBIO_s_connect: Make internal functions static
Hugo Landau [Wed, 9 Aug 2023 16:46:32 +0000 (17:46 +0100)]
BIO_s_connect: Make internal functions static

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

8 months agoQUIC TLS: Better error message when ALPN not used
Hugo Landau [Wed, 9 Aug 2023 16:46:32 +0000 (17:46 +0100)]
QUIC TLS: Better error message when ALPN not used

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

8 months agoRemoved unnecessary brace in ktls_configure_crypto
Abhirup Manna [Wed, 30 Aug 2023 16:53:20 +0000 (22:23 +0530)]
Removed unnecessary brace in ktls_configure_crypto

CLA: trivial

Fixes #21498

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

8 months agoUpdate X509 fuzzer to verify a chain
Kurt Roeckx [Sun, 18 Dec 2022 19:54:15 +0000 (20:54 +0100)]
Update X509 fuzzer to verify a chain

It add supports for verifying that it's been signed by a CA, and
checks the CRL and OCSP status

Can find CVE-2022-4203 and CVE-2023-0286

Reviewed-by: Bernd Edlinger <bernd.edlinger@hotmail.de>
Reviewed-by: Tomas Mraz <tomas@openssl.org>
Reviewed-by: Dmitry Belyavskiy <beldmit@gmail.com>
Reviewed-by: Hugo Landau <hlandau@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/20243)

8 months agoAdd ED25519 Signature demo.
slontis [Tue, 29 Aug 2023 08:02:14 +0000 (18:02 +1000)]
Add ED25519 Signature demo.

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

8 months agoRemove a redundant point mul from ossl_ec_key_public_check()
Matt Caswell [Wed, 30 Aug 2023 14:48:02 +0000 (15:48 +0100)]
Remove a redundant point mul from ossl_ec_key_public_check()

This code was added in error and is entirely redundant. It is also an
expensive operation (e.g. see #21833).

Fixes #21834

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

8 months agopowerpc: ecc: Fix stack allocation secp384r1 asm
Rohan McLure [Wed, 16 Aug 2023 06:52:47 +0000 (16:52 +1000)]
powerpc: ecc: Fix stack allocation secp384r1 asm

Assembly acceleration secp384r1 opts to not use any callee-save VSRs, as
VSX enabled systems make extensive use of renaming, and so writebacks in
felem_{mul,square}() can be reordered for best cache effects.

Remove stack allocations. This in turn fixes unmatched push/pops in
felem_{mul,square}().

Signed-off-by: Rohan McLure <rohan.mclure@linux.ibm.com>
Reviewed-by: Tomas Mraz <tomas@openssl.org>
Reviewed-by: Shane Lontis <shane.lontis@oracle.com>
Reviewed-by: Hugo Landau <hlandau@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/21749)

8 months agoecc: Remove extraneous parentheses in secp384r1
Rohan McLure [Tue, 15 Aug 2023 05:20:20 +0000 (15:20 +1000)]
ecc: Remove extraneous parentheses in secp384r1

Substitutions in the felem_reduce() method feature unecessary
parentheses, remove them.

Signed-off-by: Rohan McLure <rohan.mclure@linux.ibm.com>
Reviewed-by: Tomas Mraz <tomas@openssl.org>
Reviewed-by: Shane Lontis <shane.lontis@oracle.com>
Reviewed-by: Hugo Landau <hlandau@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/21749)

8 months agoQUIC: Harden ring buffer against internal misuse
Hugo Landau [Wed, 30 Aug 2023 09:32:53 +0000 (10:32 +0100)]
QUIC: Harden ring buffer against internal misuse

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

8 months agoOPENSSL_init_crypto load config into initial global default library context
Ingo Franzki [Wed, 30 Aug 2023 06:41:43 +0000 (08:41 +0200)]
OPENSSL_init_crypto load config into initial global default library context

OPENSSL_init_crypto() with OPENSSL_INIT_LOAD_CONFIG must load the configuration
into the initial global default library context, not the currently set default
library context.

OPENSSL_init_crypto() with OPENSSL_INIT_LOAD_CONFIG may be called within other
OpenSSL API functions, e.g. from within EVP_PKEY_CTX_new_xxx() when initializing
a pkey context, to perform implicit initialization, if it has not been
initialized yet. This implicit initialization may happen at a time when an
application has already create its own library context and made it the default
library context. So loading the config into the current default library context
would load it into the applications library context.

Signed-off-by: Ingo Franzki <ifranzki@linux.ibm.com>
Reviewed-by: Dmitry Belyavskiy <beldmit@gmail.com>
Reviewed-by: Matt Caswell <matt@openssl.org>
Reviewed-by: Tomas Mraz <tomas@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/21897)

8 months agoAdd CHANGES.md entry for ess_cert_id_alg default change
Tomas Mraz [Fri, 25 Aug 2023 13:24:16 +0000 (15:24 +0200)]
Add CHANGES.md entry for ess_cert_id_alg default change

The default was changed in 10536b7f5b07aab3dc9631e94a56258155a1d942

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

8 months agoecp_sm2p256-armv8.pl: Copy the argument handling from ecp_nistz256-armv8.pl
Tomas Mraz [Mon, 28 Aug 2023 16:49:02 +0000 (18:49 +0200)]
ecp_sm2p256-armv8.pl: Copy the argument handling from ecp_nistz256-armv8.pl

Popping the $output argument is more robust and it also needs to be
placed in double quotes to handle spaces in paths.

Fixes #21874
Fixes #21876

Reviewed-by: Richard Levitte <levitte@openssl.org>
Reviewed-by: Tom Cosgrove <tom.cosgrove@arm.com>
(Merged from https://github.com/openssl/openssl/pull/21877)

8 months agoDesign document of the run-time parameters activation
Dmitry Belyavskiy [Tue, 15 Aug 2023 12:46:26 +0000 (14:46 +0200)]
Design document of the run-time parameters activation

Reviewed-by: Matt Caswell <matt@openssl.org>
Reviewed-by: Tim Hudson <tjh@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/21604)

8 months agoOSSL_PROVIDER_load_ex tests
Dmitry Belyavskiy [Thu, 3 Aug 2023 11:20:33 +0000 (13:20 +0200)]
OSSL_PROVIDER_load_ex tests

Reviewed-by: Matt Caswell <matt@openssl.org>
Reviewed-by: Tim Hudson <tjh@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/21604)

8 months agoOSSL_PROVIDER_load_ex
Dmitry Belyavskiy [Wed, 2 Aug 2023 15:54:01 +0000 (17:54 +0200)]
OSSL_PROVIDER_load_ex

Reviewed-by: Matt Caswell <matt@openssl.org>
Reviewed-by: Tim Hudson <tjh@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/21604)

8 months agoAdd option for in-place cipher testing in evp_test
Veronika Hanulíková [Thu, 13 Jul 2023 15:07:00 +0000 (17:07 +0200)]
Add option for in-place cipher testing in evp_test

The command line option enables setting in-place
data processing for cipher testing in `evp_test`.
The `both` option argument runs both - in-place
and non-in-place testing.

Reviewed-by: Tim Hudson <tjh@openssl.org>
Reviewed-by: Dmitry Belyavskiy <beldmit@gmail.com>
(Merged from https://github.com/openssl/openssl/pull/21546)

8 months agoman: update missingcrypto.txt file
Matthias St. Pierre [Mon, 28 Aug 2023 13:18:29 +0000 (15:18 +0200)]
man: update missingcrypto.txt file

Remove some entries which have been documented meanwhile.

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

8 months agoQUIC APL: Determine if an error is an I/O error dynamically
Hugo Landau [Thu, 24 Aug 2023 12:02:09 +0000 (13:02 +0100)]
QUIC APL: Determine if an error is an I/O error dynamically

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

8 months agoFix misspelled deprecation macro name in comment
Matthias St. Pierre [Mon, 28 Aug 2023 11:22:24 +0000 (13:22 +0200)]
Fix misspelled deprecation macro name in comment

Commit 77c30753cd replaced the convenience macros `DEPRECATEDIN_{major}_{minor}`
by `OSSL_DEPRECATEDIN_{major}_{minor}` but misspelled them in the comment.

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

8 months agoCorrect the fixed size handling for dgram_pair and dgram_mem
Tomas Mraz [Mon, 28 Aug 2023 09:31:15 +0000 (11:31 +0200)]
Correct the fixed size handling for dgram_pair and dgram_mem

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

8 months agoMinor fix during rebase
Hugo Landau [Fri, 25 Aug 2023 14:48:57 +0000 (15:48 +0100)]
Minor fix during rebase

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

8 months agoTweak documentation for WAIT_PEER
Hugo Landau [Thu, 24 Aug 2023 13:34:04 +0000 (14:34 +0100)]
Tweak documentation for WAIT_PEER

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

8 months agomake update
Hugo Landau [Thu, 24 Aug 2023 07:11:13 +0000 (08:11 +0100)]
make update

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

8 months agoTweak documentation for WAIT_PEER
Hugo Landau [Wed, 23 Aug 2023 17:36:38 +0000 (18:36 +0100)]
Tweak documentation for WAIT_PEER

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

8 months agoQUIC MULTISTREAM TEST: Test WAIT_PEER
Hugo Landau [Wed, 23 Aug 2023 07:39:38 +0000 (08:39 +0100)]
QUIC MULTISTREAM TEST: Test WAIT_PEER

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

8 months agoQUIC APL: Support waiting for peer-initiated shutdown
Hugo Landau [Wed, 23 Aug 2023 07:25:28 +0000 (08:25 +0100)]
QUIC APL: Support waiting for peer-initiated shutdown

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

8 months agoQUIC APL: Implement backpressure on stream creation
Hugo Landau [Tue, 22 Aug 2023 15:59:57 +0000 (16:59 +0100)]
QUIC APL: Implement backpressure on stream creation

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

8 months agoSet VC win64 perlasm scheme during Configure
Kai Pastor [Sat, 5 Aug 2023 06:34:35 +0000 (08:34 +0200)]
Set VC win64 perlasm scheme during Configure

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

8 months agoRemoved unused struct ssl3_comp_st
Frederik Wedel-Heinen [Tue, 22 Aug 2023 07:19:32 +0000 (09:19 +0200)]
Removed unused struct ssl3_comp_st

Fixes #21731

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

8 months agoRemoved unused member read_iv of ossl_record_layer_st
Frederik Wedel-Heinen [Tue, 22 Aug 2023 07:30:39 +0000 (09:30 +0200)]
Removed unused member read_iv of ossl_record_layer_st

Fixes #21732

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

8 months agoQUIC: Version negotiation testing
Hugo Landau [Thu, 17 Aug 2023 08:44:37 +0000 (09:44 +0100)]
QUIC: Version negotiation testing

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

8 months agoQUIC RXDP: Handle PING correctly
Hugo Landau [Thu, 24 Aug 2023 06:48:08 +0000 (07:48 +0100)]
QUIC RXDP: Handle PING correctly

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

8 months agoQUIC MULTISTREAM TEST: Fix connect-or-fail
Hugo Landau [Thu, 17 Aug 2023 17:32:16 +0000 (18:32 +0100)]
QUIC MULTISTREAM TEST: Fix connect-or-fail

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

8 months agoQUIC QRX: Initialise all RXE fields properly for non-encrypted packets
Hugo Landau [Thu, 17 Aug 2023 17:31:15 +0000 (18:31 +0100)]
QUIC QRX: Initialise all RXE fields properly for non-encrypted packets

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

8 months agoQUIC APL: Handle modes correctly
Hugo Landau [Thu, 17 Aug 2023 09:00:02 +0000 (10:00 +0100)]
QUIC APL: Handle modes correctly

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

8 months agoQUIC: Minimally handle version negotiation packets
Hugo Landau [Thu, 17 Aug 2023 07:55:52 +0000 (08:55 +0100)]
QUIC: Minimally handle version negotiation packets

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

8 months agoUpdate Cloudflare Quiche to fix a build issue
Tomas Mraz [Tue, 29 Aug 2023 10:38:55 +0000 (12:38 +0200)]
Update Cloudflare Quiche to fix a build issue

Reviewed-by: Hugo Landau <hlandau@openssl.org>
Reviewed-by: Dmitry Belyavskiy <beldmit@gmail.com>
Reviewed-by: Matt Caswell <matt@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/21885)

8 months agoRaise the timeout in quic_client_test.c
Tomas Mraz [Fri, 25 Aug 2023 12:24:07 +0000 (14:24 +0200)]
Raise the timeout in quic_client_test.c

Recently the Coveralls CI run started failing
because it times out in this test.
Outside of Coveralls it runs fine so assuming that
this is caused by slow execution under Coveralls.

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

8 months agoResolve assembler complains when including loongarch_arch.h
Min Zhou [Fri, 25 Aug 2023 10:02:47 +0000 (18:02 +0800)]
Resolve assembler complains when including loongarch_arch.h

The assembler will complain when we include loongarch_arch.h in
an assembly file as following:

crypto/loongarch_arch.h: Assembler messages:
crypto/loongarch_arch.h:12: Fatal error: no match insn: extern unsigned int OPENSSL_loongarch_hwcap_P

So, the sentence of `extern unsigned int OPENSSL_loongarch_hwcap_P`
should be guarded with "#ifndef __ASSEMBLER__".

Fixes #21838.

Signed-off-by: Min Zhou <zhoumin@loongson.cn>
Reviewed-by: Hugo Landau <hlandau@openssl.org>
Reviewed-by: Tomas Mraz <tomas@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/21839)

8 months agoFix a bad merge in quic-multi-stream.c demo
Matt Caswell [Fri, 25 Aug 2023 11:04:04 +0000 (12:04 +0100)]
Fix a bad merge in quic-multi-stream.c demo

The function SSL_set_initial_peer_addr() got renamed to
SSL_set1_initial_peer_addr(). The demo missed out on the rename when it
got rebased on top of it.

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

8 months agoQUIC APL: Fix stream backpressure conditions to use non-I/O errors
Hugo Landau [Thu, 24 Aug 2023 10:28:17 +0000 (11:28 +0100)]
QUIC APL: Fix stream backpressure conditions to use non-I/O errors

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

8 months agoQUIC MULTISTREAM TEST: Test backpressure on stream creation
Hugo Landau [Tue, 22 Aug 2023 15:59:57 +0000 (16:59 +0100)]
QUIC MULTISTREAM TEST: Test backpressure on stream creation

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

8 months agoQUIC APL: Implement backpressure on stream creation
Hugo Landau [Tue, 22 Aug 2023 15:59:57 +0000 (16:59 +0100)]
QUIC APL: Implement backpressure on stream creation

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