]> git.ipfire.org Git - thirdparty/openssl.git/log
thirdparty/openssl.git
7 days agoUse 'codespell:ignore' where justifiable openssl-3.3
Richard Levitte [Thu, 18 Dec 2025 08:52:11 +0000 (09:52 +0100)] 
Use 'codespell:ignore' where justifiable

There's this one random string where we have the word "Hellow".  It's a
random string, "correct" spelling is really not important, so we tell
codespell to just ignore that line.

There were also two struct field names...

Reviewed-by: Neil Horman <nhorman@openssl.org>
Reviewed-by: Tomas Mraz <tomas@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/29463)

7 days agoFix legitimate spelling errors
Richard Levitte [Thu, 18 Dec 2025 08:51:36 +0000 (09:51 +0100)] 
Fix legitimate spelling errors

Reviewed-by: Neil Horman <nhorman@openssl.org>
Reviewed-by: Tomas Mraz <tomas@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/29463)

7 days agoAdjust .codespellrc
Richard Levitte [Thu, 18 Dec 2025 08:17:15 +0000 (09:17 +0100)] 
Adjust .codespellrc

- add 'external/*' to the list of patterns to skip
- add '*.csr' to the list of patterns to skip

Reviewed-by: Neil Horman <nhorman@openssl.org>
Reviewed-by: Tomas Mraz <tomas@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/29463)

9 days agoBIO_send/recvmmsg(): Pass msgs_processed to the return callback
Tomas Mraz [Mon, 15 Dec 2025 10:41:38 +0000 (11:41 +0100)] 
BIO_send/recvmmsg(): Pass msgs_processed to the return callback

This avoids crash if a legacy BIO callback is set and
BIO_sendmmsg() or BIO_recvmmsg() is used.

Reported by Stanislav Fort (Aisle Research)

Reviewed-by: Matt Caswell <matt@openssl.org>
Reviewed-by: Norbert Pocs <norbertp@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/29395)

(cherry picked from commit 380ff1448596926fc9d252c8e4c2720b006ef912)

9 days agoppc64le: Restore VSX registers in AES/GCM ppc64le encrypt/decrypt
Danny Tsen [Thu, 23 Oct 2025 20:51:05 +0000 (16:51 -0400)] 
ppc64le: Restore VSX registers in AES/GCM ppc64le encrypt/decrypt

The implementation failed to restore VSX vector registers from vs14-vs22.

Re-implemented based on Linux kernel version.

Fixes #28961

Signed-off-by: Danny Tsen <dtsen@us.ibm.com>
Reviewed-by: Dmitry Belyavskiy <beldmit@gmail.com>
Reviewed-by: Tomas Mraz <tomas@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/28990)

(cherry picked from commit ebd690b1eb0d95c6784e2f36dd86d72670b82794)

9 days agoadd .codespellrc
Dmitry Misharov [Tue, 30 Sep 2025 08:44:55 +0000 (10:44 +0200)] 
add .codespellrc

(cherry picked from commit 8cf23cff816d3c2d2e4c439e0e0dfd0710480ee8)

Reviewed-by: Neil Horman <nhorman@openssl.org>
Reviewed-by: Nikola Pajkovsky <nikolap@openssl.org>
Reviewed-by: Tomas Mraz <tomas@openssl.org>
Reviewed-by: Richard Levitte <levitte@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/29432)

(cherry picked from commit edf3ab097ccd536848bf2ca32b93306f78f30a38)

10 days agoFix silent failure in ASYNC_start_job when size is 0
Weizhi Ao [Thu, 11 Dec 2025 13:06:23 +0000 (21:06 +0800)] 
Fix silent failure in ASYNC_start_job when size is 0

When ASYNC_start_job is called with args != NULL but size == 0,
OPENSSL_malloc(0) is called. Depending on the libc implementation,
malloc(0) may return NULL, causing a silent failure.

This patch modifies the logic to skip allocation if size is 0.

CLA: trivial

Reviewed-by: Norbert Pocs <norbertp@openssl.org>
Reviewed-by: Saša Nedvědický <sashan@openssl.org>
Reviewed-by: Tomas Mraz <tomas@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/29377)

(cherry picked from commit 5cbbced70dd7dd37b6b11dc6e5b7ca78d4d2e436)

10 days agoEnsure path to libcrypto can be resolved on AIX.
Matthias Kraft [Wed, 10 Dec 2025 16:02:54 +0000 (17:02 +0100)] 
Ensure path to libcrypto can be resolved on AIX.

On AIX, the environment of the test executable for test_includes doesn't
contain a resolvable search path to the just built libcrypto. Setup
LIBPATH to point to the build results.

Fixes #29352.

Signed-off-by: Matthias Kraft <Matthias.Kraft@ibm.com>
Reviewed-by: Simo Sorce <simo@redhat.com>
Reviewed-by: Tomas Mraz <tomas@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/29375)

(cherry picked from commit 576efc44ae00b58d6505df1f21cfa5cd3f58da9b)

10 days agoCheck return code of UTF8_putc
Norbert Pocs [Thu, 11 Dec 2025 11:49:00 +0000 (12:49 +0100)] 
Check return code of UTF8_putc

Signed-off-by: Norbert Pocs <norbertp@openssl.org>
Reviewed-by: Nikola Pajkovsky <nikolap@openssl.org>
Reviewed-by: Viktor Dukhovni <viktor@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/29376)

10 days agoHarden ASN1_mbstring_ncopy
Norbert Pocs [Thu, 11 Dec 2025 11:38:16 +0000 (12:38 +0100)] 
Harden ASN1_mbstring_ncopy

Reported by Murali Aniruddhan

Signed-off-by: Norbert Pocs <norbertp@openssl.org>
Reviewed-by: Nikola Pajkovsky <nikolap@openssl.org>
Reviewed-by: Viktor Dukhovni <viktor@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/29376)

10 days agoThe stream garbage collector loop in ossl_quic_stream_map_gc() is never entered
Alexandr Nedvedicky [Tue, 16 Dec 2025 10:01:43 +0000 (11:01 +0100)] 
The stream garbage collector loop in ossl_quic_stream_map_gc() is never entered

Also remove ready_for_gc_next(), it is not needed any more.

Reviewed-by: Matt Caswell <matt@openssl.org>
Reviewed-by: Norbert Pocs <norbertp@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/29402)

11 days agoapps/req.c: Always set permissions for private key output
Tomas Mraz [Mon, 15 Dec 2025 11:19:30 +0000 (12:19 +0100)] 
apps/req.c: Always set permissions for private key output

The key output will be always private.

Reported with a proposed fix by Stanislav Fort (Aisle Research).

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

11 days agoFix error in PAC/BTI AArch64 build
Paul Elliott [Mon, 15 Dec 2025 13:05:00 +0000 (13:05 +0000)] 
Fix error in PAC/BTI AArch64 build

Clang format removes a space here, which creates a compiler error when
building for PAC/BTI. Fix this and Turn off clang format for this line

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

13 days agoDocumentation for BIO flags and related functions.
Igor Ustinov [Thu, 4 Dec 2025 16:05:59 +0000 (17:05 +0100)] 
Documentation for BIO flags and related functions.

Reviewed-by: Frederik Wedel-Heinen <fwh.openssl@gmail.com>
Reviewed-by: Tomas Mraz <tomas@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/29311)

(cherry picked from commit e12870deb022555dd15678ff745c33ff19b65dfe)

2 weeks agoEnable send-/recvmmsg for AIX >= 7.2 and disable SUPPORT_LOCAL_ADDR.
Matthias Kraft [Fri, 5 Dec 2025 16:52:28 +0000 (17:52 +0100)] 
Enable send-/recvmmsg for AIX >= 7.2 and disable SUPPORT_LOCAL_ADDR.

AIX doesn't support this implementation for local addresses. The AF_INET
case is unimplemented when sending. The AF_INET6 case is limited to 110
messages. The limiting factor is currently unclear.

Fixes #29292

Signed-off-by: Matthias Kraft <Matthias.Kraft@ibm.com>
Reviewed-by: Matt Caswell <matt@openssl.org>
Reviewed-by: Norbert Pocs <norbertp@openssl.org>
Reviewed-by: Tomas Mraz <tomas@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/29334)

(cherry picked from commit 52cd2a49c53ee6b08a8a76624f2a80f00248d679)

2 weeks agoFix memory leak in error path of ec_gen_init()
Niels Dossche [Mon, 8 Dec 2025 14:17:56 +0000 (15:17 +0100)] 
Fix memory leak in error path of ec_gen_init()

