]> git.ipfire.org Git - thirdparty/openssl.git/log
thirdparty/openssl.git
2 years agoQUIC err handling: Properly report network errors
Tomas Mraz [Fri, 26 May 2023 13:54:56 +0000 (15:54 +0200)] 
QUIC err handling: Properly report network errors

We return SSL_ERROR_SYSCALL when network error is encountered.

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

2 years agoQUIC: Fix multistream script 19 stochastic test failure
Hugo Landau [Thu, 6 Jul 2023 14:23:05 +0000 (15:23 +0100)] 
QUIC: Fix multistream script 19 stochastic test failure

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

2 years agoRemove unused internal functions
atishkov [Fri, 30 Jun 2023 11:01:59 +0000 (14:01 +0300)] 
Remove unused internal functions
CLA: trivial

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

2 years agoDon't build the QUIC ssl trace when DH is disabled
Matt Caswell [Thu, 6 Jul 2023 10:20:36 +0000 (11:20 +0100)] 
Don't build the QUIC ssl trace when DH is disabled

The test assumes certain options are on/off. DH must be on for this test.

Reviewed-by: Hugo Landau <hlandau@openssl.org>
Reviewed-by: Tom Cosgrove <tom.cosgrove@arm.com>
(Merged from https://github.com/openssl/openssl/pull/21373)

2 years agoDon't run the ssl trace test if no-ecx
Matt Caswell [Thu, 6 Jul 2023 09:15:25 +0000 (10:15 +0100)] 
Don't run the ssl trace test if no-ecx

no-ecx causes SSL_trace to give different output. The test compares
the output to a reference sample - so we disable it in the case of no-ecx.

Reviewed-by: Hugo Landau <hlandau@openssl.org>
Reviewed-by: Tom Cosgrove <tom.cosgrove@arm.com>
(Merged from https://github.com/openssl/openssl/pull/21372)

2 years agoFix a no-ecx failure in test_tls13hrr
Matt Caswell [Thu, 6 Jul 2023 09:05:50 +0000 (10:05 +0100)] 
Fix a no-ecx failure in test_tls13hrr

In the case of no-ecx test 3 in test_tls13hrr was failing because it was
setting the server side support groups to on P-256 in order to induce an
HRR. However with no-ecx the client insteads issues an initial key share
using P-256 anyway and so an HRR is not used. We swap to use P-384 instead.

Reviewed-by: Hugo Landau <hlandau@openssl.org>
Reviewed-by: Tom Cosgrove <tom.cosgrove@arm.com>
(Merged from https://github.com/openssl/openssl/pull/21372)

2 years agoAllow qtestlib to use a "fake_now" implementation
Matt Caswell [Mon, 3 Jul 2023 15:58:46 +0000 (16:58 +0100)] 
Allow qtestlib to use a "fake_now" implementation

We then use it in test_corrupted_data() to remove an OSSL_sleep() which
may fail in some builds.

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

2 years agoWork around relocation errors in the m68k cross-compilation builds
Matt Caswell [Mon, 3 Jul 2023 14:31:49 +0000 (15:31 +0100)] 
Work around relocation errors in the m68k cross-compilation builds

Errors such as this seen:

libssl.a(libssl-lib-ssl_stat.o): in function `SSL_alert_desc_string_long':
ssl_stat.c:(.text+0xab2): relocation truncated to fit: R_68K_GOT16O against `.LC157'
test/libtestutil.a(libtestutil-lib-opt.o): in function `opt_pair':
opt.c:(.text+0x10b2): relocation truncated to fit: R_68K_GOT16O against `.LC53'
test/libtestutil.a(libtestutil-lib-opt.o): in function `opt_string':
opt.c:(.text+0x113c): relocation truncated to fit: R_68K_GOT16O against `.LC53'
libcrypto.a(libcrypto-lib-decoder_lib.o): in function `OSSL_DECODER_CTX_set_construct_data':
decoder_lib.c:(.text+0x5a4): relocation truncated to fit: R_68K_GOT16O against `__func__.2'
libcrypto.a(libcrypto-lib-decoder_pkey.o): in function `ossl_decoder_ctx_setup_for_pkey':
decoder_pkey.c:(.text+0x6c2): relocation truncated to fit: R_68K_GOT16O against `decoder_construct_pkey'
libcrypto.a(libcrypto-lib-tb_dsa.o): in function `ENGINE_register_DSA':
tb_dsa.c:(.text+0x5e): relocation truncated to fit: R_68K_GOT16O against `dummy_nid'
libcrypto.a(libcrypto-lib-tb_dsa.o): in function `ENGINE_set_default_DSA':
tb_dsa.c:(.text+0xc4): relocation truncated to fit: R_68K_GOT16O against `dummy_nid'
libcrypto.a(libcrypto-lib-asymcipher.o): in function `.L18':
asymcipher.c:(.text+0x168): relocation truncated to fit: R_68K_GOT16O against `__func__.0'
asymcipher.c:(.text+0x2e8): relocation truncated to fit: R_68K_GOT16O against `__func__.0'
asymcipher.c:(.text+0x33e): relocation truncated to fit: R_68K_GOT16O against `__func__.0'
libcrypto.a(libcrypto-lib-digest.o): in function `EVP_MD_CTX_ctrl':
digest.c:(.text+0xa52): additional relocation overflows omitted from the output
collect2: error: ld returned 1 exit status

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

2 years agoFix no-thread-pool building
Matt Caswell [Mon, 3 Jul 2023 13:44:46 +0000 (14:44 +0100)] 
Fix no-thread-pool building

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

2 years agoSkip the QUIC ssltrace test under certain config options
Matt Caswell [Fri, 30 Jun 2023 15:50:47 +0000 (16:50 +0100)] 
Skip the QUIC ssltrace test under certain config options

Various options disturb the output expected from the ssl trace test, so we
skip it if necessary.

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

2 years agoUse %llx not %lx for uint64_t
Matt Caswell [Fri, 30 Jun 2023 15:40:41 +0000 (16:40 +0100)] 
Use %llx not %lx for uint64_t

Some compilers don't like %lx

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

2 years agoDon't compile quic_thread_assist.c on OPENSSL_NO_QUIC_THREAD_ASSIST
Matt Caswell [Fri, 30 Jun 2023 15:34:48 +0000 (16:34 +0100)] 
Don't compile quic_thread_assist.c on OPENSSL_NO_QUIC_THREAD_ASSIST

If OPENSSL_NO_QUIC_THREAD_ASSIST is defined then we don't have the right
support for QUIC thread assisted mode so don't attempt to compile that
code.

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

2 years agoDisable QUIC if TLSv1.3 is disabled
Matt Caswell [Fri, 30 Jun 2023 15:27:29 +0000 (16:27 +0100)] 
Disable QUIC if TLSv1.3 is disabled

QUIC depends on TLSv1.3, so if the latter is disabled then we must do
the same for QUIC.

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

2 years agoEnable QUIC by default
Matt Caswell [Fri, 30 Jun 2023 14:56:13 +0000 (15:56 +0100)] 
Enable QUIC by default

Ensure builds enable QUIC without explicitly having to ask for it. To
disable QUIC pass "no-quic" to Configure.

As a result we can remove all use of "enable-quic" from the various CI
runs.

We also add a CHANGES and NEWS entry for QUIC support.

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

2 years agoAdd limited support for WebAssembly WASI target
Marcin Kolny [Sun, 2 Jul 2023 23:38:40 +0000 (00:38 +0100)] 
Add limited support for WebAssembly WASI target

CLA: trivial

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

2 years agoriscv: Clarify dual-licensing wording for GCM and AES
Heiko Stuebner [Tue, 4 Jul 2023 16:16:41 +0000 (18:16 +0200)] 
riscv: Clarify dual-licensing wording for GCM and AES

The original text for the Apache + BSD dual licensing for riscv GCM and AES
perlasm was taken from other openSSL users like crypto/crypto/LPdir_unix.c .

Though Eric pointed out that the dual-licensing text could be read in a
way negating the second license [0] and suggested to clarify the text
even more.

So do this here for all of the GCM, AES and shared riscv.pm .

We already had the agreement of all involved developers for the actual
dual licensing in [0] and [1], so this is only a better clarification
for this.

[0] https://github.com/openssl/openssl/pull/20649#issuecomment-1589558790
[1] https://github.com/openssl/openssl/pull/21018

Signed-off-by: Heiko Stuebner <heiko.stuebner@vrull.eu>
Reviewed-by: Tim Hudson <tjh@openssl.org>
Reviewed-by: Paul Dale <pauli@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/21357)

2 years agoRework options handling
Hugo Landau [Mon, 3 Jul 2023 15:24:54 +0000 (16:24 +0100)] 
Rework options handling

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

2 years agoSimplify QUIC API masking
Hugo Landau [Mon, 3 Jul 2023 14:54:07 +0000 (15:54 +0100)] 
Simplify QUIC API masking

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

2 years agoUpdate SSL options handling
Hugo Landau [Mon, 3 Jul 2023 07:17:48 +0000 (08:17 +0100)] 
Update SSL options handling

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

2 years agoMinor updates
Hugo Landau [Thu, 29 Jun 2023 12:48:57 +0000 (13:48 +0100)] 
Minor updates

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

2 years agoQUIC: Fix multistream test 19
Hugo Landau [Wed, 28 Jun 2023 20:03:47 +0000 (21:03 +0100)] 
QUIC: Fix multistream test 19

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

2 years agomake update
Hugo Landau [Wed, 28 Jun 2023 18:55:19 +0000 (19:55 +0100)] 
make update

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

2 years agoRemove unused server code
Hugo Landau [Wed, 28 Jun 2023 18:51:09 +0000 (19:51 +0100)] 
Remove unused server code

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

2 years agoMinor fixes
Hugo Landau [Mon, 26 Jun 2023 12:47:03 +0000 (13:47 +0100)] 
Minor fixes

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

2 years agoQUIC SSL: Block SSL_clear
Hugo Landau [Mon, 16 Jan 2023 15:36:42 +0000 (15:36 +0000)] 
QUIC SSL: Block SSL_clear

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

2 years agoQUIC SSL: Block SSL_dup
Hugo Landau [Mon, 16 Jan 2023 15:36:07 +0000 (15:36 +0000)] 
QUIC SSL: Block SSL_dup

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

2 years agoQUIC SSL: SSL_set_quiet_shutdown
Hugo Landau [Mon, 16 Jan 2023 15:35:05 +0000 (15:35 +0000)] 
QUIC SSL: SSL_set_quiet_shutdown

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

2 years agoQUIC SSL: Restrict SSL_CTX_set_ssl_version, SSL_set_ssl_method
Hugo Landau [Mon, 16 Jan 2023 15:33:01 +0000 (15:33 +0000)] 
QUIC SSL: Restrict SSL_CTX_set_ssl_version, SSL_set_ssl_method

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

2 years agoQUIC SSL: Version setting restrictions
Hugo Landau [Mon, 16 Jan 2023 15:32:52 +0000 (15:32 +0000)] 
QUIC SSL: Version setting restrictions

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

2 years agoQUIC SSL: Forbid pipeline-related operations
Hugo Landau [Mon, 16 Jan 2023 15:32:18 +0000 (15:32 +0000)] 
QUIC SSL: Forbid pipeline-related operations

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

2 years agoQUIC SSL: SSL_set_fd for BIO_s_datagram
Hugo Landau [Mon, 16 Jan 2023 15:29:16 +0000 (15:29 +0000)] 
QUIC SSL: SSL_set_fd for BIO_s_datagram

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

2 years agoQUIC SSL: HelloRetryRequest
Hugo Landau [Mon, 16 Jan 2023 15:28:40 +0000 (15:28 +0000)] 
QUIC SSL: HelloRetryRequest

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

2 years agoQUIC SSL: Buffer Management
Hugo Landau [Mon, 16 Jan 2023 15:27:50 +0000 (15:27 +0000)] 
QUIC SSL: Buffer Management

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

2 years agoQUIC SSL: Prohibit early data functionailty
Hugo Landau [Mon, 16 Jan 2023 15:27:01 +0000 (15:27 +0000)] 
QUIC SSL: Prohibit early data functionailty

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

2 years agoQUIC SSL: Prohibit readahead-related functions
Hugo Landau [Mon, 16 Jan 2023 15:25:25 +0000 (15:25 +0000)] 
QUIC SSL: Prohibit readahead-related functions

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

2 years agoQUIC: Implement SSL_has_pending
Hugo Landau [Mon, 16 Jan 2023 15:24:17 +0000 (15:24 +0000)] 
QUIC: Implement SSL_has_pending

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

2 years agoQUIC: Implement SSL_rstate_string(_long)
Hugo Landau [Mon, 16 Jan 2023 15:22:41 +0000 (15:22 +0000)] 
QUIC: Implement SSL_rstate_string(_long)

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

2 years agoQUIC: Prohibit post-handshake auth
Hugo Landau [Mon, 16 Jan 2023 15:21:57 +0000 (15:21 +0000)] 
QUIC: Prohibit post-handshake auth

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

2 years agoQUIC: Control SSL option setting
Hugo Landau [Mon, 16 Jan 2023 15:21:29 +0000 (15:21 +0000)] 
QUIC: Control SSL option setting

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

2 years agoQUIC: Forbid NPN
Hugo Landau [Mon, 16 Jan 2023 15:20:20 +0000 (15:20 +0000)] 
QUIC: Forbid NPN

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

2 years agoQUIC: Forbid non-QUIC ciphers
Hugo Landau [Mon, 16 Jan 2023 15:20:05 +0000 (15:20 +0000)] 
QUIC: Forbid non-QUIC ciphers

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

2 years agoQUIC TLS: Prohibit SRTP-related calls for QUIC TLS
Hugo Landau [Mon, 16 Jan 2023 15:18:55 +0000 (15:18 +0000)] 
QUIC TLS: Prohibit SRTP-related calls for QUIC TLS

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

2 years agoQUIC SSL Behaviours: Allow detection of an SSL connection used for QUIC handshake
Hugo Landau [Mon, 16 Jan 2023 15:18:12 +0000 (15:18 +0000)] 
QUIC SSL Behaviours: Allow detection of an SSL connection used for QUIC handshake

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

2 years agofix memory allocation and reference counting issues
Pauli [Sun, 2 Jul 2023 07:19:17 +0000 (17:19 +1000)] 
fix memory allocation and reference counting issues

Reviewed-by: Tomas Mraz <tomas@openssl.org>
Reviewed-by: Kurt Roeckx <kurt@roeckx.be>
(Merged from https://github.com/openssl/openssl/pull/21341)

2 years agodoc: update ref count doc in light of refactoring
Pauli [Sat, 1 Jul 2023 11:06:47 +0000 (21:06 +1000)] 
doc: update ref count doc in light of refactoring

Reviewed-by: Tomas Mraz <tomas@openssl.org>
Reviewed-by: Kurt Roeckx <kurt@roeckx.be>
(Merged from https://github.com/openssl/openssl/pull/21341)

2 years ago80-test_ssl_new.t: Test 14-curves.cnf depends on enabled DH now
Tomas Mraz [Fri, 30 Jun 2023 19:53:30 +0000 (21:53 +0200)] 
80-test_ssl_new.t: Test 14-curves.cnf depends on enabled DH now

Reviewed-by: Paul Dale <pauli@openssl.org>
Reviewed-by: Tom Cosgrove <tom.cosgrove@arm.com>
(Merged from https://github.com/openssl/openssl/pull/21336)

2 years agoReorganize runchecker jobs
Tomas Mraz [Fri, 30 Jun 2023 19:48:29 +0000 (21:48 +0200)] 
Reorganize runchecker jobs

Put jobs that are more likely to fail to on pull request CI.
To compensate move some less likely to fail jobs to on push and
daily CI jobs.

Reviewed-by: Paul Dale <pauli@openssl.org>
Reviewed-by: Tom Cosgrove <tom.cosgrove@arm.com>
(Merged from https://github.com/openssl/openssl/pull/21336)

2 years ago70-test_tls13hrr.t: Use P-521 instead of X25519 for invalid group test
Tomas Mraz [Fri, 30 Jun 2023 16:12:00 +0000 (18:12 +0200)] 
70-test_tls13hrr.t: Use P-521 instead of X25519 for invalid group test

Otherwise this testcase won't work with no-ecx.

Reviewed-by: Matt Caswell <matt@openssl.org>
Reviewed-by: Tom Cosgrove <tom.cosgrove@arm.com>
(Merged from https://github.com/openssl/openssl/pull/21333)

2 years agoDocument the effect of SSL_OP_CLEANSE_PLAINTEXT on send stream data
Tomas Mraz [Wed, 28 Jun 2023 15:12:13 +0000 (17:12 +0200)] 
Document the effect of SSL_OP_CLEANSE_PLAINTEXT on send stream data

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

2 years agoCleanse data in send and receive ring buffers on release
Tomas Mraz [Wed, 28 Jun 2023 14:46:00 +0000 (16:46 +0200)] 
Cleanse data in send and receive ring buffers on release

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

2 years agoCleanse also the send stream data with SSL_OP_CLEANSE_PLAINTEXT
Tomas Mraz [Wed, 28 Jun 2023 14:34:14 +0000 (16:34 +0200)] 
Cleanse also the send stream data with SSL_OP_CLEANSE_PLAINTEXT

QUIC differs from TLS in this regard because it buffers the
data to be sent. TLS just encrypts the data to send in place.

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

2 years agoUpdate .gitignore with LSP files
Todd Short [Fri, 30 Jun 2023 21:28:16 +0000 (17:28 -0400)] 
Update .gitignore with LSP files

This does not provide files for LSP support, but ignores them so they
aren't accidentally checked in by developers.

LSP (Language Server Protocol) is a tools that can be used with various
editors to make navigating source code easier. It is more advanced than
`cscope` and supports completion, for example.

A common LSP for C/C++ is `clangd`, and it creates a `.cache` directory
within the project to store data.

The tool `bear` can be used with `make` to assist `clangd` in
determining where the source code is (specifically headers). This is
critical as OpenSSL uses the `<>` form of `#include` rather than the
`""` form. The `<>` form will cause `clangd` to look in e.g.
`/usr/include` for header files, rather than `include/openssl`. The
`bear` tool will create `compile_commands.json` that `clangd` can use
to find include files.

Reviewed-by: Shane Lontis <shane.lontis@oracle.com>
Reviewed-by: Paul Dale <pauli@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/21338)

2 years agofips: use correct field names when generating fipsmodule.cnf
Pauli [Fri, 30 Jun 2023 01:03:56 +0000 (11:03 +1000)] 
fips: use correct field names when generating fipsmodule.cnf

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

2 years agoevp: update to structure based atomics
Pauli [Wed, 21 Jun 2023 23:48:49 +0000 (09:48 +1000)] 
evp: update to structure based atomics

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

2 years agox509: update to structure based atomics
Pauli [Wed, 21 Jun 2023 23:45:45 +0000 (09:45 +1000)] 
x509: update to structure based atomics

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

2 years agoprov(legacy): update to structure based atomics
Pauli [Wed, 21 Jun 2023 23:43:01 +0000 (09:43 +1000)] 
prov(legacy): update to structure based atomics

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

2 years agoencoder: update to structure based atomics
Pauli [Wed, 21 Jun 2023 23:41:30 +0000 (09:41 +1000)] 
encoder: update to structure based atomics

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

2 years agoquic: update to structure based atomics
Pauli [Wed, 21 Jun 2023 23:40:03 +0000 (09:40 +1000)] 
quic: update to structure based atomics

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

2 years agotls: update to structure based atomics
Pauli [Wed, 21 Jun 2023 23:39:36 +0000 (09:39 +1000)] 
tls: update to structure based atomics

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

2 years agotest: update to structure based atomics
Pauli [Wed, 21 Jun 2023 23:37:23 +0000 (09:37 +1000)] 
test: update to structure based atomics

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

2 years agostore: update to structure based atomics
Pauli [Wed, 21 Jun 2023 23:36:37 +0000 (09:36 +1000)] 
store: update to structure based atomics

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

2 years agorsa: update to structure based atomics
Pauli [Wed, 21 Jun 2023 23:35:12 +0000 (09:35 +1000)] 
rsa: update to structure based atomics

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

2 years agoprovider: update to structure based atomics
Pauli [Wed, 21 Jun 2023 23:34:20 +0000 (09:34 +1000)] 
provider: update to structure based atomics

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

2 years agoecx: update to structure based atomics
Pauli [Wed, 21 Jun 2023 23:33:40 +0000 (09:33 +1000)] 
ecx: update to structure based atomics

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

2 years agoec: update to structure based atomics
Pauli [Wed, 21 Jun 2023 23:32:45 +0000 (09:32 +1000)] 
ec: update to structure based atomics

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

2 years agoasn1: update to structure based atomics
Pauli [Wed, 21 Jun 2023 23:30:52 +0000 (09:30 +1000)] 
asn1: update to structure based atomics

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

2 years agodso: update to structure based atomics
Pauli [Wed, 21 Jun 2023 23:29:24 +0000 (09:29 +1000)] 
dso: update to structure based atomics

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

2 years agodsa: update to structure based atomics
Pauli [Wed, 21 Jun 2023 23:28:57 +0000 (09:28 +1000)] 
dsa: update to structure based atomics

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

2 years agodh: update to structure based atomics
Pauli [Wed, 21 Jun 2023 23:28:11 +0000 (09:28 +1000)] 
dh: update to structure based atomics

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

2 years agobio: update to structure based atomics
Pauli [Wed, 21 Jun 2023 23:26:38 +0000 (09:26 +1000)] 
bio: update to structure based atomics

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

2 years agoengine: update to structure based atomics
Pauli [Wed, 21 Jun 2023 23:24:27 +0000 (09:24 +1000)] 
engine: update to structure based atomics

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

2 years agorefcnt: convert references counts to a structure
Pauli [Wed, 21 Jun 2023 23:48:56 +0000 (09:48 +1000)] 
refcnt: convert references counts to a structure

The structure includes the count and optionally a lock.
The count has the appropriate qualifiers.

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

2 years agoconf/conf_sap.c: correct return of ossl_config_int() in UEFI system
Yi Li [Tue, 27 Jun 2023 14:33:24 +0000 (22:33 +0800)] 
conf/conf_sap.c: correct return of ossl_config_int() in UEFI system

FIX: https://github.com/openssl/openssl/issues/21299

ret in ossl_config_int() only used to check return value of
CONF_modules_load_file(), should set it to 1 if in UEFI system.

Signed-off-by: Yi Li <yi1.li@intel.com>
Reviewed-by: Matt Caswell <matt@openssl.org>
Reviewed-by: Tom Cosgrove <tom.cosgrove@arm.com>
Reviewed-by: Tomas Mraz <tomas@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/21300)

2 years agoFix OSSL_PROVIDER_try_load() retain_fallbacks doc
Duncan Thomson [Wed, 28 Jun 2023 21:02:26 +0000 (22:02 +0100)] 
Fix OSSL_PROVIDER_try_load() retain_fallbacks doc

CLA: trivial

Reviewed-by: Tom Cosgrove <tom.cosgrove@arm.com>
Reviewed-by: Matt Caswell <matt@openssl.org>
Reviewed-by: Paul Dale <pauli@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/21319)

