]> git.ipfire.org Git - thirdparty/openssl.git/log
thirdparty/openssl.git
2 hours agoproviders/implementations/keymgmt/ecx_kmgmt.c.in: remove PCT on ECX import master
Eugene Syromiatnikov [Tue, 16 Sep 2025 14:25:33 +0000 (16:25 +0200)] 
providers/implementations/keymgmt/ecx_kmgmt.c.in: remove PCT on ECX import

While PCT on import has been removed for DH, EC, RSA, and SLH-DSA,
ECX seems to be overlooked.  Correct that omission.

Complements: 7f7f75816f26 "import pct: remove import PCTs for most algorithms"
Signed-off-by: Eugene Syromiatnikov <esyr@openssl.org>
Reviewed-by: Paul Dale <ppzgs1@gmail.com>
Reviewed-by: Tomas Mraz <tomas@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/28573)

14 hours agocrypto/ml_dsa: fix public_from_private() error path to return failure
rodeka [Tue, 16 Sep 2025 17:38:17 +0000 (20:38 +0300)] 
crypto/ml_dsa: fix public_from_private() error path to return failure

The error label returned success (1) even on failure. Make it return failure (0) instead.
Fixes #28562

CLA: trivial

Reviewed-by: Todd Short <todd.short@me.com>
Reviewed-by: Paul Dale <ppzgs1@gmail.com>
(Merged from https://github.com/openssl/openssl/pull/28576)

15 hours agoDon't return a value we never check from indent_printf()
Bob Beck [Mon, 15 Sep 2025 17:52:44 +0000 (11:52 -0600)] 
Don't return a value we never check from indent_printf()

Coverity notices it could overflow, since we don't use this
don't bother returning it

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

16 hours agoDon't clear is_sorted unconditionally on OPENSSL_sk_insert()
Bob Beck [Fri, 12 Sep 2025 18:08:02 +0000 (12:08 -0600)] 
Don't clear is_sorted unconditionally on OPENSSL_sk_insert()

If we have a comparison function, and the array was sorted,
check to see if we are inserting in the correct location.
if so do not clear is_sorted.

This allows for element locations found with OPENSSL_sk_find_ex
to be used to insert elements in the correct location and preserve
the sorting order without the need to sort the stack again.

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

17 hours agoFix logic errors in torture_rw_high/low test
Bernd Edlinger [Tue, 16 Sep 2025 15:18:33 +0000 (17:18 +0200)] 
Fix logic errors in torture_rw_high/low test

"old" was never assigned anything and the first
assignment to "*iterations" in the loop was superfluous.

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

29 hours agoEnsure that empty or 1 element stacks are always sorted.
Bob Beck [Wed, 10 Sep 2025 17:43:01 +0000 (11:43 -0600)] 
Ensure that empty or 1 element stacks are always sorted.

Matt noticed "It's kind of weird that we are forced to call sort on
a newly created and empty stack. It feels like an empty stack should
have the "sorted" flag by default on creation"

I am incluined to agree. This change ensures tht empty or 1 element
stacks are marked as sorted, as per the existing comment in the
file.

Since this involved changing the various duplication routines to
also ensure that sorted was preserved for such stacks, I also
noticed the duplication code was largely duplicated. I
took the opportunity to deduplicate the duplication code while
making these changes.

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

31 hours ago25-test_verify.t: fix misleading test case names and file variable name
Dr. David von Oheimb [Mon, 8 Sep 2025 05:59:23 +0000 (07:59 +0200)] 
25-test_verify.t: fix misleading test case names and file variable name

Reviewed-by: Matt Caswell <matt@openssl.org>
Reviewed-by: Tom Cosgrove <tom.cosgrove@arm.com>
Reviewed-by: Saša Nedvědický <sashan@openssl.org>
Reviewed-by: Paul Dale <ppzgs1@gmail.com>
(Merged from https://github.com/openssl/openssl/pull/28469)

31 hours ago25-test_verify.t: fix partly case-sensitive matching for Windows OS: s/MsWin32/MSWin32/
Dr. David von Oheimb [Sat, 26 Jul 2025 08:46:21 +0000 (10:46 +0200)] 
25-test_verify.t: fix partly case-sensitive matching for Windows OS: s/MsWin32/MSWin32/

Fixes #27984

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

36 hours agoImplement Montgomery multiplication assembly optimization for RV64GC
fengpengbo [Thu, 14 Aug 2025 06:34:20 +0000 (14:34 +0800)] 
Implement Montgomery multiplication assembly optimization for RV64GC

Reviewed-by: Neil Horman <nhorman@openssl.org>
Reviewed-by: Paul Dale <ppzgs1@gmail.com>
(Merged from https://github.com/openssl/openssl/pull/28012)

37 hours agoFix ossl_prov_set_macctx
Neil Horman [Fri, 12 Sep 2025 17:11:46 +0000 (13:11 -0400)] 
Fix ossl_prov_set_macctx

This function fails to construct a param list that includes the passed
in property query string in the param lists when allocating subordonate
algorithms.

Make sure we allow callers to pass a param list (so that providers for
subordonate algorithms can be selected), and merge those into the param
list that this function builds on its own.

Reviewed-by: Matt Caswell <matt@openssl.org>
Reviewed-by: Shane Lontis <shane.lontis@oracle.com>
Reviewed-by: Paul Dale <ppzgs1@gmail.com>
(Merged from https://github.com/openssl/openssl/pull/28461)

37 hours agosupport passing prop querys to composite algs
Neil Horman [Tue, 9 Sep 2025 13:47:34 +0000 (09:47 -0400)] 
support passing prop querys to composite algs

We have several composite alg usages (i.e. MAC/KDF) which pick the right
digest implementation when using an engine, but fail to get the right
one when using a provider because we don't pass the propquery in a
parameter to their instantiation.

Fix them up by constructing the appropriate parameters

Reviewed-by: Matt Caswell <matt@openssl.org>
Reviewed-by: Shane Lontis <shane.lontis@oracle.com>
Reviewed-by: Paul Dale <ppzgs1@gmail.com>
(Merged from https://github.com/openssl/openssl/pull/28461)

37 hours agoremove loader_attic test from test_cmp_cli
Neil Horman [Thu, 4 Sep 2025 20:14:21 +0000 (16:14 -0400)] 
remove loader_attic test from test_cmp_cli

This engine is going away (in fact they all are), so just remove the
test cases referencing this engine

Reviewed-by: Matt Caswell <matt@openssl.org>
Reviewed-by: Shane Lontis <shane.lontis@oracle.com>
Reviewed-by: Paul Dale <ppzgs1@gmail.com>
(Merged from https://github.com/openssl/openssl/pull/28461)

37 hours agoremove loader_attic tests from test_store
Neil Horman [Thu, 4 Sep 2025 20:12:20 +0000 (16:12 -0400)] 
remove loader_attic tests from test_store

With the removal of engines we need to handle the loader_attic test that
will fail with said removal

based on the advice of @levitte, given that we have a file: loader in
the default provider already, theres no need to test an engine thats
going away, so just remove it.

Reviewed-by: Matt Caswell <matt@openssl.org>
Reviewed-by: Shane Lontis <shane.lontis@oracle.com>
Reviewed-by: Paul Dale <ppzgs1@gmail.com>
(Merged from https://github.com/openssl/openssl/pull/28461)

37 hours agoConvert TLSProxy to use new provider
Neil Horman [Thu, 4 Sep 2025 18:04:55 +0000 (14:04 -0400)] 
Convert TLSProxy to use new provider

replace use of ossltest engine with provider in TLSProxy and update all
dependent tests

Reviewed-by: Matt Caswell <matt@openssl.org>
Reviewed-by: Shane Lontis <shane.lontis@oracle.com>
Reviewed-by: Paul Dale <ppzgs1@gmail.com>
(Merged from https://github.com/openssl/openssl/pull/28461)

37 hours agoreplace ossltest engine in test_dgst
Neil Horman [Thu, 4 Sep 2025 17:45:22 +0000 (13:45 -0400)] 
replace ossltest engine in test_dgst

Use the new ossltest provider rather than the ossltest engine

Reviewed-by: Matt Caswell <matt@openssl.org>
Reviewed-by: Shane Lontis <shane.lontis@oracle.com>
Reviewed-by: Paul Dale <ppzgs1@gmail.com>
(Merged from https://github.com/openssl/openssl/pull/28461)

37 hours agoConvert test_rand to use our new p_ossltest provider
Neil Horman [Thu, 4 Sep 2025 17:44:30 +0000 (13:44 -0400)] 
Convert test_rand to use our new p_ossltest provider

Replace ossltest engine with ossltest provider in test_rand

Reviewed-by: Matt Caswell <matt@openssl.org>
Reviewed-by: Shane Lontis <shane.lontis@oracle.com>
Reviewed-by: Paul Dale <ppzgs1@gmail.com>
(Merged from https://github.com/openssl/openssl/pull/28461)

37 hours agoImplement an ossltest provider to replace ossltest engine
Neil Horman [Tue, 26 Aug 2025 12:08:01 +0000 (08:08 -0400)] 
Implement an ossltest provider to replace ossltest engine

Part of the effort to remove engines creates a problem for our test
suite, in that we have a large number of tests that rely on the use of a
test engine (ossltest), which implements the aes-128-cbc, aes-128-gcm,
aes-128-cbc-hmac-sha1 ciphers, several digests and a random number
generator to produce predictable outputs for the purposes of doing
testing against known values.

Since we're getting rid of engines, these tests need to be updated to
use a provider that presents the same functionality.

This commit implements that provider.

Reviewed-by: Matt Caswell <matt@openssl.org>
Reviewed-by: Shane Lontis <shane.lontis@oracle.com>
Reviewed-by: Paul Dale <ppzgs1@gmail.com>
(Merged from https://github.com/openssl/openssl/pull/28461)

39 hours agoAdd OSSL_ prefix back onto param names
Pauli [Fri, 12 Sep 2025 09:03:12 +0000 (19:03 +1000)] 
Add OSSL_ prefix back onto param names

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

45 hours agoCHANGES.md, NEWS.md: update for 3.6.0-beta1
Eugene Syromiatnikov [Thu, 11 Sep 2025 14:59:55 +0000 (16:59 +0200)] 
CHANGES.md, NEWS.md: update for 3.6.0-beta1

CHANGES.md:
 * https://github.com/openssl/openssl/pull/28398
 * https://github.com/openssl/openssl/pull/28411
 * https://github.com/openssl/openssl/pull/28447
 * https://github.com/openssl/openssl/pull/28449

NEWS.md:
 * https://github.com/openssl/openssl/pull/28447

Release: yes
Signed-off-by: Eugene Syromiatnikov <esyr@openssl.org>
Reviewed-by: Neil Horman <nhorman@openssl.org>
Reviewed-by: Tomas Mraz <tomas@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/28547)

45 hours agoCHANGES.md, NEWS.md: ffix
Eugene Syromiatnikov [Thu, 11 Sep 2025 14:59:29 +0000 (16:59 +0200)] 
CHANGES.md, NEWS.md: ffix

Minor formating cleanups.

Signed-off-by: Eugene Syromiatnikov <esyr@openssl.org>
Reviewed-by: Neil Horman <nhorman@openssl.org>
Reviewed-by: Tomas Mraz <tomas@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/28547)

2 days agocrypto/ec/ecp_nistz256.c: use OPENSSL_aligned_alloc_array
Eugene Syromiatnikov [Mon, 18 Aug 2025 12:32:32 +0000 (14:32 +0200)] 
crypto/ec/ecp_nistz256.c: use OPENSSL_aligned_alloc_array

Allocate table in ecp_nistz256_windowed_mul() and preComputedTable
in ecp_nistz256_mult_precompute() using OPENSSL_aligned_alloc_array() call
instead of OPENSSL_malloc with a 64-byte slack and manual pointer alignment
adjustement.

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

2 days agoExplicitly limit the OPENSSL_aligned_alloc()'s alignment to 65536
Eugene Syromiatnikov [Thu, 28 Aug 2025 14:43:13 +0000 (16:43 +0200)] 
Explicitly limit the OPENSSL_aligned_alloc()'s alignment to 65536

There is little need to support alignments larger than a page size,
and the open-coded OPENSSL_aligned_alloc() implementation implements
that support in quite wasteful manner, so it is better just to limit
the maximum supported alignment explicitly.  The value of 65536
has been chosen so it is architecture-agnostic and is no less than page sizes
used in commonly occurring architectures (and also it is a pretty number).

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

2 days agocrypto/mem.c: use open-coded aligned alloc when posix_memalign fails
Eugene Syromiatnikov [Thu, 28 Aug 2025 13:55:29 +0000 (15:55 +0200)] 
crypto/mem.c: use open-coded aligned alloc when posix_memalign fails

While posix_memalign() is generally not expected to fail, we can always use
the internal aligned alloc implementation to ensure that any
OPENSSL_aligned_malloc failure is indeed fatal and does not require
a fallback.

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

2 days agoMove the open-coded aligned alloc in a separate file and use it in FIPS module
Eugene Syromiatnikov [Mon, 18 Aug 2025 12:24:23 +0000 (14:24 +0200)] 
Move the open-coded aligned alloc in a separate file and use it in FIPS module

Factor the open-coded aligned allocation implementation in a separate
file and use it instead of just returning NULL in CRYPTO_aligned_alloc
implementation in the FIPS provider.

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

2 days agoMove OPENSSL_SMALL_FOOTPRINT-related logic from aligned_alloc to the only caller
Eugene Syromiatnikov [Mon, 18 Aug 2025 11:38:56 +0000 (13:38 +0200)] 
Move OPENSSL_SMALL_FOOTPRINT-related logic from aligned_alloc to the only caller

Originally, CRYPTO_aligned_alloc() returned NULL if OpenSSL was built
with OPENSSL_SMALL_FOOTPRINT defined, which is a weird place for such
a consideration;  moreover it means that every caller requires to
implement some form of a fallback (and manually over-allocate
and then align the returned memory if the alignment is a requirement),
which is counter-productive (and outright ridiculous in environments
with posix_memalign() available).  Move the OPENSSL_SMALL_FOOTPRINT
consideration to the only current caller and update the documentation
and tests accordingly.

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

2 days agodoc/man3/OPENSSL_malloc.pod: size is no longer needed to be alignment multiple
Eugene Syromiatnikov [Thu, 28 Aug 2025 14:37:19 +0000 (16:37 +0200)] 
doc/man3/OPENSSL_malloc.pod: size is no longer needed to be alignment multiple

While the commit 648803a17e4c1 "crypto/mem.c: don't use aligned_alloc
in CRYPTO_aligned_alloc" removed the aligned_alloc() usage
along with its overly onerous requirements, its author failed to update
the documentation accordingly.  Correct that omission by removing
the requirement from the DESCRIPTION and adding a relevant mention
in HISTORY.

Complements: 648803a17e4c1 "crypto/mem.c: don't use aligned_alloc in CRYPTO_aligned_alloc"
Signed-off-by: Eugene Syromiatnikov <esyr@openssl.org>
Reviewed-by: Neil Horman <nhorman@openssl.org>
Reviewed-by: Saša Nedvědický <sashan@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/28295)

2 days agotest/radix/terp.c: avoid accessing uninitialised terp on error
Eugene Syromiatnikov [Mon, 15 Sep 2025 03:27:58 +0000 (05:27 +0200)] 
test/radix/terp.c: avoid accessing uninitialised terp on error

Stats printing in TERP_run() assumes that terp has been initialised,
which is not the case when a jump to the err label has been performed
before successful TERP_init() call;  avoid it by emplacing it
within a have_terp guard check.

Fixes: 4a2d5fe812f8 "QUIC RADIX: Add RADIX test framework implementation"
Resolves: https://scan5.scan.coverity.com/#/project-view/65248/10222?selectedIssue=1665430
References: https://github.com/openssl/project/issues/1432
Signed-off-by: Eugene Syromiatnikov <esyr@openssl.org>
Reviewed-by: Paul Dale <ppzgs1@gmail.com>
Reviewed-by: Matt Caswell <matt@openssl.org>
Reviewed-by: Neil Horman <nhorman@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/28546)

2 days agoapps/storeutl.c: avoid signed integer overflow in indent_printf()
Eugene Syromiatnikov [Mon, 15 Sep 2025 03:14:09 +0000 (05:14 +0200)] 
apps/storeutl.c: avoid signed integer overflow in indent_printf()

As two arbitrarily large printf return value can trigger function
overflow, rewrite the return value handling to avoid it.

Fixes: fb43ddceda79 "Add a recursive option to 'openssl storeutl'"
Resolves: https://scan5.scan.coverity.com/#/project-view/65248/10222?selectedIssue=1665428
References: https://github.com/openssl/project/issues/1432
Signed-off-by: Eugene Syromiatnikov <esyr@openssl.org>
Reviewed-by: Paul Dale <ppzgs1@gmail.com>
Reviewed-by: Matt Caswell <matt@openssl.org>
Reviewed-by: Neil Horman <nhorman@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/28546)

2 days agocrypto/evp/ctrl_params_translate.c: fix a typo in the error message
Eugene Syromiatnikov [Mon, 15 Sep 2025 03:05:01 +0000 (05:05 +0200)] 
crypto/evp/ctrl_params_translate.c: fix a typo in the error message

The ERR_raise_data() call on failure to find ctx->p2 in str_value_map
erroneously refers to ctx->p1 instead;  fix that but supplying the
correct field and casting it to the supposed const char * type.

Fixes: 9a1c4e41e8d3 "EVP: Implement data-driven translation between known ctrl and OSSL_PARAMs"
Resolves: https://scan5.scan.coverity.com/#/project-view/65248/10222?selectedIssue=1665427
References: https://github.com/openssl/project/issues/1432
Signed-off-by: Eugene Syromiatnikov <esyr@openssl.org>
Reviewed-by: Paul Dale <ppzgs1@gmail.com>
Reviewed-by: Matt Caswell <matt@openssl.org>
Reviewed-by: Neil Horman <nhorman@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/28546)

2 days agocrypto/bio/bss_file.c: add missing cast in format arg in ERR_raise_data()
Eugene Syromiatnikov [Mon, 15 Sep 2025 02:44:36 +0000 (04:44 +0200)] 
crypto/bio/bss_file.c: add missing cast in format arg in ERR_raise_data()

"%s" conversion specifier requires a "char *" argument, so ptr needs
to be cast to it there, as Coverity has noted.

Fixes: ff988500c2f39 "Replace FUNCerr with ERR_raise_data"
Resolves: https://scan5.scan.coverity.com/#/project-view/65248/10222?selectedIssue=1665423
References: https://github.com/openssl/project/issues/1432
Signed-off-by: Eugene Syromiatnikov <esyr@openssl.org>
Reviewed-by: Paul Dale <ppzgs1@gmail.com>
Reviewed-by: Matt Caswell <matt@openssl.org>
Reviewed-by: Neil Horman <nhorman@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/28546)

2 days agotest/wpackettest.c: remove ubogus cleanup() in test_WPACKET_quic_vlint_random()
Eugene Syromiatnikov [Mon, 15 Sep 2025 02:05:04 +0000 (04:05 +0200)] 
test/wpackettest.c: remove ubogus cleanup() in test_WPACKET_quic_vlint_random()

In the beginning of the iteration, pkt is not initialised yet, so there is
no need to clean it up on RAND_bytes() failure.  Replace "return cleanup(&pkt)"
with plain "return 0"'

Fixes: 416d0a638c16 "QUIC wire format support"
Resolves: https://scan5.scan.coverity.com/#/project-view/65248/10222?selectedIssue=1665422
References: https://github.com/openssl/project/issues/1432
Signed-off-by: Eugene Syromiatnikov <esyr@openssl.org>
Reviewed-by: Paul Dale <ppzgs1@gmail.com>
Reviewed-by: Matt Caswell <matt@openssl.org>
Reviewed-by: Neil Horman <nhorman@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/28546)

2 days agocrypto/x509/t_x509.c: check i2d_X509_NAME() return value in X509_ocspid_print()
Eugene Syromiatnikov [Mon, 15 Sep 2025 01:31:31 +0000 (03:31 +0200)] 
crypto/x509/t_x509.c: check i2d_X509_NAME() return value in X509_ocspid_print()

There is little reason for this call to fail, but there is also little
reason for not to check for it, and, since Coverity noticed
that the check is missing, just add it.

Resolves: https://scan5.scan.coverity.com/#/project-view/65248/10222?selectedIssue=1665420
References: https://github.com/openssl/project/issues/1432
Signed-off-by: Eugene Syromiatnikov <esyr@openssl.org>
Reviewed-by: Paul Dale <ppzgs1@gmail.com>
Reviewed-by: Matt Caswell <matt@openssl.org>
Reviewed-by: Neil Horman <nhorman@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/28546)

3 days agoEnable LMS on provider compat fips build for 3.6
Neil Horman [Sun, 14 Sep 2025 17:13:00 +0000 (13:13 -0400)] 
Enable LMS on provider compat fips build for 3.6

The LMS test for fips assumes that LMS is available in the provider in
any version equal to or later than 3.6.

We should probably augment the test such that instead of just checking
the openssl version, we instead query the provider to see if the needed
algs are available to use LMS.

But given the current state of affairs, it seems more sensible to just
enable lms in the 3.6 fips provider build to ensure lms gets tested.

Fixes openssl/project#1435

Reviewed-by: Tomas Mraz <tomas@openssl.org>
Reviewed-by: Paul Dale <ppzgs1@gmail.com>
Reviewed-by: Shane Lontis <shane.lontis@oracle.com>
(Merged from https://github.com/openssl/openssl/pull/28541)

4 days agoTest failure of rsa_encrypt when buffer too short
Viktor Dukhovni [Sat, 13 Sep 2025 02:52:42 +0000 (12:52 +1000)] 
Test failure of rsa_encrypt when buffer too short

Reviewed-by: Richard Levitte <levitte@openssl.org>
Reviewed-by: Neil Horman <nhorman@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/28517)

4 days agoHarden RSA public encrypt
Viktor Dukhovni [Thu, 11 Sep 2025 08:50:44 +0000 (18:50 +1000)] 
Harden RSA public encrypt

Check the that the indicated output buffer length is large enough.

Fix EVP_SealInit() to initialise the output buffer length to the RSA
modulus length, not the input KEK length.

Reviewed-by: Richard Levitte <levitte@openssl.org>
Reviewed-by: Neil Horman <nhorman@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/28517)

4 days agoUpdate our CI jobs to cover the 3.6 stable branch
Neil Horman [Thu, 11 Sep 2025 12:40:14 +0000 (08:40 -0400)] 
Update our CI jobs to cover the 3.6 stable branch

The coveralls, prov-compat and provider-compatibiity CI jobs test each
of the stable branches.  We need to add 3.6 to the list in each of those
tests

Fixes openssl/project#1424

Reviewed-by: Saša Nedvědický <sashan@openssl.org>
Reviewed-by: Tomas Mraz <tomas@openssl.org>
Reviewed-by: Matt Caswell <matt@openssl.org>
Reviewed-by: Paul Dale <ppzgs1@gmail.com>
(Merged from https://github.com/openssl/openssl/pull/28519)

5 days agokmac_prov.c.in: avoid resource leak on kmac_new_decoder fail in kmac_fetch_new
Eugene Syromiatnikov [Wed, 10 Sep 2025 23:34:12 +0000 (01:34 +0200)] 
kmac_prov.c.in: avoid resource leak on kmac_new_decoder fail in kmac_fetch_new

kctx was not freed in a case of kmac_new_decoder failure;  consolidate
all the error paths under the "err:" label and jump to it on kmac_new_decoder()
returning 0.

Fixes: d5efc853796b "kmac: avoid using ossl_prov_digest_load_from_params()"
Resolves: https://github.com/openssl/project/issues/1419
Resolves: https://scan5.scan.coverity.com/#/project-view/65248/10222?selectedIssue=1453634
Signed-off-by: Eugene Syromiatnikov <esyr@openssl.org>
Reviewed-by: Saša Nedvědický <sashan@openssl.org>
Reviewed-by: Tomas Mraz <tomas@openssl.org>
Reviewed-by: Paul Dale <ppzgs1@gmail.com>
Reviewed-by: Tom Cosgrove <tom.cosgrove@arm.com>
Reviewed-by: Neil Horman <nhorman@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/28516)

5 days agotest/bioprinttest.c: silence more width/precision checks
Eugene Syromiatnikov [Fri, 12 Sep 2025 15:57:50 +0000 (17:57 +0200)] 
test/bioprinttest.c: silence more width/precision checks

Apparently, old glibc also can't handle width/precision specifiers;
silence the checks that test for it by setting .skip_libc_check to 1.

Fixes: a29d157fdb6d "Replace homebrewed implementation of *printf*() functions with libc"
Signed-off-by: Eugene Syromiatnikov <esyr@openssl.org>
Reviewed-by: Neil Horman <nhorman@openssl.org>
Reviewed-by: Saša Nedvědický <sashan@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/28530)