ec_gen_set_params() can fail after some big numbers have already been
copied over. Those need to be cleaned to avoid a memory leak on failure.
This can be done with ec_gen_cleanup(), which is also consistent in how
the ecx_gen code does it.

Reviewed-by: Dmitry Belyavskiy <beldmit@gmail.com>
Reviewed-by: Tomas Mraz <tomas@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/29335)

(cherry picked from commit 26d138af724961c5f30263c15ae8137d4f86645b)

2 weeks agorun codespell pre-commit hook on staged files only
Dmitry Misharov [Tue, 9 Dec 2025 16:39:14 +0000 (17:39 +0100)] 
run codespell pre-commit hook on staged files only

Reviewed-by: Richard Levitte <levitte@openssl.org>
Reviewed-by: Tomas Mraz <tomas@openssl.org>
Reviewed-by: Matt Caswell <matt@openssl.org>
Reviewed-by: Neil Horman <nhorman@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/29360)

(cherry picked from commit d70b22bf2df27e02db5b209d2bc42cd97d6a928c)

2 weeks agoadd clang-format as a pre-commit hook
Dmitry Misharov [Tue, 2 Dec 2025 07:54:53 +0000 (08:54 +0100)] 
add clang-format as a pre-commit hook

Reviewed-by: Neil Horman <nhorman@openssl.org>
Reviewed-by: Saša Nedvědický <sashan@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/29282)

(cherry picked from commit d6f3733f94fe6414571b080ee22813bba3621dab)

2 weeks agoFix array formatting in evp_extra_test.c
Matt Caswell [Tue, 9 Dec 2025 12:22:02 +0000 (12:22 +0000)] 
Fix array formatting in evp_extra_test.c

The reformat did something silly with some of the arrays in evp_extra_test.c
Fix the arrays such that clang-format is still happy.

Reviewed-by: Richard Levitte <levitte@openssl.org>
Reviewed-by: Tomas Mraz <tomas@openssl.org>
Reviewed-by: Nikola Pajkovsky <nikolap@openssl.org>
Reviewed-by: Neil Horman <nhorman@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/29349)

(cherry picked from commit d54932c9fa4b59e0db8296b91a9392efb9cd897e)

2 weeks agoadd git-blame ignore commit
Neil Horman [Tue, 9 Dec 2025 11:29:21 +0000 (06:29 -0500)] 
add git-blame ignore commit

Reviewed-by: Saša Nedvědický <sashan@openssl.org>
Reviewed-by: Norbert Pocs <norbertp@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/29347)

2 weeks ago3.3-POST-CLANG-FORMAT-WEBKIT 3.3-POST-CLANG-FORMAT-WEBKIT
Bob Beck [Tue, 9 Dec 2025 10:17:44 +0000 (03:17 -0700)] 
3.3-POST-CLANG-FORMAT-WEBKIT

Reviewed-by: Neil Horman <nhorman@openssl.org>
Reviewed-by: Saša Nedvědický <sashan@openssl.org>
Reviewed-by: Nikola Pajkovsky <nikolap@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/29258)

2 weeks ago3.3-PRE-CLANG-FORMAT-WEBKIT 3.3-PRE-CLANG-FORMAT-WEBKIT
Bob Beck [Tue, 9 Dec 2025 10:15:25 +0000 (03:15 -0700)] 
3.3-PRE-CLANG-FORMAT-WEBKIT

Reviewed-by: Neil Horman <nhorman@openssl.org>
Reviewed-by: Saša Nedvědický <sashan@openssl.org>
Reviewed-by: Nikola Pajkovsky <nikolap@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/29258)

3 weeks agonits in progs.pl
Bob Beck [Mon, 1 Dec 2025 17:19:49 +0000 (10:19 -0700)] 
nits in progs.pl

Reviewed-by: Neil Horman <nhorman@openssl.org>
Reviewed-by: Tomas Mraz <tomas@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/29257)

3 weeks agoDisable clang format around .c includes
Bob Beck [Thu, 28 Aug 2025 18:59:59 +0000 (12:59 -0600)] 
Disable clang format around .c includes

we assume these to be order sensitive and not self contained, so
as per our new style we disable clang format around them.

we should consider renaming to .inc, or doing away with some
of these and just putting the code inline, but that's for
later consideration.

Reviewed-by: Neil Horman <nhorman@openssl.org>
Reviewed-by: Tomas Mraz <tomas@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/29257)

3 weeks agoDisable clang format around multi-line macros of sparc assembly
Bob Beck [Thu, 27 Nov 2025 22:17:00 +0000 (15:17 -0700)] 
Disable clang format around multi-line macros of sparc assembly

They are not asm, but spit out stuff that is not C

Clang-format gets confused and does bad things with them.

Reviewed-by: Neil Horman <nhorman@openssl.org>
Reviewed-by: Tomas Mraz <tomas@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/29257)

3 weeks agoFix cmp_ctx_test.c to be less sensitive to line wrapping.
Bob Beck [Tue, 2 Sep 2025 16:07:08 +0000 (10:07 -0600)] 
Fix cmp_ctx_test.c to be less sensitive to line wrapping.

Similar to the previous errtest.c fix this also is not broken
by any reformatting today, but this change makes this follow
the same pattern as the other things that test OPENSSL_LINE
after the fact so we maintain the same paradigm everywhere.

Reviewed-by: Neil Horman <nhorman@openssl.org>
Reviewed-by: Tomas Mraz <tomas@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/29257)

3 weeks agofix errtest to be less sensitive to line wrapping changes
Bob Beck [Fri, 29 Aug 2025 17:37:36 +0000 (11:37 -0600)] 
fix errtest to be less sensitive to line wrapping changes

(in it's final form it will work with either compiler
because it's currently one line, but was tripped up before
by the #ifdef, so redid it to be consistent with the
other changes previously in this stack)

While I am here correct the test to test for all possible
return values of ERR_get_error_all, without the #ifdefs

Reviewed-by: Neil Horman <nhorman@openssl.org>
Reviewed-by: Tomas Mraz <tomas@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/29257)

3 weeks agoFix apps/progs.pl to be slightly less fragile
Bob Beck [Thu, 21 Aug 2025 23:15:09 +0000 (17:15 -0600)] 
Fix apps/progs.pl to be slightly less fragile

In particular fix the regex magic to be tolerant of different ways
of formatting a main program.

My past life had forgotten this magic 14 years ago when we converted
it to just a table of commands in the forks.

https://www.youtube.com/watch?v=mWbbjvYmN8A

Reviewed-by: Neil Horman <nhorman@openssl.org>
Reviewed-by: Tomas Mraz <tomas@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/29257)

3 weeks agoAdd a WebKit clang-format file
Bob Beck [Fri, 5 Sep 2025 01:02:41 +0000 (19:02 -0600)] 
Add a WebKit clang-format file

Reviewed-by: Neil Horman <nhorman@openssl.org>
Reviewed-by: Tomas Mraz <tomas@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/29257)

3 weeks agocheck_cert_crl(): Set CRL score for CRLs returned by get_crl callback
Timothy Copeland [Tue, 2 Dec 2025 05:05:30 +0000 (16:05 +1100)] 
check_cert_crl(): Set CRL score for CRLs returned by get_crl callback

Reviewed-by: Nikola Pajkovsky <nikolap@openssl.org>
Reviewed-by: Tomas Mraz <tomas@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/29199)

(cherry picked from commit c7a657d8007853791f27235a176131ad1daf358a)

3 weeks agoSkip symbol_presence test on AIX
Matthias Kraft [Fri, 28 Nov 2025 14:30:01 +0000 (15:30 +0100)] 
Skip symbol_presence test on AIX

AIX `nm` reports symbols in a different way.

Fix for: #29247

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

(cherry picked from commit ad29e4b134d533a57ef632aac86017edee65a178)

3 weeks agoadd release notes from NEWS.md when making a release
Dmitry Misharov [Mon, 1 Dec 2025 16:58:21 +0000 (17:58 +0100)] 
add release notes from NEWS.md when making a release

Reviewed-by: Eugene Syromiatnikov <esyr@openssl.org>
Reviewed-by: Tomas Mraz <tomas@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/29274)

3 weeks agoremove potentially not secure template expansions
Dmitry Misharov [Thu, 23 Oct 2025 10:23:55 +0000 (12:23 +0200)] 
remove potentially not secure template expansions

https://docs.zizmor.sh/audits/#template-injection