2 years agoopenssl-rsautl.pod: Add missing comma
Jakub Wilk [Wed, 28 Jun 2023 20:17:00 +0000 (22:17 +0200)] 
openssl-rsautl.pod: Add missing comma

CLA: trivial

Reviewed-by: Tom Cosgrove <tom.cosgrove@arm.com>
Reviewed-by: Paul Dale <pauli@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/21318)

2 years agoFix new typo found by codespell in demo
Dimitri Papadopoulos [Thu, 29 Jun 2023 06:55:56 +0000 (08:55 +0200)] 
Fix new typo found by codespell in demo

Reviewed-by: Matt Caswell <matt@openssl.org>
Reviewed-by: Tom Cosgrove <tom.cosgrove@arm.com>
Reviewed-by: Paul Dale <pauli@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/21322)

2 years agoFix new typos found by codespell in documentation
Dimitri Papadopoulos [Thu, 29 Jun 2023 06:55:12 +0000 (08:55 +0200)] 
Fix new typos found by codespell in documentation

Reviewed-by: Matt Caswell <matt@openssl.org>
Reviewed-by: Tom Cosgrove <tom.cosgrove@arm.com>
Reviewed-by: Paul Dale <pauli@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/21322)

2 years agoFix new typos found by codespell in man pages
Dimitri Papadopoulos [Thu, 29 Jun 2023 06:54:42 +0000 (08:54 +0200)] 
Fix new typos found by codespell in man pages