6 days agoremove test_big() the return value we compare varies between
sashan [Thu, 11 Sep 2025 19:25:30 +0000 (21:25 +0200)] 
remove test_big() the return value we compare varies between
libc implementations. removing this test makes test suite
more rubust.

Fixes a29d157fdb6d

Reviewed-by: Neil Horman <nhorman@openssl.org>
Reviewed-by: Paul Dale <ppzgs1@gmail.com>
(Merged from https://github.com/openssl/openssl/pull/28524)

6 days agoReplace homebrewed implementation of *printf*() functions with libc
sashan [Fri, 11 Apr 2025 20:42:08 +0000 (22:42 +0200)] 
Replace homebrewed implementation of *printf*() functions with libc

Switching from ANSI-C we can use implementation of printf like
function provided by libc on target platform. This applies
starting from 3.6 and onwards.

The slight exception here is old windows printf functions
before 2015, those are supported.

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

6 days agocrmf_lib.c create_popo_signature(): add error queue entry on signature failure
Dr. David von Oheimb [Mon, 2 Jun 2025 18:58:01 +0000 (20:58 +0200)] 
crmf_lib.c create_popo_signature(): add error queue entry on signature failure

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

6 days agoCHANGES.md: add entry on constifying (X509) function parameter
Dr. David von Oheimb [Mon, 8 Sep 2025 09:38:04 +0000 (11:38 +0200)] 
CHANGES.md: add entry on constifying (X509) function parameter

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

6 days agocrypto: remove OSSL_FUTURE_CONST as it is not more needed since 4.0
Dr. David von Oheimb [Mon, 8 Sep 2025 09:29:46 +0000 (11:29 +0200)] 
crypto: remove OSSL_FUTURE_CONST as it is not more needed since 4.0

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

6 days agoconstify X509_*print*(), X509_get0_*_objects(), X509_*_get0(), ..., effectively in...
Dr. David von Oheimb [Fri, 7 Feb 2025 11:34:25 +0000 (12:34 +0100)] 
constify X509_*print*(), X509_get0_*_objects(), X509_*_get0(), ..., effectively in OpenSSL 4.0

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

6 days agoconstify X509_REQ_get_X509_PUBKEY() in OpenSSL 4.0; related fixes in doc, x509.h...
Dr. David von Oheimb [Fri, 7 Feb 2025 11:05:05 +0000 (12:05 +0100)] 
constify X509_REQ_get_X509_PUBKEY() in OpenSSL 4.0; related fixes in doc, x509.h.in, x509_req.c

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

6 days agorename FFC_PARAM_PTRS to FFC_OSSL_PARAMS
Pauli [Mon, 8 Sep 2025 06:33:27 +0000 (16:33 +1000)] 
rename FFC_PARAM_PTRS to FFC_OSSL_PARAMS

Reviewed-by: Shane Lontis <shane.lontis@oracle.com>
Reviewed-by: Tomas Mraz <tomas@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/28360)