Reviewed-by: Eugene Syromiatnikov <esyr@openssl.org>
Reviewed-by: Tomas Mraz <tomas@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/29274)

3 weeks agodtls_get_reassembled_message(): Fix potential use-after-realloc
Tomas Mraz [Mon, 1 Dec 2025 16:14:21 +0000 (17:14 +0100)] 
dtls_get_reassembled_message(): Fix potential use-after-realloc

Fortunately due to the initial size of the allocated
buffer and the limit for unfragmented DTLS record size
the use-after-realloc cannot be triggered.

But we fix the potentially problematic code anyway.

Reported Joshua Rogers. It was found with the ZeroPath security
tooling.

Reviewed-by: Dmitry Belyavskiy <beldmit@gmail.com>
Reviewed-by: Matt Caswell <matt@openssl.org>
Reviewed-by: Paul Dale <paul.dale@oracle.com>
(Merged from https://github.com/openssl/openssl/pull/29278)

(cherry picked from commit 6d1d85c31b4840d08b48e57b1812a37cb9aa89ec)

3 weeks agos390x: Check and fail on invalid malformed ECDSA signatures
Holger Dengler [Wed, 26 Nov 2025 15:18:49 +0000 (16:18 +0100)] 
s390x: Check and fail on invalid malformed ECDSA signatures

Check parameters of ECDSA signatures on verify and fail for invalid
malformed signatures in the code path for s390x accelerators. Handle
condition code of kdsa instruction for detecting invalid parameters.

For NIST P521 curves, kdsa ignores completely the upper 14 bytes of
the sections for r and s in the parameter-block, so adapt the offset
and length for bignum conversions for these curves. This will detect
cases of malformed signatures which are not covered by the kdsa
parameter checking.

Fixes: #29173
Signed-off-by: Holger Dengler <dengler@linux.ibm.com>
Reviewed-by: Dmitry Belyavskiy <beldmit@gmail.com>
Reviewed-by: Tomas Mraz <tomas@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/29214)

(cherry picked from commit 8e28ea9e6244fb425b948780903a37cde338c2b4)

3 weeks agos390x: Return condition code of kdsa instruction
Holger Dengler [Wed, 26 Nov 2025 15:18:37 +0000 (16:18 +0100)] 
s390x: Return condition code of kdsa instruction

The kdsa instruction is doing some parameter checking for the verify
function codes, like r/s equals zero and range checks. To handle these
cases correctly in the calling functions, the asm returns now also
condition code 2.

Signed-off-by: Holger Dengler <dengler@linux.ibm.com>
Reviewed-by: Dmitry Belyavskiy <beldmit@gmail.com>
Reviewed-by: Tomas Mraz <tomas@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/29214)

(cherry picked from commit bcaa2a3af60c3c1f282b621522bbc316341bf692)

3 weeks agoCIFuzz: Remove some unnecessary files to free up space
Bernd Edlinger [Sun, 25 Feb 2024 15:33:33 +0000 (16:33 +0100)] 
CIFuzz: Remove some unnecessary files to free up space

Reviewed-by: Norbert Pocs <norbertp@openssl.org>
Reviewed-by: Nikola Pajkovsky <nikolap@openssl.org>
Reviewed-by: Tomas Mraz <tomas@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/29061)

(cherry picked from commit 0857839af1e3d95933402ad51e20134b65f28937)

3 weeks agoensure destructor key is created prior to any other thread specific key
Neil Horman [Thu, 20 Nov 2025 16:49:19 +0000 (11:49 -0500)] 
ensure destructor key is created prior to any other thread specific key

https://github.com/openssl/openssl/issues/29077 found that, in the event
that a pthread key is created prior to the destructor_key, glibc will
NULL-ify any thread specific data before the init_thread_destructor
runs, leading to leaks.

Ensure that we always create the destructor key prior to any other
thread local storage keys

Fixes #29907

Reviewed-by: Dmitry Belyavskiy <beldmit@gmail.com>
Reviewed-by: Norbert Pocs <norbertp@openssl.org>
Reviewed-by: Nikola Pajkovsky <nikolap@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/29182)

(cherry picked from commit 66f92cfb925e5c4c830ab65cf738ab49c5e553a4)

3 weeks agoBranch 3.2 was removed from and branch 3.6 was added to the
Igor Ustinov [Thu, 27 Nov 2025 12:08:02 +0000 (13:08 +0100)] 
Branch 3.2 was removed from and branch 3.6 was added to the
"Provider compatibility for PRs" test.
Do not test the provider from the PR against modified branches.

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

(cherry picked from commit 20991f30006d20d2dac270077de7b20e78300b82)

4 weeks agoDOC: fix typo in openssl-cmp
Shohei YOSHIDA [Mon, 24 Nov 2025 08:55:06 +0000 (17:55 +0900)] 
DOC: fix typo in openssl-cmp

RAVERIFED -> RAVERIFIED

CLA: trivial

Reviewed-by: Norbert Pocs <norbertp@openssl.org>
Reviewed-by: Eugene Syromiatnikov <esyr@openssl.org>
Reviewed-by: Paul Yang <paulyang.inf@gmail.com>
Reviewed-by: Paul Dale <paul.dale@oracle.com>
(Merged from https://github.com/openssl/openssl/pull/29202)

(cherry picked from commit 0db815332d44f1df663d270a580f2bdaf8cced9e)

4 weeks agoMove CRL extensions from v3_ocsp.c to v3_crldp.c
Tomas Mraz [Thu, 27 Nov 2025 11:19:55 +0000 (12:19 +0100)] 
Move CRL extensions from v3_ocsp.c to v3_crldp.c

Otherwise they will not be handled by no-ocsp build.

Reviewed-by: Norbert Pocs <norbertp@openssl.org>
Reviewed-by: Eugene Syromiatnikov <esyr@openssl.org>
Reviewed-by: Viktor Dukhovni <viktor@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/29234)

(cherry picked from commit ed04580650907bcd5c11ba09996a9fb6fb9b4972)

4 weeks agoDocument CVE-2021-4160
Bernd Edlinger [Mon, 3 Nov 2025 13:00:15 +0000 (14:00 +0100)] 
Document CVE-2021-4160

This was fixed in openssl 3.0.1 by #17258 and assigned
CVE-2021-4160 but unfortunately forgotten to mention
in the CHANGES and/or NEWS.

Reviewed-by: Paul Yang <paulyang.inf@gmail.com>
Reviewed-by: Dmitry Belyavskiy <beldmit@gmail.com>
Reviewed-by: Tom Cosgrove <tom.cosgrove@arm.com>
Reviewed-by: Tomas Mraz <tomas@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/29051)

(cherry picked from commit 134f17d526a5d0a9fbd66adf85e53df8a764a2ff)

4 weeks agoRemove Ed25519ctx from the FIPS provider
Igor Ustinov [Thu, 13 Nov 2025 19:03:23 +0000 (20:03 +0100)] 
Remove Ed25519ctx from the FIPS provider

This Ed25519 algorithm variant is not FIPS approved.

Fixes #27502

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

4 weeks agodoc: Discuss calling X509_verify_cert in cert_verify_callback
David Benjamin [Mon, 20 Oct 2025 21:38:14 +0000 (17:38 -0400)] 
doc: Discuss calling X509_verify_cert in cert_verify_callback

Using SSL_CTX_set_cert_verify_callback but still calling
X509_verify_cert is useful if applications want to dynamically
configure the X509_STORE_CTX, or postprocess the result, in a way that
does not quite fit the somewhat unpredictable behavior of the
SSL_CTX_set_verify callback. (In my experience, applications rarely
realize it is called multiple times. It's also too late at that point to
reconfigure the X509_STORE_CTX as verification has already started.)

There is one note in the docs that the callback needs to stash the
verify result with X509_STORE_CTX_set_error, but it is not immediately
obvious that X509_verify_cert will do so, or that it is the built-in
behavior. Add a paragraph discussing this.

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

(cherry picked from commit 069181d7f39beaae22bfa67bcba3c5fe93acafd4)

4 weeks agoasn1: clear error mark on success in asn1_d2i_read_bio
Joshua Rogers [Sat, 11 Oct 2025 12:40:13 +0000 (20:40 +0800)] 
asn1: clear error mark on success in asn1_d2i_read_bio

Balance ERR_set_mark by calling ERR_clear_last_mark on the success path.
Prevents a stale mark from skewing later error handling.