Reviewed-by: Matt Caswell <matt@openssl.org>
Reviewed-by: Tom Cosgrove <tom.cosgrove@arm.com>
Reviewed-by: Paul Dale <pauli@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/21322)

2 years agoCI: add GCC 13
Sam James [Wed, 26 Apr 2023 00:04:09 +0000 (01:04 +0100)] 
CI: add GCC 13

Signed-off-by: Sam James <sam@gentoo.org>
Reviewed-by: Tom Cosgrove <tom.cosgrove@arm.com>
Reviewed-by: Paul Dale <pauli@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/20961)

2 years agoFix typos in s_client
Matt Caswell [Tue, 27 Jun 2023 09:23:47 +0000 (10:23 +0100)] 
Fix typos in s_client

There was some typos of OPENSS_NO_QUIC (should be OPENSSL_NO_QUIC) in
s_client

Fixes #21291

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

2 years agohpke.h, thread.h: Add extern "C" for C++ inclusion
Tomas Mraz [Wed, 28 Jun 2023 09:43:37 +0000 (11:43 +0200)] 
hpke.h, thread.h: Add extern "C" for C++ inclusion

Fixes #21305

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

2 years agoDo not use stitched AES-GCM implementation on PPC32
Tomas Mraz [Wed, 28 Jun 2023 14:55:57 +0000 (16:55 +0200)] 
Do not use stitched AES-GCM implementation on PPC32