6 days agodsa/dh: update keymanagers for DH and DSA to use generated param parsers
Pauli [Thu, 28 Aug 2025 01:49:44 +0000 (11:49 +1000)] 
dsa/dh: update keymanagers for DH and DSA to use generated param parsers

Both are updates to reduce the OSSL_PARAM_locate related searching.

Reviewed-by: Shane Lontis <shane.lontis@oracle.com>
Reviewed-by: Tomas Mraz <tomas@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/28360)

6 days agoAdd invalid parameter error to parser generator
Pauli [Thu, 28 Aug 2025 01:49:40 +0000 (11:49 +1000)] 
Add invalid parameter error to parser generator

Reviewed-by: Shane Lontis <shane.lontis@oracle.com>
Reviewed-by: Tomas Mraz <tomas@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/28360)

6 days agodh/dsa: rename files in anticipation of using generated param name parsers
Pauli [Mon, 25 Aug 2025 23:06:49 +0000 (09:06 +1000)] 
dh/dsa: rename files in anticipation of using generated param name parsers

Reviewed-by: Shane Lontis <shane.lontis@oracle.com>
Reviewed-by: Tomas Mraz <tomas@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/28360)

6 days agoOSSL_CALLBACK.pod: add missing info on required return values of callback functions
Dr. David von Oheimb [Mon, 14 Apr 2025 19:09:16 +0000 (21:09 +0200)] 
OSSL_CALLBACK.pod: add missing info on required return values of callback functions