Signed-off-by: Joshua Rogers <MegaManSec@users.noreply.github.com>
Reviewed-by: Matt Caswell <matt@openssl.org>
Reviewed-by: Eugene Syromiatnikov <esyr@openssl.org>
Reviewed-by: Tomas Mraz <tomas@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/28882)

(cherry picked from commit 7f015c909ee3480a59d4fe828c3da22c7a55a2f4)

4 weeks agocrypto/bio/bss_acpt: reset accept_sock and b->num after close in ACPT_S_LISTEN failures
Joshua Rogers [Sat, 11 Oct 2025 21:39:25 +0000 (05:39 +0800)] 
crypto/bio/bss_acpt: reset accept_sock and b->num after close in ACPT_S_LISTEN failures

On BIO_listen or BIO_sock_info failure we close the socket but leave
accept_sock and b->num pointing at the old fd. Later cleanup can double
close.

Set both to INVALID_SOCKET immediately after BIO_closesocket.

Signed-off-by: Joshua Rogers <MegaManSec@users.noreply.github.com>
Reviewed-by: Saša Nedvědický <sashan@openssl.org>
Reviewed-by: Eugene Syromiatnikov <esyr@openssl.org>
Reviewed-by: Neil Horman <nhorman@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/28904)

(cherry picked from commit 1c4f7b10358b79a0b33619187caa2b7e3bdb6e7a)

5 weeks agoCorrect information about the default value of the -md parameter
Igor Ustinov [Wed, 19 Nov 2025 15:21:30 +0000 (16:21 +0100)] 
Correct information about the default value of the -md parameter
of the openssl cms command.

Reviewed-by: Tomas Mraz <tomas@openssl.org>
Reviewed-by: Dmitry Belyavskiy <beldmit@gmail.com>
Reviewed-by: Paul Dale <paul.dale@oracle.com>
Reviewed-by: Neil Horman <nhorman@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/29175)

(cherry picked from commit 2a7b058429938e40e20882a80bc5d2f426b145b8)

5 weeks agodoc/man3/OPENSSL_malloc.pod: mention rationale for OPENSSL_cleanse()
Eugene Syromiatnikov [Wed, 19 Nov 2025 14:19:59 +0000 (15:19 +0100)] 
doc/man3/OPENSSL_malloc.pod: mention rationale for OPENSSL_cleanse()

It was not entirely clear from the sole description, what is  the reason
for preferring OPENSSL_cleanse() over memset().  Add a note about situations
in which OPENSSL_cleanse() should be chosen.

Signed-off-by: Eugene Syromiatnikov <esyr@openssl.org>
Reviewed-by: Dmitry Belyavskiy <beldmit@gmail.com>
Reviewed-by: Paul Dale <paul.dale@oracle.com>
Reviewed-by: Richard Levitte <levitte@openssl.org>
Reviewed-by: Tomas Mraz <tomas@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/29174)

(cherry picked from commit 768468f40e810ceef00b1c3b7cac05beaa1d8f8c)

5 weeks agoDOC: fix description of '-self_test_oninstall'
Shohei YOSHIDA [Wed, 19 Nov 2025 04:34:54 +0000 (13:34 +0900)] 
DOC: fix description of '-self_test_oninstall'

CLA: trivial

Reviewed-by: Paul Dale <paul.dale@oracle.com>
Reviewed-by: Eugene Syromiatnikov <esyr@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/29168)

(cherry picked from commit 978cb1f9d1fb895f51feeee4cf700cf07a063e01)

5 weeks agorand_lib.c: Use ERR_LIB_RAND with RAND_R errors
Teshan Kannangara [Sat, 8 Nov 2025 14:13:09 +0000 (19:43 +0530)] 
rand_lib.c: Use ERR_LIB_RAND with RAND_R errors

Use ERR_LIB_RAND when reporting RAND_R_ALREADY_INSTANTIATED from
RAND_set_DRBG_type() and RAND_set_seed_source_type() so the error
message references the RAND subsystem instead of CRYPTO.

Fixes #29039

CLA: trivial

Reviewed-by: Eugene Syromiatnikov <esyr@openssl.org>
Reviewed-by: Paul Dale <paul.dale@oracle.com>
Reviewed-by: Tomas Mraz <tomas@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/29109)

(cherry picked from commit e7251fa1a92bcb1fda1dad7f7e2e3ed2c0056e27)

5 weeks agobio_ok.c: Fixed undefined identifier 'SIZE_MAX'
Lars Erik Wik [Wed, 8 Oct 2025 15:06:39 +0000 (17:06 +0200)] 
bio_ok.c: Fixed undefined identifier 'SIZE_MAX'

This fixes the following compilation error on HP-UX:
```
11:07:19 crypto/evp/bio_ok.c: In function 'block_in':
11:07:19 crypto/evp/bio_ok.c:579: error: 'SIZE_MAX' undeclared (first use in this function)
11:07:19 crypto/evp/bio_ok.c:579: error: (Each undeclared identifier is reported only once
11:07:19 crypto/evp/bio_ok.c:579: error: for each function it appears in.)
```

Signed-off-by: Lars Erik Wik <lars.erik.wik@northern.tech>
CLA: trivial

Reviewed-by: Paul Dale <paul.dale@oracle.com>
Reviewed-by: Norbert Pocs <norbertp@openssl.org>
Reviewed-by: Tomas Mraz <tomas@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/28793)

(cherry picked from commit 695a5aaf0bb04bc2f2d395987f121c1ec41d3b3e)

5 weeks agoFixes for NonStop builds on 3.4 to handle OS platform header file changes
Randall S. Becker [Fri, 7 Nov 2025 19:55:02 +0000 (19:55 +0000)] 
Fixes for NonStop builds on 3.4 to handle OS platform header file changes

This changes handles the introduction of _POSIX_VERSION into the NonStop x86
header files that tricks OpenSSL into thinking that ucontext.h is available.

Build a workaround in timing_load_creds.c on NonStop for lack of rusage.
This simulates getrusage() that is not available on NonStop.

Fixes #28498
Fixes #29023

Signed-off-by: Randall S. Becker <randall.becker@nexbridge.ca>
Reviewed-by: Richard Levitte <levitte@openssl.org>
Reviewed-by: Tomas Mraz <tomas@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/29106)

(cherry picked from commit 249c506bb85b1056c28f701a8ea163cb96c1d743)

5 weeks agoPrevent NULL deref in BN_is_zero when cofactor is missing
Anton Moryakov [Tue, 4 Nov 2025 22:18:47 +0000 (01:18 +0300)] 
Prevent NULL deref in BN_is_zero when cofactor is missing

In ossl_ec_curve_nid_from_params, EC_GROUP_get0_cofactor may return NULL,
but BN_is_zero was called on it unconditionally, leading to a potential
segmentation fault.

Now check that cofactor != NULL before calling BN_is_zero or BN_is_word,
aligning with safe practices used elsewhere in the codebase.

This fixes a critical NULL pointer dereference vulnerability that could
be triggered by EC groups with unset cofactor, preventing DoS via segfault.

Signed-off-by: Anton Moryakov <ant.v.moryakov@gmail.com>
Reviewed-by: Paul Dale <paul.dale@oracle.com>
Reviewed-by: Paul Yang <paulyang.inf@gmail.com>
Reviewed-by: Tomas Mraz <tomas@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/29069)

(cherry picked from commit 87a4607668e959188aa5b3c5482d5cf7d18adf63)

5 weeks agoasn1_gen: add ASN1_object_size() return check and fix else braces
KubaBoi [Tue, 28 Oct 2025 17:22:57 +0000 (18:22 +0100)] 
asn1_gen: add ASN1_object_size() return check and fix else braces

Fixes: #6570
CLA: trivial

Reviewed-by: Norbert Pocs <norbertp@openssl.org>
Reviewed-by: Paul Yang <paulyang.inf@gmail.com>
Reviewed-by: Tomas Mraz <tomas@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/29022)

(cherry picked from commit ecf3ac3b109154fa86d897d88c0c491134429c88)

5 weeks agoCRYPTO_R_ cannot be used with ERR_LIB_OSSL_STORE
Tomas Mraz [Mon, 27 Oct 2025 14:48:40 +0000 (15:48 +0100)] 
CRYPTO_R_ cannot be used with ERR_LIB_OSSL_STORE

Use ERR_R_PASSED_NULL_PARAMETER instead.

Fixes e9e643bc580e4ba0c6f8f9b4dd2ce59397b1b786

Reviewed-by: Neil Horman <nhorman@openssl.org>
Reviewed-by: Tom Cosgrove <tom.cosgrove@arm.com>
Reviewed-by: Viktor Dukhovni <viktor@openssl.org>
Reviewed-by: Richard Levitte <levitte@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/29006)