The implementation is not usable there at all.
Fixes #21301

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

(cherry picked from commit b256d32915d29bdcbc109363d3b05fce6dac30b7)

2 years agofix: add fuzz oids
Jonathan M. Wilbur [Tue, 27 Jun 2023 02:16:20 +0000 (02:16 +0000)] 
fix: add fuzz oids

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

2 years agofeat: add missing pki / pmi object identifiers
Jonathan M. Wilbur [Sun, 18 Jun 2023 17:56:57 +0000 (17:56 +0000)] 
feat: add missing pki / pmi object identifiers

Signed-off-by: Jonathan M. Wilbur <jonathan@wilbur.space>
Reviewed-by: Tomas Mraz <tomas@openssl.org>
Reviewed-by: Paul Dale <pauli@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/21232)

2 years agoFix multistream test script 18
Hugo Landau [Wed, 28 Jun 2023 13:31:09 +0000 (14:31 +0100)] 
Fix multistream test script 18

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

2 years agoopenssl speed -multi -evp prints wrong algorithm name
Jörg Sommer [Thu, 15 Jun 2023 16:16:49 +0000 (18:16 +0200)] 
openssl speed -multi -evp prints wrong algorithm name

When running `openssl speed -evp md5` the result shows `md5` as algorithm
name. But when adding the option `-multi 2` it gives `evp` as algorithm
name.