Reviewed-by: Matt Caswell <matt@openssl.org>
Reviewed-by: Paul Dale <ppzgs1@gmail.com>
Reviewed-by: Richard Levitte <levitte@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/28474)

7 days agodoc: Add missing commas
Jakub Jelen [Tue, 9 Sep 2025 16:10:30 +0000 (18:10 +0200)] 
doc: Add missing commas

CLA: trivial
Signed-off-by: Jakub Jelen <jjelen@redhat.com>
Reviewed-by: Paul Yang <paulyang.inf@gmail.com>
Reviewed-by: Paul Dale <ppzgs1@gmail.com>
(Merged from https://github.com/openssl/openssl/pull/28493)

7 days agoDoc changes: the -hmac-env and -hmac-stdin options of openssl-dgst
Igor Ustinov [Tue, 9 Sep 2025 19:50:01 +0000 (21:50 +0200)] 
Doc changes: the -hmac-env and -hmac-stdin options of openssl-dgst
will appear in version 4.0

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

7 days agom_sigver.c do_sigver_init(): add details to EVP_R_OPERATION_NOT_SUPPORTED_FOR_THIS_KE...
Dr. David von Oheimb [Mon, 2 Jun 2025 19:01:50 +0000 (21:01 +0200)] 
m_sigver.c do_sigver_init(): add details to EVP_R_OPERATION_NOT_SUPPORTED_FOR_THIS_KEYTYPE

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

7 days agoEVP_PKEY_CTX_get_params(): add error queue entry EVP_R_PROVIDER_GET_CTX_PARAMS_NOT_SU...
Dr. David von Oheimb [Mon, 2 Jun 2025 19:00:49 +0000 (21:00 +0200)] 
EVP_PKEY_CTX_get_params(): add error queue entry EVP_R_PROVIDER_GET_CTX_PARAMS_NOT_SUPPORTED

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

7 days agoAdd one more trace message to the torture_rcu_high test
Bernd Edlinger [Mon, 8 Sep 2025 21:00:55 +0000 (23:00 +0200)] 
Add one more trace message to the torture_rcu_high test

It is interesting that in the very rare cases, where this
test failure has been observed so far, the rcu torture value
went always backwards to 0.  This could be either due to
ossl_rcu_deref(&writer_ptr) returning NULL, or the initial
value of "new = CRYPTO_zalloc(sizeof(uint64_t), NULL, 0)"
still visible despite ossl_rcu_assign_ptr(&writer_ptr, &new)
immediatley after the "*new = global_ctr++" statement.
Add one additional trace message to find out what exactly
happens here, when it happens again.
Additionally, we do no longer initialize the new value to
zero but something else, so it can also be detected.

Related to #27267

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

8 days agoAdd key_type to the derive_skey function
Dmitry Belyavskiy [Mon, 8 Sep 2025 18:50:59 +0000 (20:50 +0200)] 
Add key_type to the derive_skey function

In some cases this information is necessary on the provider side

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

8 days agodoc/man3/RAND_load_file.pod: RAND_load_file on non-regular files with bytes=-1
Eugene Syromiatnikov [Fri, 29 Aug 2025 08:29:26 +0000 (10:29 +0200)] 
doc/man3/RAND_load_file.pod: RAND_load_file on non-regular files with bytes=-1

Mention that RAND_load_file attempts to read only RAND_DRBG_STRENGTH
bytes on non-regular files if the number of bytes to be read
is not specified explicitly.

Signed-off-by: Eugene Syromiatnikov <esyr@openssl.org>
Reviewed-by: Paul Dale <ppzgs1@gmail.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/28379)