(cherry picked from commit 376f7ee4d123f3842d85ef3c03fd070fb411ec0f)

5 weeks agoapps/s_socket: fix FD and addrinfo leak on SCTP failure in init_client
Joshua Rogers [Sat, 11 Oct 2025 22:34:40 +0000 (06:34 +0800)] 
apps/s_socket: fix FD and addrinfo leak on SCTP failure in init_client

If BIO_new_dgram_sctp(*sock, BIO_NOCLOSE) fails we returned 0 directly,
skipping the out: cleanup and leaking the just created socket plus the
addrinfo lists.

Signed-off-by: Joshua Rogers <MegaManSec@users.noreply.github.com>
Reviewed-by: Dmitry Belyavskiy <beldmit@gmail.com>
Reviewed-by: Tom Cosgrove <tom.cosgrove@arm.com>
(Merged from https://github.com/openssl/openssl/pull/28917)

(cherry picked from commit 3005b9bc8691c570f3f51c25219b7ba79a064d83)

5 weeks agocrypto/bio/bss_acpt: set b->init only on successful BIO_parse_hostserv
Joshua Rogers [Sat, 11 Oct 2025 21:43:38 +0000 (05:43 +0800)] 
crypto/bio/bss_acpt: set b->init only on successful BIO_parse_hostserv

BIO_C_SET_ACCEPT with num == 0 unconditionally set b->init = 1 even if
BIO_parse_hostserv failed. Only mark the BIO initialized when parsing
succeeds to avoid inconsistent state.

Signed-off-by: Joshua Rogers <MegaManSec@users.noreply.github.com>
Reviewed-by: Saša Nedvědický <sashan@openssl.org>
Reviewed-by: Dmitry Belyavskiy <beldmit@gmail.com>
(Merged from https://github.com/openssl/openssl/pull/28912)

(cherry picked from commit bc8a449ef7409ffe1e859d3e526e8d2a9f693d3d)

5 weeks agoquic/quic_demux: Mirror int overflow check from demux_alloc_urxe into demux_resize_urxe
Joshua Rogers [Sun, 12 Oct 2025 00:14:24 +0000 (08:14 +0800)] 
quic/quic_demux: Mirror int overflow check from demux_alloc_urxe into demux_resize_urxe

Simple hardening. In practice new_alloc_len usually comes from demux->mtu or test injection length, but adding the same check here quiets analyzers.

Signed-off-by: Joshua Rogers <MegaManSec@users.noreply.github.com>
Reviewed-by: Neil Horman <nhorman@openssl.org>
Reviewed-by: Saša Nedvědický <sashan@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/28918)

(cherry picked from commit 965d6279e8fe2ffa5d0a06d11077cd9b721813cd)

6 weeks agoAdd negative test for PKCS12_SAFEBAG_get0_bag*() functions
Tomas Mraz [Wed, 12 Nov 2025 15:59:46 +0000 (16:59 +0100)] 
Add negative test for PKCS12_SAFEBAG_get0_bag*() functions

Reviewed-by: Paul Dale <paul.dale@oracle.com>
Reviewed-by: Dmitry Belyavskiy <beldmit@gmail.com>
(Merged from https://github.com/openssl/openssl/pull/29128)

(cherry picked from commit 930a9502d15aabde8c774ebf45834c2c135047c0)

6 weeks agoAdd safety checks to PKCS12_SAFEBAG_get0_bag*() functions
Tomas Mraz [Wed, 12 Nov 2025 15:49:04 +0000 (16:49 +0100)] 
Add safety checks to PKCS12_SAFEBAG_get0_bag*() functions

Fixes #26655

Reviewed-by: Paul Dale <paul.dale@oracle.com>
Reviewed-by: Dmitry Belyavskiy <beldmit@gmail.com>
(Merged from https://github.com/openssl/openssl/pull/29128)

(cherry picked from commit 7776744a5912ac9346bf04bf60570b149243eb33)

6 weeks agoUTF8_getc(): Fail with UTF8 values outside UNICODE_LIMIT
Tomas Mraz [Tue, 11 Nov 2025 09:08:30 +0000 (10:08 +0100)] 
UTF8_getc(): Fail with UTF8 values outside UNICODE_LIMIT

Reported by Aniruddhan Murali

Reviewed-by: Dmitry Belyavskiy <beldmit@gmail.com>
Reviewed-by: Paul Dale <paul.dale@oracle.com>
Reviewed-by: Norbert Pocs <norbertp@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/29119)

(cherry picked from commit 7deeeb950be7b32a2407fdc37864b23b5b8797bd)

6 weeks agoTest invalid out of range character handling in UTF8_getc()
Tomas Mraz [Tue, 11 Nov 2025 09:11:44 +0000 (10:11 +0100)] 
Test invalid out of range character handling in UTF8_getc()

Reviewed-by: Dmitry Belyavskiy <beldmit@gmail.com>
Reviewed-by: Paul Dale <paul.dale@oracle.com>
Reviewed-by: Norbert Pocs <norbertp@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/29119)

(cherry picked from commit 3595339b6901d9880282168eca75773080969c38)

6 weeks agoTLS 1.3 session resumption convert nonce_label to ASCII hex
Angel Baez [Wed, 12 Nov 2025 12:46:28 +0000 (07:46 -0500)] 
TLS 1.3 session resumption convert nonce_label to ASCII hex

Fixes #27815
CLA: trivial

Reviewed-by: Bernd Edlinger <bernd.edlinger@hotmail.de>
Reviewed-by: Matt Caswell <matt@openssl.org>
Reviewed-by: Paul Dale <paul.dale@oracle.com>
Reviewed-by: Tomas Mraz <tomas@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/29127)

(cherry picked from commit 105c5807ce34144b123dbaf939301fa13a6918bc)

6 weeks agoDependabot update
dependabot[bot] [Wed, 12 Nov 2025 17:06:32 +0000 (17:06 +0000)] 
Dependabot update

CLA: trivial

(deps): Bump cross-platform-actions/action