Signed-off-by: Jörg Sommer <joerg@jo-so.de>
Reviewed-by: Tom Cosgrove <tom.cosgrove@arm.com>
Reviewed-by: Tomas Mraz <tomas@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/21216)

2 years agodesign proposal: fast param location outline
Pauli [Thu, 11 May 2023 07:14:26 +0000 (17:14 +1000)] 
design proposal: fast param location outline

Reviewed-by: Hugo Landau <hlandau@openssl.org>
Reviewed-by: Shane Lontis <shane.lontis@oracle.com>
(Merged from https://github.com/openssl/openssl/pull/20940)

2 years agoAdd a tutorial on writing a simple blocking QUIC client
Matt Caswell [Wed, 14 Jun 2023 09:22:57 +0000 (10:22 +0100)] 
Add a tutorial on writing a simple blocking QUIC client

This tutorial only covers a single stream client at this stage. A future
PR will cover adding multi-stream support.

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

2 years agoBefore we do anything the ping deadline is infinite
Matt Caswell [Tue, 13 Jun 2023 12:12:08 +0000 (13:12 +0100)] 
Before we do anything the ping deadline is infinite

Needed for tserver so that it the deadline isn't immediate before we've
accepted a connection.

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

2 years agoEnsure SSL_connect() actually blocks if we are in blocking mode
Matt Caswell [Tue, 13 Jun 2023 12:11:18 +0000 (13:11 +0100)] 
Ensure SSL_connect() actually blocks if we are in blocking mode

Fix supplied by Hugo Landau.

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

2 years agoThe CC wake up deadline is now if we have TX allowance
Matt Caswell [Tue, 13 Jun 2023 12:08:00 +0000 (13:08 +0100)] 
The CC wake up deadline is now if we have TX allowance

If we have TX allowance then there is no need to wait if we have something
to send - the wake up deadline is immediate.

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

2 years agoAdd a non-blocking QUIC client demo
Matt Caswell [Thu, 8 Jun 2023 15:36:17 +0000 (16:36 +0100)] 
Add a non-blocking QUIC client demo

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

2 years agoAdd a test quicserver utility
Matt Caswell [Thu, 8 Jun 2023 11:18:38 +0000 (12:18 +0100)] 
Add a test quicserver utility

This QUIC server utility is intended for test purposes only and is expected
to be replaced in a future version of OpenSSL by s_server. At that point
it will be removed.

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

2 years agoadd no-docs option
Vladimír Kotal [Mon, 19 Jun 2023 11:43:35 +0000 (13:43 +0200)] 
add no-docs option

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

2 years agos390xcap.c: Avoid copying structure on initialization
Tomas Mraz [Mon, 26 Jun 2023 15:13:30 +0000 (17:13 +0200)] 
s390xcap.c: Avoid copying structure on initialization

This is problematic on old compilers. It also avoids duplicating
the read-only data.

Reviewed-by: Todd Short <todd.short@me.com>
Reviewed-by: Matt Caswell <matt@openssl.org>
Reviewed-by: Paul Dale <pauli@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/21284)

(cherry picked from commit 0dee3b0421047354abd0b70cedd4c1bceaf323b0)

2 years agoMiscellaneous updates
Hugo Landau [Wed, 26 Apr 2023 14:11:08 +0000 (15:11 +0100)] 
Miscellaneous updates

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

2 years agoMulti-Stream API
Hugo Landau [Wed, 29 Mar 2023 06:58:15 +0000 (07:58 +0100)] 
Multi-Stream API

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

2 years agoQUIC API: More minor tweaks
Hugo Landau [Thu, 5 Jan 2023 10:59:43 +0000 (10:59 +0000)] 
QUIC API: More minor tweaks

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

2 years agoQUIC API: Minor tweaks
Hugo Landau [Thu, 8 Dec 2022 15:00:47 +0000 (15:00 +0000)] 
QUIC API: Minor tweaks

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

2 years agoQUIC API Overview: Add SSL API triage list
Hugo Landau [Thu, 8 Dec 2022 10:11:21 +0000 (10:11 +0000)] 
QUIC API Overview: Add SSL API triage list

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