8 days agocrypto/rand/randfile.c: avoid signed integer overflow in RAND_load_file
Eugene Syromiatnikov [Fri, 29 Aug 2025 08:02:39 +0000 (10:02 +0200)] 
crypto/rand/randfile.c: avoid signed integer overflow in RAND_load_file

If a file supplied to RAND_load_file is too big (more than INT_MAX bytes),
it is possible to trigger a signer integer overflow during ret calculation.
Avoid it by returning early when we are about to hit it on the next
iteration.

Reported-by: Liu-Ermeng <liuermeng2@huawei.com>
Resolves: https://github.com/openssl/openssl/issues/28375
Signed-off-by: Eugene Syromiatnikov <esyr@openssl.org>
Reviewed-by: Paul Dale <ppzgs1@gmail.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/28379)

9 days agoutil/find-doc-nits: do not check files in submodules in check_env_vars
Eugene Syromiatnikov [Fri, 29 Aug 2025 07:11:23 +0000 (09:11 +0200)] 
util/find-doc-nits: do not check files in submodules in check_env_vars

The reports about undocumented environment variables coming from files
in submodules are superfluous;  get the list of directories
from .gitmodules and exclude them from processing.

Resolves: https://github.com/openssl/openssl/issues/28109
Signed-off-by: Eugene Syromiatnikov <esyr@openssl.org>
Reviewed-by: Richard Levitte <levitte@openssl.org>
Reviewed-by: Tomas Mraz <tomas@openssl.org>
Reviewed-by: Neil Horman <nhorman@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/28378)