Bumps [cross-platform-actions/action](https://github.com/cross-platform-actions/action) from 0.27.0 to 0.30.0.
- [Release notes](https://github.com/cross-platform-actions/action/releases)
- [Changelog](https://github.com/cross-platform-actions/action/blob/master/changelog.md)
- [Commits](https://github.com/cross-platform-actions/action/compare/fe0167d8082ac584754ef3ffb567fded22642c7d...46e8d7fb25520a8d6c64fd2b7a1192611da98eda)

---
updated-dependencies:
- dependency-name: cross-platform-actions/action
  dependency-version: 0.30.0
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Reviewed-by: Richard Levitte <levitte@openssl.org>
Reviewed-by: Tomas Mraz <tomas@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/29129)

(cherry picked from commit af50059508773c946c79cdfe4927e4028f994cbc)

6 weeks agoDependabot update
dependabot[bot] [Tue, 11 Nov 2025 17:05:50 +0000 (17:05 +0000)] 
Dependabot update

CLA: trivial

(deps): Bump dtolnay/rust-toolchain

Bumps [dtolnay/rust-toolchain](https://github.com/dtolnay/rust-toolchain) from 6d653acede28d24f02e3cd41383119e8b1b35921 to 0f44b27771c32bda9f458f75a1e241b09791b331.
- [Release notes](https://github.com/dtolnay/rust-toolchain/releases)
- [Commits](https://github.com/dtolnay/rust-toolchain/compare/6d653acede28d24f02e3cd41383119e8b1b35921...0f44b27771c32bda9f458f75a1e241b09791b331)

---
updated-dependencies:
- dependency-name: dtolnay/rust-toolchain
  dependency-version: 0f44b27771c32bda9f458f75a1e241b09791b331
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <support@github.com>
Reviewed-by: Saša Nedvědický <sashan@openssl.org>
Reviewed-by: Tomas Mraz <tomas@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/29125)

(cherry picked from commit 3bd52f8243ffcccb4bbaaf62558caa469dc83951)

6 weeks agoDependabot update
dependabot[bot] [Fri, 7 Nov 2025 17:05:59 +0000 (17:05 +0000)] 
Dependabot update

CLA: trivial

(deps): Bump actions/setup-python

Bumps [actions/setup-python](https://github.com/actions/setup-python) from 5.3.0 to 6.0.0.
- [Release notes](https://github.com/actions/setup-python/releases)
- [Commits](https://github.com/actions/setup-python/compare/v5.3.0...v6.0.0)

---
updated-dependencies:
- dependency-name: actions/setup-python
  dependency-version: 6.0.0
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
Reviewed-by: Saša Nedvědický <sashan@openssl.org>
Reviewed-by: Richard Levitte <levitte@openssl.org>
Reviewed-by: Tomas Mraz <tomas@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/29105)

(cherry picked from commit 92261e77a62b048fc18d39873cc79f488a4bc578)

6 weeks agoDocument when OSSL_ENC/DECODER_CTX_set* functions shouldn't be used
Igor Ustinov [Tue, 11 Nov 2025 14:01:34 +0000 (15:01 +0100)] 
Document when OSSL_ENC/DECODER_CTX_set* functions shouldn't be used

Reviewed-by: Dmitry Belyavskiy <beldmit@gmail.com>
Reviewed-by: Tomas Mraz <tomas@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/29122)

(cherry picked from commit c22facc35038085407e457bada85efffab3c3f2a)

6 weeks agoNote about different exclusion of GREASE extensions
Igor Ustinov [Tue, 4 Nov 2025 15:43:49 +0000 (16:43 +0100)] 
Note about different exclusion of GREASE extensions

Different SSL_client_hello_* functions have different behavior
in regards to GREASE extensions.

Fixes #27580

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

(cherry picked from commit 657b01241feeb23a53378920bf33d59505532ba8)

6 weeks agodoc/man3/X509_STORE_get0_param.pod: mention how to free the returned objects
Eugene Syromiatnikov [Mon, 27 Oct 2025 09:17:57 +0000 (10:17 +0100)] 
doc/man3/X509_STORE_get0_param.pod: mention how to free the returned objects

It is not entirely obvious from the description how the objects returned
by X509_STORE_get1_objects() and X509_STORE_get1_all_certs() are
supposed to be freed, explicitly mention the relevant calls, and provide
a reference to DEFINE_STACK_OF(3).

Signed-off-by: Eugene Syromiatnikov <esyr@openssl.org>
Reviewed-by: Saša Nedvědický <sashan@openssl.org>
Reviewed-by: Todd Short <todd.short@me.com>
(Merged from https://github.com/openssl/openssl/pull/29002)

(cherry picked from commit de1abbed1cd75fcb8a6becadbc2854aa124f9bcf)

6 weeks agokdf: Fix PVK KDF provider build.info typo
thomas-baumela-stormshield [Wed, 22 Oct 2025 13:16:05 +0000 (15:16 +0200)] 
kdf: Fix PVK KDF provider build.info typo

Fix the pvkkdf.c build when using PVKKDF_GOAL

CLA: trivial

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

(cherry picked from commit 63f7d42d4eed924ed140497bb51f8bc26a068468)

6 weeks agoProperly error out when AEAD Algorithms are used with Encrypted Data
Ryan Hooper [Tue, 30 Sep 2025 16:56:33 +0000 (12:56 -0400)] 
Properly error out when AEAD Algorithms are used with Encrypted Data

Encrypted Data does not support AEAD algorithms. If you wish to
use AEAD algorithms you will have to use a CMS_AuthEnvelopedData
structure. Therefore, when AEAD algorithms are used with
CMS_EncryptedData_set1_key will now return an error.

Fixes: #28607
Reviewed-by: Paul Dale <paul.dale@oracle.com>
Reviewed-by: Tomas Mraz <tomas@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/28711)

(cherry picked from commit 86344acb02eb3718b0491b9915846667c55c95ff)

7 weeks agoDependabot update
dependabot[bot] [Fri, 7 Nov 2025 09:51:08 +0000 (09:51 +0000)] 
Dependabot update

CLA: trivial

(deps): Bump actions/download-artifact

Bumps [actions/download-artifact](https://github.com/actions/download-artifact) from 4.1.8 to 6.0.0.
- [Release notes](https://github.com/actions/download-artifact/releases)
- [Commits](https://github.com/actions/download-artifact/compare/v4.1.8...v6.0.0)

---
updated-dependencies:
- dependency-name: actions/download-artifact
  dependency-version: 6.0.0
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
Reviewed-by: Saša Nedvědický <sashan@openssl.org>
Reviewed-by: Tomas Mraz <tomas@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/29100)

(cherry picked from commit 1b2e3bd2339ecb7912097cf3c8ddec860010be43)

7 weeks agoDependabot update
dependabot[bot] [Fri, 7 Nov 2025 09:50:59 +0000 (09:50 +0000)] 
Dependabot update

CLA: trivial

(deps): Bump actions/checkout

Bumps [actions/checkout](https://github.com/actions/checkout) from 4 to 5.
- [Release notes](https://github.com/actions/checkout/releases)
- [Changelog](https://github.com/actions/checkout/blob/main/CHANGELOG.md)
- [Commits](https://github.com/actions/checkout/compare/v4...v5)

---
updated-dependencies:
- dependency-name: actions/checkout
  dependency-version: '5'
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
Reviewed-by: Saša Nedvědický <sashan@openssl.org>
Reviewed-by: Tomas Mraz <tomas@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/29098)

(cherry picked from commit 3066e59dfefd5967f46ebd699071084895c55ca3)

7 weeks agoDependabot update
dependabot[bot] [Fri, 7 Nov 2025 09:50:39 +0000 (09:50 +0000)] 
Dependabot update

CLA: trivial

(deps): Bump cygwin/cygwin-install-action

Bumps [cygwin/cygwin-install-action](https://github.com/cygwin/cygwin-install-action) from 5 to 6.
- [Release notes](https://github.com/cygwin/cygwin-install-action/releases)
- [Commits](https://github.com/cygwin/cygwin-install-action/compare/f61179d72284ceddc397ed07ddb444d82bf9e559...f2009323764960f80959895c7bc3bb30210afe4d)

---
updated-dependencies:
- dependency-name: cygwin/cygwin-install-action
  dependency-version: '6'
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
Reviewed-by: Saša Nedvědický <sashan@openssl.org>
Reviewed-by: Tomas Mraz <tomas@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/29097)

(cherry picked from commit 87afb84c39fe64a346632869966218ec394ec4a4)

7 weeks agoDependabot update
dependabot[bot] [Fri, 7 Nov 2025 09:50:32 +0000 (09:50 +0000)] 
Dependabot update

CLA: trivial

(deps): Bump actions/upload-artifact

Bumps [actions/upload-artifact](https://github.com/actions/upload-artifact) from 4 to 5.
- [Release notes](https://github.com/actions/upload-artifact/releases)
- [Commits](https://github.com/actions/upload-artifact/compare/v4...v5)

---
updated-dependencies:
- dependency-name: actions/upload-artifact
  dependency-version: '5'
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
Reviewed-by: Saša Nedvědický <sashan@openssl.org>
Reviewed-by: Tomas Mraz <tomas@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/29096)

(cherry picked from commit 2ffd40ec50667e7e457a88702ebc948094d2a554)
(cherry picked from commit 3383153bc3419d34625a670e44f45f1a8ba91948)

7 weeks agoc_rehash: Strip \r from hash filename on msys2
Orgad Shaneh [Sun, 26 Oct 2025 07:00:09 +0000 (09:00 +0200)] 
c_rehash: Strip \r from hash filename on msys2

Sample output for c_rehash -v on ucrt64 env:
Doing .
.0nk my.pem -> 472bcb3c
.0nk ca-bundle.crt -> cd8c0d63
WARNING: Skipping duplicate certificate ca-bundle.trust.crt

Reviewed-by: Dmitry Belyavskiy <beldmit@gmail.com>
Reviewed-by: Richard Levitte <levitte@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/28996)

(cherry picked from commit 331c2c71c97b8923f186f6661c6e03572fb34063)

7 weeks agoadd trivial pre-commit.ci config to avoid CI failure
Dmitry Misharov [Mon, 3 Nov 2025 10:31:40 +0000 (11:31 +0100)] 
add trivial pre-commit.ci config to avoid CI failure

Reference: https://github.com/pre-commit-ci/issues/issues/122

Reviewed-by: Bernd Edlinger <bernd.edlinger@hotmail.de>
Reviewed-by: Tom Cosgrove <tom.cosgrove@arm.com>
Reviewed-by: Neil Horman <nhorman@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/29050)

(cherry picked from commit bd5f81eeccbda88f6cdc11336b840a06bea7d934)

7 weeks agoModernize header macros for C23 compatibility
Igor Ustinov [Sun, 2 Nov 2025 16:37:00 +0000 (17:37 +0100)] 
Modernize header macros for C23 compatibility

Replace old-style (int (*)()) and (char *(*)()) casts with proper typed
prototypes (i2d_of_void *, d2i_of_void *, void *(*)(void)) to comply
with stricter C23 function pointer rules.

Fixes #27938

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

(cherry picked from commit 0b7afd6d303d150c13c04f66e77fcbcdaeec2a84)

8 weeks agoRename SSL_CERT_LOOKUP.nid to pkey_nid
Richard Levitte [Wed, 29 Oct 2025 09:12:33 +0000 (10:12 +0100)] 
Rename SSL_CERT_LOOKUP.nid to pkey_nid

Hopefully, this will help further clarify the intent of this
SSL_CERT_LOOKUP field to future developer.

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

(cherry picked from commit 96459b12aa094ea35c71263422d2f101ea724351)

8 weeks agoFix NID bug in SSL_CERT_LOOKUP array construction
Richard Levitte [Wed, 29 Oct 2025 09:03:51 +0000 (10:03 +0100)] 
Fix NID bug in SSL_CERT_LOOKUP array construction

The SSL_CERT_LOOKUP NID should be for the public key algorithm (what is
often called the "key type".  Yet, when populating the SSL_CERT_LOOKUP
table with 'ssl_load_sigalgs', only the sigalg name is used to find a
NID.

This is perfectly OK to do, *if* the sigalg and the associated key type
share the same name.  However, that's not always the case.

This change infers the key type name in 'ssl_load_sigalgs' the same way
as it was already done in 'add_provider_sigalgs'.

Related-to: https://github.com/openssl/openssl/pull/29019#discussion_r2472219647
Reviewed-by: Viktor Dukhovni <viktor@openssl.org>
Reviewed-by: Matt Caswell <matt@openssl.org>
Reviewed-by: Tomas Mraz <tomas@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/29027)

(cherry picked from commit aedcdc6d0f5bfb16af7d0065157af84e671159e0)

8 weeks agoMove CI jobs with macos large runners
Dmitry Misharov [Mon, 27 Oct 2025 15:21:58 +0000 (16:21 +0100)] 
Move CI jobs with macos large runners

Running CI jobs on MacOS large runner on each pull request
is problematic for forks. These runners are not free and require
billing to setup. Therefore it makes more sense move macos-14-large
and macos-15-large into os-zoo.yml which is scheduled to run nightly.

Reviewed-by: Bernd Edlinger <bernd.edlinger@hotmail.de>
Reviewed-by: Tomas Mraz <tomas@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/29007)

(cherry picked from commit f7a284b49d11dc5cb8012db157743ffd7df54c59)

2 months agobss_dgram: set *num_processed = 0 in error path
Joshua Rogers [Tue, 14 Oct 2025 00:04:25 +0000 (08:04 +0800)] 
bss_dgram: set *num_processed = 0 in error path

Signed-off-by: Joshua Rogers <MegaManSec@users.noreply.github.com>
Reviewed-by: Saša Nedvědický <sashan@openssl.org>
Reviewed-by: Frederik Wedel-Heinen <fwh.openssl@gmail.com>
Reviewed-by: Todd Short <todd.short@me.com>
(Merged from https://github.com/openssl/openssl/pull/28913)

(cherry picked from commit eedb6df889fb69b9c4571be5616fa22e6b62dc7c)
(cherry picked from commit 3d9e15c6ad3ecf9f182789c321ca316d074bd203)
(cherry picked from commit 98b4dd9bfeccf6a51771d63373c9a7a913992d59)

2 months agorc4: Remove the pointless if() operator, its condition is always true
Gleb Popov [Fri, 10 Oct 2025 13:31:47 +0000 (16:31 +0300)] 
rc4: Remove the pointless if() operator, its condition is always true

CLA: trivial

Reviewed-by: Matt Caswell <matt@openssl.org>
Reviewed-by: Frederik Wedel-Heinen <fwh.openssl@gmail.com>
Reviewed-by: Todd Short <todd.short@me.com>
(Merged from https://github.com/openssl/openssl/pull/28827)

(cherry picked from commit 10093b63dcdbfa52ad59d53b20bdea9bfa2c5825)
(cherry picked from commit 32b78a35590139d2123af5777da9761b2449f253)
(cherry picked from commit 5bd07407bd4ed82c63486bcbbe2df655cbe97e77)
(cherry picked from commit 9d3bb8e3657d15d60c83e84577c17996618bc973)

2 months agoapps/s_time: reset reused SSL with SSL_clear in doConnection
Joshua Rogers [Mon, 13 Oct 2025 23:59:04 +0000 (07:59 +0800)] 
apps/s_time: reset reused SSL with SSL_clear in doConnection

Signed-off-by: Joshua Rogers <MegaManSec@users.noreply.github.com>
Reviewed-by: Saša Nedvědický <sashan@openssl.org>
Reviewed-by: Paul Yang <paulyang.inf@gmail.com>
Reviewed-by: Todd Short <todd.short@me.com>
(Merged from https://github.com/openssl/openssl/pull/28911)

(cherry picked from commit 6f6948b21503d0ef8bea3ea6321c40dbbf4e5c9c)
(cherry picked from commit 79e0c5a13e4c6421eeddfcc4bd01a3b06f4c6394)
(cherry picked from commit 81dcb0ef916a2aeeb15dbc0002ce49d143c709ce)
(cherry picked from commit 73c7dea574b55ccf3a94409fd81a170e11920c16)

2 months agocomp/zstd: make bio_zstd_read return -1 on hard errors
Joshua Rogers [Sun, 12 Oct 2025 13:39:42 +0000 (21:39 +0800)] 
comp/zstd: make bio_zstd_read return -1 on hard errors

Split NULL out param from zero outl. Return -1 on malloc failure and
NULL parameter. Keep 0 only for outl <= 0 and clean EOF. This lets
callers distinguish errors from empty reads without inspecting the
error queue.

Signed-off-by: Joshua Rogers <MegaManSec@users.noreply.github.com>
Reviewed-by: Saša Nedvědický <sashan@openssl.org>
Reviewed-by: Paul Yang <paulyang.inf@gmail.com>
Reviewed-by: Todd Short <todd.short@me.com>
(Merged from https://github.com/openssl/openssl/pull/28908)

(cherry picked from commit 5871953822fb02bb651abf60dfc4a0785a5a3caa)
(cherry picked from commit ff05645178049316e5aa53d665bf5c0e05eef08c)
(cherry picked from commit 7607b9a1700ec0f2cab6b3f46ec8bfbf3d546e66)
(cherry picked from commit f0245a2694595f47371119f836735fda1000a07f)

2 months agostore: check for NULL uri argument
Pauli [Wed, 22 Oct 2025 22:09:56 +0000 (09:09 +1100)] 
store: check for NULL uri argument

Fixes #28978

Reviewed-by: Neil Horman <nhorman@openssl.org>
Reviewed-by: Saša Nedvědický <sashan@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/28980)

(cherry picked from commit e9e643bc580e4ba0c6f8f9b4dd2ce59397b1b786)

2 months agoFix memory leak in x509_pubkey_ex_d2i_ex()
Andrey Tsygunka [Thu, 10 Apr 2025 06:57:41 +0000 (09:57 +0300)] 
Fix memory leak in x509_pubkey_ex_d2i_ex()

If the call to ASN1_item_ex_d2i() from x509_pubkey_ex_d2i_ex() fails
*pval is freed by asn1_item_ex_d2i_intern()->ASN1_item_ex_free()->ossl_asn1_item_embed_free()
inside the ASN1_item_ex_d2i() function without freeing the
string buffer X509_PUBKEY::propq that was previously allocated
in x509_pubkey_ex_new_ex() and we lose the pointer to this buffer.

The function we are fixing here is one of the functions used
to define X509_PUBKEY - so any operations that work directly
on X509_PUBKEY_INTERNAL should be prevented from freeing
the structure because they don't know how to handle it.

Signed-off-by: Andrey Tsygunka <aitsygunka@yandex.ru>
Reviewed-by: Matt Caswell <matt@openssl.org>
Reviewed-by: Dmitry Belyavskiy <beldmit@gmail.com>
Reviewed-by: Neil Horman <nhorman@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/27333)

(cherry picked from commit 11e1ea9d4d0c9a5e84b944535332aebf673e82f0)

2 months agoCopy impls stack when calling ossl_method_store_do_all
Neil Horman [Wed, 8 Oct 2025 12:20:36 +0000 (08:20 -0400)] 
Copy impls stack when calling ossl_method_store_do_all

PR https://github.com/openssl/openssl/pull/24782 introduced a copying of
the algs stack in ossl_method_store_do all, so that the subsequent
iteration of elements through alg_do_one could be done without a lock,
and without triggering a tsan error as reported in:
https://github.com/openssl/openssl/issues/24672

However, the problem wasn't completely fixed.  Issue:
https://github.com/openssl/openssl/issues/27726

Noted that, sometimes we still get a crash when iterating over each algs
impls stack.  This occurs because, even though we've cloned the algs to
a private data area, the impls stack for each alg still points to shared
data, which we are accessing without the benefit of a lock.  Because of
that, if some other thread calls a function that mutates the impl stack
(say ossl_method_store_remove()), we may encounter a NULL or garbage
value in one of the impl stack values, leading to an unexpected NULL
pointer or simmilar, which in turn leads to a crash.

Unfortunately we can't use a lock to create exclusive access here, as
there are several paths that lead to a recursive mutation of the stack,
which would deadlock.

So the only way that I see to prevent this (which is admittedly ugly),
is to not only clone the alg stack, but to duplicate each algs impl
stack with the read lock held, prior to doing the iteration.

Further, we've been unable to test this, as the problem is rare, and we
don't have a solid reproducer for the issue, but visual inspection
suggests this should fix that.  Hopefully:

Fixes #27726

Reviewed-by: Saša Nedvědický <sashan@openssl.org>
Reviewed-by: Tomas Mraz <tomas@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/28783)

(cherry picked from commit 9ef4f426157e8a100b816c962fea1a168010bde2)

2 months agoCMP client: fix three memory leaks in error handling of the polling mechanism added...
Joshua Rogers [Fri, 10 Oct 2025 22:57:01 +0000 (06:57 +0800)] 
CMP client: fix three memory leaks in error handling of the polling mechanism added in 3.3

These are in poll_for_response(), OSSL_CMP_try_certreq(), and OSSL_CMP_exec_certreq().

Reviewed-by: Matt Caswell <matt@openssl.org>
Reviewed-by: David von Oheimb <david.von.oheimb@siemens.com>
(Merged from https://github.com/openssl/openssl/pull/28840)

(cherry picked from commit c2e845914a4f999183ceb950e915c5525ccdf643)

2 months agoci.yml: Update macos runners as macos-13 is discontinued
Tomas Mraz [Tue, 14 Oct 2025 15:41:42 +0000 (17:41 +0200)] 
ci.yml: Update macos runners as macos-13 is discontinued

Reviewed-by: Saša Nedvědický <sashan@openssl.org>
Reviewed-by: Matt Caswell <matt@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/28900)

(cherry picked from commit 40b22874b12b8c1aade772912258c120a49b9212)

2 months agobss_dgram.c: Fix potential buffer overread and remove asserts
Tomas Mraz [Tue, 14 Oct 2025 11:28:30 +0000 (13:28 +0200)] 
bss_dgram.c: Fix potential buffer overread and remove asserts

Reviewed-by: Matt Caswell <matt@openssl.org>
Reviewed-by: Saša Nedvědický <sashan@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/28896)

(cherry picked from commit b9d19562c0e88e31f43c10126dc91cad9e720953)

2 months agobio_sock: fix inverted BIO_lookup return value check
Joshua Rogers [Sat, 11 Oct 2025 06:43:39 +0000 (14:43 +0800)] 
bio_sock: fix inverted BIO_lookup return value check

Signed-off-by: Joshua Rogers <MegaManSec@users.noreply.github.com>
Reviewed-by: Saša Nedvědický <sashan@openssl.org>
Reviewed-by: Matt Caswell <matt@openssl.org>
Reviewed-by: Tomas Mraz <tomas@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/28862)

(cherry picked from commit 1c1dcfc269c35e3f8fdbc72b78378aac90a61a81)

2 months agofreebsd ktls: avoid unaligned 16 bit length store in ktls_read_record
Joshua Rogers [Sat, 11 Oct 2025 06:11:07 +0000 (14:11 +0800)] 
freebsd ktls: avoid unaligned 16 bit length store in ktls_read_record

This prevents SIGBUS on strict alignment architectures when p+3 is not aligned
for 16 bit access. Behavior is unchanged on x86 and matches the Linux path.

Signed-off-by: Joshua Rogers <MegaManSec@users.noreply.github.com>
Reviewed-by: Matt Caswell <matt@openssl.org>
Reviewed-by: Tomas Mraz <tomas@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/28860)

(cherry picked from commit c33120d0e403b4079e5104fd20040a51930e8d8e)

2 months agoFix wrong buffer and version in outgoing msg callback
Joshua Rogers [Fri, 10 Oct 2025 12:33:29 +0000 (20:33 +0800)] 
Fix wrong buffer and version in outgoing msg callback

Signed-off-by: Joshua Rogers <MegaManSec@users.noreply.github.com>
Reviewed-by: Matt Caswell <matt@openssl.org>
Reviewed-by: Saša Nedvědický <sashan@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/28816)

(cherry picked from commit f7c0fcf0282435687010a34184d4248566008c35)

2 months agoapps/s_socket: fix double close of listening socket when naccept==0
Joshua Rogers [Mon, 13 Oct 2025 14:35:43 +0000 (22:35 +0800)] 
apps/s_socket: fix double close of listening socket when naccept==0

Signed-off-by: Joshua Rogers <MegaManSec@users.noreply.github.com>
Reviewed-by: Matt Caswell <matt@openssl.org>
Reviewed-by: Saša Nedvědický <sashan@openssl.org>
Reviewed-by: Tomas Mraz <tomas@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/28813)

(cherry picked from commit 76b4fa346c364cccc9123efdeac95e5dc85f0a75)

2 months agoFix off-by-one overflow in the AST resubmit
Joshua Rogers [Fri, 10 Oct 2025 11:55:31 +0000 (19:55 +0800)] 
Fix off-by-one overflow in the AST resubmit

Signed-off-by: Joshua Rogers <MegaManSec@users.noreply.github.com>
Reviewed-by: Richard Levitte <levitte@openssl.org>
Reviewed-by: Matt Caswell <matt@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/28811)

(cherry picked from commit 3aa2f3a4566f34e99050efdb074fc1375b1572ad)

2 months agos_server: print program not, not port
Joshua Rogers [Fri, 10 Oct 2025 09:38:50 +0000 (17:38 +0800)] 
s_server: print program not, not port

Signed-off-by: Joshua Rogers <MegaManSec@users.noreply.github.com>
Reviewed-by: Matt Caswell <matt@openssl.org>
Reviewed-by: Saša Nedvědický <sashan@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/28807)

(cherry picked from commit 0d3efc875483d212b4cc2082247bf6abb2b56aca)

2 months agoDisallow Message sequence number 2 in DTLSv1_listen
Joshua Rogers [Wed, 8 Oct 2025 07:31:18 +0000 (15:31 +0800)] 
Disallow Message sequence number 2 in DTLSv1_listen

Signed-off-by: Joshua Rogers <MegaManSec@users.noreply.github.com>
Reviewed-by: Frederik Wedel-Heinen <fwh.openssl@gmail.com>
Reviewed-by: Matt Caswell <matt@openssl.org>
Reviewed-by: Tomas Mraz <tomas@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/28788)

(cherry picked from commit dc242b16954552c7589a6c2ea829c2a888878f27)

2 months agossl: fix OOB write in SSL_get_shared_ciphers when no shared ciphers
Joshua Rogers [Wed, 8 Oct 2025 22:14:15 +0000 (06:14 +0800)] 
ssl: fix OOB write in SSL_get_shared_ciphers when no shared ciphers

When no cipher names are appended, p remains at buf and the unconditional
p[-1] = '\0' underflows. Only NUL-terminate if at least one cipher was written;
otherwise return an empty string safely.

Signed-off-by: Joshua Rogers <MegaManSec@users.noreply.github.com>
Reviewed-by: Matt Caswell <matt@openssl.org>
Reviewed-by: Tomas Mraz <tomas@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/28785)

(cherry picked from commit 680491a2a7403fc6e5e1759e0eabeceeacaf37f9)

2 months agoCorrect assembler version checking in perlasm scripts
Igor Ustinov [Tue, 14 Oct 2025 18:30:49 +0000 (20:30 +0200)] 
Correct assembler version checking in perlasm scripts

Fixes #20520

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

(cherry picked from commit 9820582da330151a1238a33e5c6e23ed31324164)