9 days agoMake the Unix build process more repeatable
Enji Cooper [Fri, 5 Sep 2025 03:22:00 +0000 (20:22 -0700)] 
Make the Unix build process more repeatable

Before this change all manpages would contain the date when pod2man was
run. This resulted in outputs that differed between builds--or
potentially across a single build if the host clock "ticked" to the next
day when the build was being run.

This commit modifies the manpage generation process as follows:
- The date all manpages were generated will be normalized to a single
  date.
- The release date specified in `VERSION.dat` is used instead of the
  date/time when `pod2man` was executed OR--in the event a date isn't
  specified in `VERSION.dat`--the time when the Makefiles were last
  regenerated.

Embedding a consistent date into the generated manpages helps ensure that
the build process as a whole is more repeatable and helps ensure that
release versions of OpenSSL create artifacts consistent with the date
that the official release was cut.

Co-authored-by: Richard Levitte <levitte@openssl.org>
Signed-off-by: Enji Cooper <yaneurabeya@gmail.com>
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/28449)

9 days agoopenssl-enc.pod.in: We actually use PKCS#7 padding
Sergey G. Brester [Wed, 27 Aug 2025 22:26:11 +0000 (00:26 +0200)] 
openssl-enc.pod.in: We actually use PKCS#7 padding

PKCS#5 padding is a subset for 8-bytes block ciphers only.

CLA: trivial

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

9 days agogithub/workflows: Replace deprecated apt-get --force-yes
Norbert Pocs [Thu, 4 Sep 2025 08:02:55 +0000 (10:02 +0200)] 
github/workflows: Replace deprecated apt-get --force-yes

It is replaced by a few flags starting with '--allow-'. Currently:
--allow-unauthenticated
--allow-downgrades
--allow-remove-essential
--allow-change-held-packages

Signed-off-by: Norbert Pocs <norbertp@openssl.org>
Reviewed-by: Neil Horman <nhorman@openssl.org>
Reviewed-by: Paul Dale <ppzgs1@gmail.com>
(Merged from https://github.com/openssl/openssl/pull/28435)

9 days agoRISC-V: Use address for vlenb CSR
Hongren Zheng [Tue, 2 Sep 2025 14:00:10 +0000 (22:00 +0800)] 
RISC-V: Use address for vlenb CSR

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

9 days agoAdd a helper function to delete the extension list
David Benjamin [Sun, 31 Aug 2025 22:09:52 +0000 (18:09 -0400)] 
Add a helper function to delete the extension list

Reviewed-by: Paul Dale <ppzgs1@gmail.com>
Reviewed-by: Tim Hudson <tjh@openssl.org>
Reviewed-by: Matt Caswell <matt@openssl.org>
Reviewed-by: Tomas Mraz <tomas@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/28398)

9 days agoClear the extension list when removing the last extension
David Benjamin [Sun, 31 Aug 2025 21:25:40 +0000 (17:25 -0400)] 
Clear the extension list when removing the last extension

The extensions list in a certificate, CRL, and CRL entry is defined as:

    ... extensions      [3]  EXPLICIT Extensions OPTIONAL ...
    ... crlEntryExtensions      Extensions OPTIONAL ...
    ... crlExtensions           [0]  EXPLICIT Extensions OPTIONAL ...

    Extensions  ::=  SEQUENCE SIZE (1..MAX) OF Extension

This means that a present but empty extensions list is actually invalid.
Rather, if you have no extensions to encode, you are meant to omit the
list altogether. Fix the delete_ext functions to handle this correctly.

This would mostly be moot, as an application adding extensions only to
delete them all would be unusual. However, #13658 implemented a slightly
roundabout design where, to omit SKID/AKID, the library first puts them
in and then the command-line tool detects some placeholder values and
deletes the extension again.

Fixes #28397

Reviewed-by: Paul Dale <ppzgs1@gmail.com>
Reviewed-by: Tim Hudson <tjh@openssl.org>
Reviewed-by: Matt Caswell <matt@openssl.org>
Reviewed-by: Tomas Mraz <tomas@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/28398)

9 days agoFix typo in BN_generate_prime docs
Viperinius [Sun, 31 Aug 2025 16:09:11 +0000 (16:09 +0000)] 
Fix typo in BN_generate_prime docs

CLA: trivial

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

9 days agoupdate compiler-zoo github actions workflow
Dmitry Misharov [Thu, 28 Aug 2025 13:54:54 +0000 (15:54 +0200)] 
update compiler-zoo github actions workflow

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

9 days agodoc: Update documentation of SSL_CTX_set_dh_auto()
Ryan Hooper [Thu, 28 Aug 2025 13:12:39 +0000 (09:12 -0400)] 
doc: Update documentation of SSL_CTX_set_dh_auto()

Update the documentation of the dh_tmp_auto argument in
regards to its behavior when the argument value is 2.

Fixes #27606

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

9 days agodocs: Be case specific with links to man headers
Norbert Pocs [Wed, 27 Aug 2025 13:45:45 +0000 (15:45 +0200)] 
docs: Be case specific with links to man headers

Signed-off-by: Norbert Pocs <norbertp@openssl.org>
Reviewed-by: Matt Caswell <matt@openssl.org>
Reviewed-by: Paul Dale <ppzgs1@gmail.com>
Reviewed-by: Tomas Mraz <tomas@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/28356)

9 days agoremove ossl_prov_cipher_load_from_params()
Pauli [Thu, 28 Aug 2025 04:50:50 +0000 (14:50 +1000)] 
remove ossl_prov_cipher_load_from_params()

This function is no longer used or needed and it's internal so it can be
removed safely.

Reviewed-by: Matt Caswell <matt@openssl.org>
Reviewed-by: Shane Lontis <shane.lontis@oracle.com>
(Merged from https://github.com/openssl/openssl/pull/28333)

9 days agolegacy mac: convert to generated param name decoding
Pauli [Mon, 25 Aug 2025 05:50:41 +0000 (15:50 +1000)] 
legacy mac: convert to generated param name decoding

Also fix a mismatch between advertised settables and what was actually
processed.

Reviewed-by: Matt Caswell <matt@openssl.org>
Reviewed-by: Shane Lontis <shane.lontis@oracle.com>
(Merged from https://github.com/openssl/openssl/pull/28333)

9 days agolegacy mac: rename files to enable generated param decoders
Pauli [Mon, 25 Aug 2025 05:48:02 +0000 (15:48 +1000)] 
legacy mac: rename files to enable generated param decoders

Reviewed-by: Matt Caswell <matt@openssl.org>
Reviewed-by: Shane Lontis <shane.lontis@oracle.com>
(Merged from https://github.com/openssl/openssl/pull/28333)

9 days agodgst and mac apps: Added new ways for obtaining a MAC key
Igor Ustinov [Sat, 2 Aug 2025 16:53:13 +0000 (19:53 +0300)] 
dgst and mac apps: Added new ways for obtaining a MAC key

Resolves #24584

It is now possible to obtain a MAC key from an environment variable,
a file or read it from the standard input.

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

9 days agoFix unnecessary casts between int and size_t
Frederik Wedel-Heinen [Thu, 16 Jan 2025 09:27:31 +0000 (10:27 +0100)] 
Fix unnecessary casts between int and size_t

Also update a check for a negative int length value
in mem_write().

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

9 days agoX509_STORE_CTX_new.pod: change 'trust value' to 'trust id'
Dr. David von Oheimb [Mon, 9 Dec 2024 21:07:33 +0000 (22:07 +0100)] 
X509_STORE_CTX_new.pod: change 'trust value' to 'trust id'

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

9 days agox509_vfy.c: extend documenting comment for X509_STORE_CTX_purpose_inherit()
Dr. David von Oheimb [Mon, 9 Dec 2024 21:03:30 +0000 (22:03 +0100)] 
x509_vfy.c: extend documenting comment for X509_STORE_CTX_purpose_inherit()

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

9 days agox509_trust.c: add documenting comment for obj_trust()
Dr. David von Oheimb [Mon, 9 Dec 2024 21:02:58 +0000 (22:02 +0100)] 
x509_trust.c: add documenting comment for obj_trust()

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

9 days agoX509_STORE_CTX_purpose_inherit(): replace magic constant '0' by 'X509_TRUST_DEFAULT'
Dr. David von Oheimb [Sat, 7 Dec 2024 18:00:46 +0000 (19:00 +0100)] 
X509_STORE_CTX_purpose_inherit(): replace magic constant '0' by 'X509_TRUST_DEFAULT'

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

9 days ago25-test_verify.t: add test for trusted root excluding key usage KeyCertSign
Dr. David von Oheimb [Tue, 21 Mar 2023 13:21:45 +0000 (14:21 +0100)] 
25-test_verify.t: add test for trusted root excluding key usage KeyCertSign

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

9 days agoopenssl-verification-options.pod: improve description of certificate validation
Dr. David von Oheimb [Tue, 28 Feb 2023 11:10:35 +0000 (12:10 +0100)] 
openssl-verification-options.pod: improve description of certificate validation

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

9 days agoopenssl-verification-options.pod: better explain trust anchors and chain building
Dr. David von Oheimb [Sat, 9 Jul 2022 11:20:06 +0000 (13:20 +0200)] 
openssl-verification-options.pod: better explain trust anchors and chain building

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

9 days agoopenssl-verification-options.pod: Move reference to changes brought by OpenSSL 1...
Dr. David von Oheimb [Sat, 26 Jun 2021 13:50:34 +0000 (15:50 +0200)] 
openssl-verification-options.pod: Move reference to changes brought by OpenSSL 1.1.0 to HISTORY section

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

9 days agoasn1_parse.c: Fixed typo in comment
Pkeane22 [Sun, 7 Sep 2025 21:09:27 +0000 (17:09 -0400)] 
asn1_parse.c: Fixed typo in comment

Changed "15" to "14" on the comment line in ASN1_tag2str.

CLA: trivial

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

9 days agoapps: remove chopup_args()
Eugene Syromiatnikov [Thu, 4 Sep 2025 14:37:02 +0000 (16:37 +0200)] 
apps: remove chopup_args()

The last (and only?) user has been removed in commit eca471391378 "APPS:
Drop interactive mode in the 'openssl' program".

Complements: eca471391378 "APPS: Drop interactive mode in the 'openssl' program"
Signed-off-by: Eugene Syromiatnikov <esyr@openssl.org>
Reviewed-by: Dmitry Belyavskiy <beldmit@gmail.com>
Reviewed-by: Paul Dale <ppzgs1@gmail.com>
Reviewed-by: Neil Horman <nhorman@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/28441)

10 days agoAdd SM2 implementation in generic riscv64 asm
geliyaz [Wed, 2 Jul 2025 07:33:08 +0000 (15:33 +0800)] 
Add SM2 implementation in generic riscv64 asm

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

11 days agoapps: use app_malloc_array()
Eugene Syromiatnikov [Thu, 4 Sep 2025 15:59:33 +0000 (17:59 +0200)] 
apps: use app_malloc_array()

Replace app_malloc() calls where app_malloc_array() ones where
appropriate.

Signed-off-by: Eugene Syromiatnikov <esyr@openssl.org>
Reviewed-by: Paul Dale <ppzgs1@gmail.com>
Reviewed-by: Dmitry Belyavskiy <beldmit@gmail.com>
Reviewed-by: Neil Horman <nhorman@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/28444)

11 days agoapps: introduce app_malloc_array()
Eugene Syromiatnikov [Thu, 4 Sep 2025 15:57:18 +0000 (17:57 +0200)] 
apps: introduce app_malloc_array()

Similar to app_malloc(), provides a wrapper for OPENSSL_malloc_array()
that bails out when a NULL pointer is returned.

Signed-off-by: Eugene Syromiatnikov <esyr@openssl.org>
Reviewed-by: Paul Dale <ppzgs1@gmail.com>
Reviewed-by: Dmitry Belyavskiy <beldmit@gmail.com>
Reviewed-by: Neil Horman <nhorman@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/28444)

11 days agohmac: stop using secure memory for the HMAC key
Pauli [Mon, 1 Sep 2025 22:48:06 +0000 (08:48 +1000)] 
hmac: stop using secure memory for the HMAC key

Secure memory is design for long term storage of private material.
HMAC keys are not this.

Secure memory use was introduced in July 2020 by commit
3fddbb264e87a8cef2903cbd7b02b8e1a39a2a99.

Fixes #28346

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

12 days agoslh-dsa: omit test of import PCT
Pauli [Thu, 4 Sep 2025 21:24:19 +0000 (07:24 +1000)] 
slh-dsa: omit test of import PCT

Reviewed-by: Neil Horman <nhorman@openssl.org>
Reviewed-by: Tim Hudson <tjh@openssl.org>
Reviewed-by: Shane Lontis <shane.lontis@oracle.com>
(Merged from https://github.com/openssl/openssl/pull/28447)

12 days agoimport pct: remove import PCTs for most algorithms
Pauli [Thu, 4 Sep 2025 21:23:28 +0000 (07:23 +1000)] 
import pct: remove import PCTs for most algorithms

This coveres DH, EC, RSA and SLH-DSA.

Reviewed-by: Neil Horman <nhorman@openssl.org>
Reviewed-by: Tim Hudson <tjh@openssl.org>
Reviewed-by: Shane Lontis <shane.lontis@oracle.com>
(Merged from https://github.com/openssl/openssl/pull/28447)

12 days agointerop-test.yml: Install new openssl version alongside the old
Tomas Mraz [Fri, 5 Sep 2025 10:14:31 +0000 (12:14 +0200)] 
interop-test.yml: Install new openssl version alongside the old

Reviewed-by: Matt Caswell <matt@openssl.org>
Reviewed-by: Neil Horman <nhorman@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/28451)

12 days agointerop-tests.yml: Fix also the soversion in the RPM spec file
Tomas Mraz [Fri, 5 Sep 2025 07:20:11 +0000 (09:20 +0200)] 
interop-tests.yml: Fix also the soversion in the RPM spec file

Reviewed-by: Matt Caswell <matt@openssl.org>
Reviewed-by: Neil Horman <nhorman@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/28451)

13 days agoOnly unlock in rsa_get_blinding when locking was successful
two-heart [Thu, 4 Sep 2025 10:20:53 +0000 (12:20 +0200)] 
Only unlock in rsa_get_blinding when locking was successful

CLA: trivial

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

13 days agoAdd missing unlock to ossl_provider_new
two-heart [Thu, 4 Sep 2025 09:18:01 +0000 (11:18 +0200)] 
Add missing unlock to ossl_provider_new

unlock on the early return path

CLA: trivial

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

13 days agoRefactor cache_objects() loop and object type handling
olszomal [Tue, 2 Sep 2025 10:02:36 +0000 (12:02 +0200)] 
Refactor cache_objects() loop and object type handling

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

2 weeks agoUpdate the test for debuginfo
Matt Caswell [Wed, 3 Sep 2025 07:53:21 +0000 (08:53 +0100)] 
Update the test for debuginfo

Ensure we are testing against libcrypto.so.4

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

2 weeks agoSkip pyca cryptography tests for now
Matt Caswell [Tue, 2 Sep 2025 14:59:13 +0000 (15:59 +0100)] 
Skip pyca cryptography tests for now

These tests fail because they are not compatible with 4.0

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

2 weeks agoFix the doc-nits history check
Matt Caswell [Tue, 2 Sep 2025 14:37:53 +0000 (15:37 +0100)] 
Fix the doc-nits history check

Fix the script now that we are at version 4.0

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

2 weeks agoMake update following 4.0 version change
Matt Caswell [Tue, 2 Sep 2025 14:22:37 +0000 (15:22 +0100)] 
Make update following 4.0 version change

Update the ordinal numbers

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

2 weeks agoThe next version to be released from master is 4.0
Matt Caswell [Tue, 2 Sep 2025 14:06:48 +0000 (15:06 +0100)] 
The next version to be released from master is 4.0

Now that the 3.6 branch has been created, correct the master branch so
that it is clear that the next release from that branch will be 4.0

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