]> git.ipfire.org Git - thirdparty/openssl.git/log
thirdparty/openssl.git
5 weeks agoAdditonal removals of engine references in tests/* feature/engineremoval
Neil Horman [Thu, 25 Sep 2025 15:37:52 +0000 (11:37 -0400)] 
Additonal removals of engine references in tests/*

Spotted by @andrewkdinh, some extra notes about/useages of engines that
are now vestigial.

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

5 weeks agoremove dasync engine test from test_rand
Neil Horman [Thu, 11 Sep 2025 20:09:56 +0000 (16:09 -0400)] 
remove dasync engine test from test_rand

We're removing the engine, so we don't need to test this anymore.

NOTE: This also removes the engine skip check from the test, and this
breaks testing until such time as PR #28461 is merged (which replaces
the remaining engine test with a provider).

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

5 weeks agoDon't enable engines on sysdefault tests
Neil Horman [Thu, 11 Sep 2025 20:00:17 +0000 (16:00 -0400)] 
Don't enable engines on sysdefault tests

With engine removal, we expect that init flag to disappear, so stop
using it here.

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

5 weeks agoremove afalg tests
Neil Horman [Thu, 11 Sep 2025 19:39:44 +0000 (15:39 -0400)] 
remove afalg tests

We have a specific test suite that exercizes the afalg engine, that is
becoming useless with engine removal.

I had considered that we should perhaps convert this into a provider,
but having looked at the engine itself, it only offers implementations
for AES-128, AES-192 and AES-256.  Given that the default provider
offers these algorithms with hardware acceleration via the aesni
instruction set (or comparable instructions on non-x86 arches), it seems
like the only advantage the afalg engine offers is acceleration of these
ciphers on platforms that have off-cpu accelerators and no cpu based
acceleration support.

given that:
a) Most cpus have instruction based acceleration
b) We don't test with any platforms that use external accelerators

It seems like alot of investment to get no real advantage, so just
remove the test, allowing us to delete the engine entirely in another
PR.

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

5 weeks agoremove engine.h include from ssl_handshake_rtt_test.c
Neil Horman [Thu, 11 Sep 2025 19:25:49 +0000 (15:25 -0400)] 
remove engine.h include from ssl_handshake_rtt_test.c

It seems like it wasn't ever needed before, so with the removal of
engines, just get rid of it.

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

5 weeks agoRemove dasync engine from sslapitest and sslbuffertest
Neil Horman [Thu, 11 Sep 2025 19:19:45 +0000 (15:19 -0400)] 
Remove dasync engine from sslapitest and sslbuffertest

With the impending engine removal, we don't have a need to test engine
functionality in these tests anymore, so remove the test cases that make
use of the dasync engine here.

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

5 weeks agoremove engine references from evp_extra_test
Neil Horman [Thu, 11 Sep 2025 18:46:18 +0000 (14:46 -0400)] 
remove engine references from evp_extra_test

The evp_extra_test code makes use of the dasync engine to ensure that we
can do evp operations (signatures and ciphers) with an engine.

The dasync engine is used for this purpose, but it does not exercize any
specific pipeline functionality.

Given that engines are getting removed, the engine tests here I think
can just be removed.

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

5 weeks agoRemove ENGINESDIR variable and engines installation from Makefiles.
Milan Broz [Fri, 19 Sep 2025 11:03:07 +0000 (13:03 +0200)] 
Remove ENGINESDIR variable and engines installation from Makefiles.

For compatibility reasons, OPENSSL_ENGINES_DIR and OPENSSL_INFO_ENGINES_DIR
are still supported but return values like with engines disabled.

The OPENSSL_ENGINES environment variable will be removed with engine
removal later.

Resolves: https://github.com/openssl/project/issues/1425

Signed-off-by: Milan Broz <gmazyland@gmail.com>
Reviewed-by: Tomas Mraz <tomas@openssl.org>
Reviewed-by: Saša Nedvědický <sashan@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/28702)

5 weeks agocrypto/ec: Remove ENGINE usage
Norbert Pocs [Tue, 16 Sep 2025 12:58:08 +0000 (14:58 +0200)] 
crypto/ec: Remove ENGINE usage

Resolves: https://github.com/openssl/project/issues/1615

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

5 weeks agocrypto/dsa: Remove ENGINE usage
Norbert Pocs [Tue, 16 Sep 2025 11:18:53 +0000 (13:18 +0200)] 
crypto/dsa: Remove ENGINE usage

Resolves: https://github.com/openssl/project/issues/1614

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

5 weeks agoRemove README-ENGINES.md
Milan Broz [Tue, 16 Sep 2025 12:45:23 +0000 (14:45 +0200)] 
Remove README-ENGINES.md

Resolves: https://github.com/openssl/project/issues/1616

Signed-off-by: Milan Broz <gmazyland@gmail.com>
Reviewed-by: Neil Horman <nhorman@openssl.org>
Reviewed-by: Tomas Mraz <tomas@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/28618)

5 weeks agop_lib.c: Remove engine from pkey_set_type
Norbert Pocs [Tue, 16 Sep 2025 08:18:54 +0000 (10:18 +0200)] 
p_lib.c: Remove engine from pkey_set_type

Resolves: https://github.com/openssl/project/issues/1437

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

5 weeks agoRemove ENGINE_TABLE and ENGINE_REF_COUNT trace documentation
Neil Horman [Mon, 15 Sep 2025 20:36:28 +0000 (16:36 -0400)] 
Remove ENGINE_TABLE and ENGINE_REF_COUNT trace documentation

As the subject indicates, with these trace categories gone, we shouldn't
reference them in the docs anymore.

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

5 weeks agoRemove ENGINE_TABLE and ENGINE_REF_COUNT trace categories
Neil Horman [Mon, 15 Sep 2025 20:31:25 +0000 (16:31 -0400)] 
Remove ENGINE_TABLE and ENGINE_REF_COUNT trace categories

With ENGINES going away we need to remove these trace catagories

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

5 weeks agoConfigure: deprecate-disable engine related options
Norbert Pocs [Mon, 15 Sep 2025 08:15:44 +0000 (10:15 +0200)] 
Configure: deprecate-disable engine related options

Signed-off-by: Norbert Pocs <norbertp@openssl.org>
Reviewed-by: Matt Caswell <matt@openssl.org>
Reviewed-by: Saša Nedvědický <sashan@openssl.org>
Reviewed-by: Neil Horman <nhorman@openssl.org>
Reviewed-by: Dmitry Belyavskiy <beldmit@gmail.com>
(Merged from https://github.com/openssl/openssl/pull/28384)

5 weeks agoRemove private ENGINE references from local structs.
Milan Broz [Wed, 3 Sep 2025 09:52:49 +0000 (11:52 +0200)] 
Remove private ENGINE references from local structs.

Resolves: https://github.com/openssl/project/issues/1368

Signed-off-by: Milan Broz <gmazyland@gmail.com>
Reviewed-by: Matt Caswell <matt@openssl.org>
Reviewed-by: Saša Nedvědický <sashan@openssl.org>
Reviewed-by: Neil Horman <nhorman@openssl.org>
Reviewed-by: Dmitry Belyavskiy <beldmit@gmail.com>
(Merged from https://github.com/openssl/openssl/pull/28384)

5 weeks agoRemove engine from PROV_CIPHER and PROV_DIGEST structs.
Milan Broz [Tue, 2 Sep 2025 12:58:09 +0000 (14:58 +0200)] 
Remove engine from PROV_CIPHER and PROV_DIGEST structs.

Resolves: https://github.com/openssl/project/issues/1352
Resolves: https://github.com/openssl/project/issues/1353

Signed-off-by: Milan Broz <gmazyland@gmail.com>
Reviewed-by: Matt Caswell <matt@openssl.org>
Reviewed-by: Saša Nedvědický <sashan@openssl.org>
Reviewed-by: Neil Horman <nhorman@openssl.org>
Reviewed-by: Dmitry Belyavskiy <beldmit@gmail.com>
(Merged from https://github.com/openssl/openssl/pull/28384)

5 weeks agoRemove OPENSSL_NO_STATIC_ENGINE macro
Norbert Pocs [Tue, 2 Sep 2025 08:03:21 +0000 (10:03 +0200)] 
Remove OPENSSL_NO_STATIC_ENGINE macro

Resolves: https://github.com/openssl/project/issues/1364

Signed-off-by: Norbert Pocs <norbertp@openssl.org>
Reviewed-by: Matt Caswell <matt@openssl.org>
Reviewed-by: Saša Nedvědický <sashan@openssl.org>
Reviewed-by: Neil Horman <nhorman@openssl.org>
Reviewed-by: Dmitry Belyavskiy <beldmit@gmail.com>
(Merged from https://github.com/openssl/openssl/pull/28384)

5 weeks agoRemove OPENSSL_NO_DYNAMIC_ENGINE
Norbert Pocs [Tue, 2 Sep 2025 07:19:30 +0000 (09:19 +0200)] 
Remove OPENSSL_NO_DYNAMIC_ENGINE

Most of the ifdefs were removed, but we want to rewrite the dasync
engine to a provider. Therefore that code was not removed; instead a new
temporary macro was added named TODO_REWRITE_ME_DASYNC_PROVIDER.

Resolves: https://github.com/openssl/project/issues/1363

Signed-off-by: Norbert Pocs <norbertp@openssl.org>
Reviewed-by: Matt Caswell <matt@openssl.org>
Reviewed-by: Saša Nedvědický <sashan@openssl.org>
Reviewed-by: Neil Horman <nhorman@openssl.org>
Reviewed-by: Dmitry Belyavskiy <beldmit@gmail.com>
(Merged from https://github.com/openssl/openssl/pull/28384)

5 weeks agoUpdate symbols after OPENSSL_NO_ENGINE clearup
Norbert Pocs [Tue, 2 Sep 2025 06:10:11 +0000 (08:10 +0200)] 
Update symbols after OPENSSL_NO_ENGINE clearup

Signed-off-by: Norbert Pocs <norbertp@openssl.org>
Reviewed-by: Matt Caswell <matt@openssl.org>
Reviewed-by: Saša Nedvědický <sashan@openssl.org>
Reviewed-by: Neil Horman <nhorman@openssl.org>
Reviewed-by: Dmitry Belyavskiy <beldmit@gmail.com>
(Merged from https://github.com/openssl/openssl/pull/28384)

5 weeks agoengine/e_loader_attic: Remove OPENSSL_NO_ENGINE parts
Norbert Pocs [Fri, 29 Aug 2025 13:12:06 +0000 (15:12 +0200)] 
engine/e_loader_attic: Remove OPENSSL_NO_ENGINE parts

Signed-off-by: Norbert Pocs <norbertp@openssl.org>
Reviewed-by: Matt Caswell <matt@openssl.org>
Reviewed-by: Saša Nedvědický <sashan@openssl.org>
Reviewed-by: Neil Horman <nhorman@openssl.org>
Reviewed-by: Dmitry Belyavskiy <beldmit@gmail.com>
(Merged from https://github.com/openssl/openssl/pull/28384)

5 weeks agocrypto/: Remove OPENSSL_NO_ENGINE guarded code
Norbert Pocs [Fri, 29 Aug 2025 12:42:18 +0000 (14:42 +0200)] 
crypto/: Remove OPENSSL_NO_ENGINE guarded code

Signed-off-by: Norbert Pocs <norbertp@openssl.org>
Reviewed-by: Matt Caswell <matt@openssl.org>
Reviewed-by: Saša Nedvědický <sashan@openssl.org>
Reviewed-by: Neil Horman <nhorman@openssl.org>
Reviewed-by: Dmitry Belyavskiy <beldmit@gmail.com>
(Merged from https://github.com/openssl/openssl/pull/28384)

5 weeks agossl/: Remove ENGINEs
Norbert Pocs [Fri, 29 Aug 2025 11:59:35 +0000 (13:59 +0200)] 
ssl/: Remove ENGINEs

Signed-off-by: Norbert Pocs <norbertp@openssl.org>
Reviewed-by: Matt Caswell <matt@openssl.org>
Reviewed-by: Saša Nedvědický <sashan@openssl.org>
Reviewed-by: Neil Horman <nhorman@openssl.org>
Reviewed-by: Dmitry Belyavskiy <beldmit@gmail.com>
(Merged from https://github.com/openssl/openssl/pull/28384)

5 weeks agoinclude/: Remove ENGINEs
Norbert Pocs [Fri, 29 Aug 2025 10:47:00 +0000 (12:47 +0200)] 
include/: Remove ENGINEs

Signed-off-by: Norbert Pocs <norbertp@openssl.org>
Reviewed-by: Matt Caswell <matt@openssl.org>
Reviewed-by: Saša Nedvědický <sashan@openssl.org>
Reviewed-by: Neil Horman <nhorman@openssl.org>
Reviewed-by: Dmitry Belyavskiy <beldmit@gmail.com>
(Merged from https://github.com/openssl/openssl/pull/28384)

5 weeks agotest/: Remove ENGINEs
Norbert Pocs [Fri, 29 Aug 2025 10:33:10 +0000 (12:33 +0200)] 
test/: Remove ENGINEs

Signed-off-by: Norbert Pocs <norbertp@openssl.org>
Reviewed-by: Matt Caswell <matt@openssl.org>
Reviewed-by: Saša Nedvědický <sashan@openssl.org>
Reviewed-by: Neil Horman <nhorman@openssl.org>
Reviewed-by: Dmitry Belyavskiy <beldmit@gmail.com>
(Merged from https://github.com/openssl/openssl/pull/28384)

5 weeks agoapps/: Update docs
Norbert Pocs [Fri, 12 Sep 2025 13:38:01 +0000 (15:38 +0200)] 
apps/: Update docs

Signed-off-by: Norbert Pocs <norbertp@openssl.org>
Reviewed-by: Matt Caswell <matt@openssl.org>
Reviewed-by: Saša Nedvědický <sashan@openssl.org>
Reviewed-by: Neil Horman <nhorman@openssl.org>
Reviewed-by: Dmitry Belyavskiy <beldmit@gmail.com>
(Merged from https://github.com/openssl/openssl/pull/28384)

5 weeks agoapps/: Remove "-keyform engine"
Norbert Pocs [Wed, 3 Sep 2025 11:05:35 +0000 (13:05 +0200)] 
apps/: Remove "-keyform engine"

Resolves: https://github.com/openssl/project/issues/1354

Signed-off-by: Norbert Pocs <norbertp@openssl.org>
Reviewed-by: Matt Caswell <matt@openssl.org>
Reviewed-by: Saša Nedvědický <sashan@openssl.org>
Reviewed-by: Neil Horman <nhorman@openssl.org>
Reviewed-by: Dmitry Belyavskiy <beldmit@gmail.com>
(Merged from https://github.com/openssl/openssl/pull/28384)

5 weeks agoapps/: Remove engines
Norbert Pocs [Thu, 28 Aug 2025 14:11:10 +0000 (16:11 +0200)] 
apps/: Remove engines

Signed-off-by: Norbert Pocs <norbertp@openssl.org>
Reviewed-by: Matt Caswell <matt@openssl.org>
Reviewed-by: Saša Nedvědický <sashan@openssl.org>
Reviewed-by: Neil Horman <nhorman@openssl.org>
Reviewed-by: Dmitry Belyavskiy <beldmit@gmail.com>
(Merged from https://github.com/openssl/openssl/pull/28384)

5 weeks agoproviders/: Remove ENGINEs
Norbert Pocs [Thu, 28 Aug 2025 13:14:31 +0000 (15:14 +0200)] 
providers/: Remove ENGINEs

Signed-off-by: Norbert Pocs <norbertp@openssl.org>
Reviewed-by: Matt Caswell <matt@openssl.org>
Reviewed-by: Saša Nedvědický <sashan@openssl.org>
Reviewed-by: Neil Horman <nhorman@openssl.org>
Reviewed-by: Dmitry Belyavskiy <beldmit@gmail.com>
(Merged from https://github.com/openssl/openssl/pull/28384)

5 weeks agoRemove openssl engine command
Milan Broz [Thu, 4 Sep 2025 10:19:40 +0000 (12:19 +0200)] 
Remove openssl engine command

This patch removes apps/engine.c and associated man pages.

Resolves: https://github.com/openssl/project/issues/1370

Signed-off-by: Milan Broz <gmazyland@gmail.com>
Reviewed-by: Dmitry Belyavskiy <beldmit@gmail.com>
Reviewed-by: Paul Dale <ppzgs1@gmail.com>
Reviewed-by: Matt Caswell <matt@openssl.org>
Reviewed-by: Richard Levitte <levitte@openssl.org>
Reviewed-by: Tomas Mraz <tomas@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/28481)

5 weeks agoRemove GOST external tests
Norbert Pocs [Mon, 8 Sep 2025 15:11:33 +0000 (17:11 +0200)] 
Remove GOST external tests

Signed-off-by: Norbert Pocs <norbertp@openssl.org>
Reviewed-by: Saša Nedvědický <sashan@openssl.org>
Reviewed-by: Richard Levitte <levitte@openssl.org>
Reviewed-by: Neil Horman <nhorman@openssl.org>
Reviewed-by: Matt Caswell <matt@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/28440)

5 weeks agoRemove engine test
Norbert Pocs [Mon, 8 Sep 2025 13:24:03 +0000 (15:24 +0200)] 
Remove engine test

Signed-off-by: Norbert Pocs <norbertp@openssl.org>
Reviewed-by: Saša Nedvědický <sashan@openssl.org>
Reviewed-by: Richard Levitte <levitte@openssl.org>
Reviewed-by: Neil Horman <nhorman@openssl.org>
Reviewed-by: Matt Caswell <matt@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/28440)

5 weeks ago Engine removal: Silence the CI tests about engines
Norbert Pocs [Mon, 8 Sep 2025 13:25:31 +0000 (15:25 +0200)] 
 Engine removal: Silence the CI tests about engines

As we can't do every change in one big PR (and we also don't want),
therefore there always will be failing tests until everything is
resolved/cleaned up. This way we silence the CI about engine tests and
later we can reenable them to see what else needs to be fixed.

Resolves: https://github.com/openssl/project/issues/1371

Signed-off-by: Norbert Pocs <norbertp@openssl.org>
Reviewed-by: Saša Nedvědický <sashan@openssl.org>
Reviewed-by: Richard Levitte <levitte@openssl.org>
Reviewed-by: Neil Horman <nhorman@openssl.org>
Reviewed-by: Matt Caswell <matt@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/28440)

5 weeks agoadd codespell pre-commit check and fix found misspellings
Dmitry Misharov [Tue, 30 Sep 2025 08:44:55 +0000 (10:44 +0200)] 
add codespell pre-commit check and fix found misspellings

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

5 weeks agoadd config file for pre-commit hooks framework
Dmitry Misharov [Thu, 4 Sep 2025 09:08:13 +0000 (11:08 +0200)] 
add config file for pre-commit hooks framework

pre-commit helps managing and maintaining multi-language pre-commit hooks.
This commit adds a pre-commit configuration to run a certian version of
clang-format utility. Later we can add sections for other languages as
well. pre-commit developers also provide the CI system which uses the
same config file.

https://pre-commit.com/
https://pre-commit.ci/

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

5 weeks agohashtable: add option to disable RCU locks
Nikola Pajkovsky [Thu, 25 Sep 2025 16:32:17 +0000 (18:32 +0200)] 
hashtable: add option to disable RCU locks

a new config option _no_rcu_ is added into HT_CONFIG. When _no_rcu_ is
set then hashtable can be guarded with any other locking primitives,
and behives as ordinary hashtable. Also, all the impact of the
atomics used internally to the hash table was mitigated.

RCU performance

   # INFO:  @ test/lhash_test.c:747
   # multithread stress runs 40000 ops in 40.779656 seconds

No RCU, guarded with RWLOCK

   # INFO:  @ test/lhash_test.c:747
   # multithread stress runs 40000 ops in 36.976926 seconds

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

5 weeks agohashtable: pass HT into hash function
Nikola Pajkovsky [Wed, 24 Sep 2025 15:12:39 +0000 (17:12 +0200)] 
hashtable: pass HT into hash function

When defining a custom hash function for a hashtable key, you typically start with:

  HT_START_KEY_DEFN(key)
  HT_DEF_KEY_FIELD(k, unsigned char *)
  HT_END_KEY_DEFN(KEY)

In this setup, the hash function signature requires keybuf and len as
parameters rather than the hashtable key itself. As a result,
accessing members of the hashtable structure becomes awkward, since
you must do something like:

  #define FROM_KEYBUF_TO_HT_KEY(keybuf, type) (type)((keybuf) - sizeof(HT_KEY))

  static uint64_t ht_hash(uint8_t *keybuf, size_t keylen)
  {
      KEY *k = FROM_KEYBUF_TO_HT_KEY(keybuf, KEY *);
      ...
  }

This kind of pointer arithmetic is both unnecessary and error-prone.
A cleaner approach is to pass the HT pointer directly into the hash
function. From there, you can safely cast it to the required type
without the pointer gymnastics.

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

5 weeks agoFix EVP_DecryptFinal_ex() for ChaCha20-Poly1305.
Daniel Kubec [Sat, 27 Sep 2025 22:24:18 +0000 (00:24 +0200)] 
Fix EVP_DecryptFinal_ex() for ChaCha20-Poly1305.

When using the ChaCha20-Poly1305 algorithm, the final interface
returns success without setting the authentication tag, whereas
the AES-GCM algorithm correctly returns failure in such cases.

Fixes #28137

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

5 weeks agoghash-riscv64-zvkg.pl: Code Comment Correction
zhoulu [Mon, 29 Sep 2025 08:14:28 +0000 (16:14 +0800)] 
ghash-riscv64-zvkg.pl: Code Comment Correction

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

5 weeks agots_conf: fix memory leak in TS_CONF_set_policies
DONGGEUN YOO [Mon, 29 Sep 2025 00:45:11 +0000 (00:45 +0000)] 
ts_conf: fix memory leak in TS_CONF_set_policies

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

5 weeks agoFix riscv64 chacha crash due to unaligned data
Bernd Edlinger [Sat, 27 Sep 2025 20:14:04 +0000 (22:14 +0200)] 
Fix riscv64 chacha crash due to unaligned data

The linux-riscv64 test machine crashes due to unaligned data,
when the V extension is enabled, while QEMU seems to have no
problems with unaligned data.

So check for aligned data and fall back to C code in case the
input or output values are unaligned.

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

5 weeks agoEnable the V extension in the OS-Zoo CI job
Bernd Edlinger [Sun, 28 Sep 2025 06:32:34 +0000 (08:32 +0200)] 
Enable the V extension in the OS-Zoo CI job

and also fix the unintentional omission of the ZBA extension,
since the first word in the OPENSSL_riscvcap environment variable
is ignored, because it is assumed to be the processor base
architecture, e.g. something like RV64GC.

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

5 weeks agoFix Memory leak in CMS_EncryptedData_set1_key
Ryan Hooper [Thu, 25 Sep 2025 16:42:24 +0000 (12:42 -0400)] 
Fix Memory leak in CMS_EncryptedData_set1_key

When CMS_EncryptedData_set1_key is called repeatedly it will
leak data on the second call. This was because
cms->d.encryptedData was already set and needed to be cleared
before the call to M_ASN1_new_of.

Fixes: #28606
Reviewed-by: Shane Lontis <shane.lontis@oracle.com>
Reviewed-by: Matt Caswell <matt@openssl.org>
Reviewed-by: Tomas Mraz <tomas@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/28668)

5 weeks agoaes: convert AES ciphers to use generated parameter decoders
Pauli [Fri, 19 Sep 2025 04:28:22 +0000 (14:28 +1000)] 
aes: convert AES ciphers to use generated parameter decoders

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

5 weeks agoaes: rename files in anticipation of gerenated param decoding
Pauli [Fri, 19 Sep 2025 01:30:29 +0000 (11:30 +1000)] 
aes: rename files in anticipation of gerenated param decoding

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

5 weeks agochacha20: convert to using genreated param name decoders
Pauli [Fri, 19 Sep 2025 01:25:19 +0000 (11:25 +1000)] 
chacha20: convert to using genreated param name decoders

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

5 weeks agochacha20: rename files in anticipation of generated param decoding
Pauli [Fri, 19 Sep 2025 01:16:45 +0000 (11:16 +1000)] 
chacha20: rename files in anticipation of generated param decoding

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

5 weeks agoxts: convert to generated param name decodering
Pauli [Fri, 19 Sep 2025 01:12:18 +0000 (11:12 +1000)] 
xts: convert to generated param name decodering

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

5 weeks agoctx: rename files for conversion to generated param decoders
Pauli [Fri, 19 Sep 2025 01:12:00 +0000 (11:12 +1000)] 
ctx: rename files for conversion to generated param decoders

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

5 weeks agolegacy ciphers: use generated param name decoders
Pauli [Fri, 19 Sep 2025 00:57:41 +0000 (10:57 +1000)] 
legacy ciphers: use generated param name decoders

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

5 weeks agolegacy ciphers: rename files in anticipation of using generated param decoders
Pauli [Fri, 19 Sep 2025 00:29:16 +0000 (10:29 +1000)] 
legacy ciphers: rename files in anticipation of using generated param decoders

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

5 weeks agoaes_cbc_hmac_sha: convert to generated param decoding
Pauli [Thu, 18 Sep 2025 06:32:13 +0000 (16:32 +1000)] 
aes_cbc_hmac_sha: convert to generated param decoding

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

5 weeks agoaes_cbc_hmac: rename files in anticipation of generated param decoding
Pauli [Thu, 18 Sep 2025 05:58:23 +0000 (15:58 +1000)] 
aes_cbc_hmac: rename files in anticipation of generated param decoding

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

5 weeks agomdc2: use a generated param decoder
Pauli [Thu, 18 Sep 2025 05:50:54 +0000 (15:50 +1000)] 
mdc2: use a generated param decoder

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

5 weeks agomdc2: rename files in anticipation of generated param decoding
Pauli [Thu, 18 Sep 2025 05:50:41 +0000 (15:50 +1000)] 
mdc2: rename files in anticipation of generated param decoding

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

5 weeks agoAdd CHANGES.md and NEWS.md updates
Tomas Mraz [Mon, 29 Sep 2025 12:23:12 +0000 (14:23 +0200)] 
Add CHANGES.md and NEWS.md updates

Including a few corrections of the previous entries.

Reviewed-by: Neil Horman <nhorman@openssl.org>
Reviewed-by: Matt Caswell <matt@openssl.org>
5 weeks agouse_proxy(): Add missing terminating NUL byte
Tomas Mraz [Thu, 11 Sep 2025 16:43:55 +0000 (18:43 +0200)] 
use_proxy(): Add missing terminating NUL byte

Fixes CVE-2025-9232

There is a missing terminating NUL byte after strncpy() call.
Issue and a proposed fix reported by Stanislav Fort (Aisle Research).

Reviewed-by: Neil Horman <nhorman@openssl.org>
Reviewed-by: Matt Caswell <matt@openssl.org>
5 weeks agoecp_sm2p256.c: Remove unused code
Tomas Mraz [Tue, 16 Sep 2025 12:48:31 +0000 (14:48 +0200)] 
ecp_sm2p256.c: Remove unused code

Reviewed-by: Neil Horman <nhorman@openssl.org>
Reviewed-by: Matt Caswell <matt@openssl.org>
5 weeks agoSM2: Use constant time modular inversion
Tomas Mraz [Thu, 11 Sep 2025 16:40:34 +0000 (18:40 +0200)] 
SM2: Use constant time modular inversion

Fixes CVE-2025-9231

Issue and a proposed fix reported by Stanislav Fort (Aisle Research).

Reviewed-by: Neil Horman <nhorman@openssl.org>
Reviewed-by: Matt Caswell <matt@openssl.org>
5 weeks agokek_unwrap_key(): Fix incorrect check of unwrapped key size
Viktor Dukhovni [Thu, 11 Sep 2025 16:10:12 +0000 (18:10 +0200)] 
kek_unwrap_key(): Fix incorrect check of unwrapped key size

Fixes CVE-2025-9230

The check is off by 8 bytes so it is possible to overread by
up to 8 bytes and overwrite up to 4 bytes.

Reviewed-by: Neil Horman <nhorman@openssl.org>
Reviewed-by: Matt Caswell <matt@openssl.org>
Reviewed-by: Tomas Mraz <tomas@openssl.org>
5 weeks agoRevert "fips: remove redundant RSA encrypt/decrypt KAT"
Neil Horman [Thu, 25 Sep 2025 20:08:37 +0000 (16:08 -0400)] 
Revert "fips: remove redundant RSA encrypt/decrypt KAT"

This reverts commit 635bf4946a7e948f26a348ddc3b5a8d282354f64.

During code review for FIPS-140-3 certification, our lab noticed that
the known answer test for RSA was removed.  This was done in the above
commit, as part of
https://github.com/openssl/openssl/pull/25988

Under the assertion that FIPS 140-3 Implementation Guidance section D.G
had relaxed the requirements for testing, obviating the need for this
test.

However, for the 3.5 FIPS-140-3 certification we are adding assertions
for support of KAS-IFC-SSC, which follows FIPS-140-3 I.G section D.F,
which does not contain the same relaxed constraints.  As such we need to
reintroduce the test.

While the specifics of the I.G requirements are slightly different in
D.F (allowing for other, potentially less time-consuming tests), the
most expedient path forward here is to simply re-introduce the test as
it existed previously, hence the reversion of the above commit.

Fixes openssl/private#832

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

6 weeks agokrb5kdf.c.in: Check the key size before applying the key
Tomas Mraz [Thu, 25 Sep 2025 12:19:22 +0000 (14:19 +0200)] 
krb5kdf.c.in: Check the key size before applying the key

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

6 weeks agoAdd test for using KRB5KDF with erroneous key size
Tomas Mraz [Thu, 25 Sep 2025 10:21:21 +0000 (12:21 +0200)] 
Add test for using KRB5KDF with erroneous key size

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

6 weeks agoUpdate doc/designs/rfc4514.md
Bob Beck [Wed, 24 Sep 2025 16:16:11 +0000 (10:16 -0600)] 
Update doc/designs/rfc4514.md

Co-authored-by: Andrew Dinh <andrewd@openssl.org>
Reviewed-by: Neil Horman <nhorman@openssl.org>
Reviewed-by: Tomas Mraz <tomas@openssl.org>
Reviewed-by: Richard Levitte <levitte@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/28639)

6 weeks agoAdd git pre-commit hook example to the script
Bob Beck [Mon, 22 Sep 2025 20:59:36 +0000 (14:59 -0600)] 
Add git pre-commit hook example to the script

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

6 weeks agounbreak url for legacy gost
Bob Beck [Mon, 22 Sep 2025 20:44:14 +0000 (14:44 -0600)] 
unbreak url for legacy gost

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

6 weeks agomake it not write changes by default
Bob Beck [Mon, 22 Sep 2025 20:21:06 +0000 (14:21 -0600)] 
make it not write changes by default

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

6 weeks agoAdd util/codespell-check.sh and run it
Bob Beck [Mon, 22 Sep 2025 19:51:32 +0000 (13:51 -0600)] 
Add util/codespell-check.sh and run it

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

6 weeks agoMake tests run faster on typical platforms.
Bob Beck [Tue, 2 Sep 2025 20:46:06 +0000 (14:46 -0600)] 
Make tests run faster on typical platforms.

Sadly not doable in make as it is notoriously bad at telling
you the parallelism being used by make -j.

If the HARNESS_JOBS environment variable has not been
set, this makes the perl script attempt to figure out how
many cpu's are available on anything windows/linux/macos/bsd like,
and if it can be successfully detected, we use that value.
if not, we use 1 as before.

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

6 weeks agoChange test/recipes/95-test_external_oqsprovider.t to allow out-of-source builds
Richard Levitte [Mon, 22 Sep 2025 16:26:50 +0000 (18:26 +0200)] 
Change test/recipes/95-test_external_oqsprovider.t to allow out-of-source builds

Unfortunately, CMake's FindOpenSSL.cmake module doesn't handle OpenSSL's
build tree very well when it's out-of-source.  This is resolved by create
a local OpenSSL "installation" with a minimum amount of symbolic links,
and using that.

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

6 weeks agoFix EVP_PKEY_can_sign() handling of NULL from query_operation_name()
Daniel Kubec [Fri, 19 Sep 2025 13:48:41 +0000 (15:48 +0200)] 
Fix EVP_PKEY_can_sign() handling of NULL from query_operation_name()

EVP_PKEY_can_sign() assumed query_operation_name(OSSL_OP_SIGNATURE)
always returns a non-NULL string. According to the documentation,
query_operation_name() may return NULL, in which case
EVP_KEYMGMT_get0_name() should be used as a fallback.

Fixes #27790

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

6 weeks agoCheck for OBJ_create() conflicts after write lock.
Viktor Dukhovni [Wed, 17 Sep 2025 09:07:07 +0000 (19:07 +1000)] 
Check for OBJ_create() conflicts after write lock.

For now subsequent calls to OBJ_create() with identical inputs return
NID_undef.  It may be better to return the previous NID in the future.

The real work actually happens in OBJ_add_object().  Duplicate compares
*all* the input object's fields with any of the objects found by lookup.

If these are identical, then necessarily all the lookups found the same
data, and we can return the existing nid in low-level calls via
OBJ_add_object() that specify the nid also.  If any of the fields are
different the new object is not installed and NID_undef is returned.

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

6 weeks agoAdd a test for multi-threaded OBJ_create
Bernd Edlinger [Sun, 31 Aug 2025 19:41:50 +0000 (21:41 +0200)] 
Add a test for multi-threaded OBJ_create

After a successful OBJ_create the returned NID should
be the same NID that is returned from OBJ_ln2nid and
should not change any more, but after an unsuccessful
OBJ_create, another thread must have created the object,
therefore OBJ_ln2nid should not return NID_undef in that
case.

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

6 weeks agoFix length of digestinfo_sm3_der
xiaoloudongfeng [Tue, 2 Sep 2025 03:25:19 +0000 (11:25 +0800)] 
Fix length of digestinfo_sm3_der

This fixes the RSA-SM3 signatures to conform to the standard.

CLA: trivial

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

6 weeks agoFix doublefree after failure in ossl_siv128_init()
Tomas Mraz [Tue, 23 Sep 2025 15:00:00 +0000 (17:00 +0200)] 
Fix doublefree after failure in ossl_siv128_init()

The issue was reported by Ronald Crane from Zippenhop LLC.

Reviewed-by: Neil Horman <nhorman@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/28644)

6 weeks agoPrint PowerPC CPUINFO
Bernd Edlinger [Sat, 13 Sep 2025 10:45:00 +0000 (12:45 +0200)] 
Print PowerPC CPUINFO

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

6 weeks agoConst correct the various sk_find functions.
Bob Beck [Fri, 12 Sep 2025 15:18:45 +0000 (09:18 -0600)] 
Const correct the various sk_find functions.

Since we no longer mutate the stack when finding, let us
make the stack pointers const.

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

6 weeks agoCorrect the documentation for OPENSSL_sk_find
Bob Beck [Tue, 16 Sep 2025 21:30:31 +0000 (15:30 -0600)] 
Correct the documentation for OPENSSL_sk_find

Since April of 2023 with commit eb0935f, these functions have not
sorted the stack if it was not sorted. The documentation was noti
changed at the time to reflect this changed behaviour.

This corrects the documentation to reflect the current behaviour
of these functions

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

6 weeks agoClose small race condition on error raising in QUIC
Neil Horman [Tue, 23 Sep 2025 09:40:06 +0000 (05:40 -0400)] 
Close small race condition on error raising in QUIC

Github issue #28501 reported an odd condition in which a double free was
occuring when a given thread was popping entries of its error stack.

It was hypothesized that, because a few places in the quic stack save
error state to a shared structure (ch->err_state, port->error_state,
qtls->error_state), that multiple threads may attempt to mutate the
shared structure during error save/restore in parallel.

Investigation showed that all paths which led to such mutations were
done under lock, so that shouldn't occur.

Except for one case, which this PR addresses.

In ossl_quic_conn_stream_conclude, we unlock our protecting mutex, prior
to calling QUIC_RAISE_NON_NORMAL_ERROR.  If that function is called with
an reason code of SHUTDOWN, it attempts to restore the channel error
state.  Given that the lock was released first, this creates a small
race condition in which two threads may manipulate the shared error
state in the channel struct in parallel.

According to the reporter, applying this patch prevents the reported
error from occuring again.

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

6 weeks agoDisable HW acceleration when running TLSProxy tests
Neil Horman [Mon, 22 Sep 2025 13:01:00 +0000 (09:01 -0400)] 
Disable HW acceleration when running TLSProxy tests

IBM reported that, since the introduction of the ossltest provider,
several tests are failing on s390x

They are failing because MAC computation on s390x uses hardware
acceleration, which bypasses the use of the ossltest provided digests.

Because TLSProxy tests rely on the return of known consistent data
(which the ossltest provider gives us), the HW acceleration ignores this
giving us real MAC's instead, causing the test to fail.

We could write an HMAC provided algorithm to override that behavior, but
since this only occurs on s390, and only in cases in which the
TLSprovider is used, it seems simpler, and more maintainable to just
disable hw acceleration on those tests (given that we don't want to use
the accelerated path anyway).

Set the capabilities register for s390 to enforce this in the TLSProxy
code.

Fixes #28630

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

6 weeks agoSkip LMS tests if fetch for the LMS algorithm fails
Andrew Dinh [Wed, 17 Sep 2025 01:49:59 +0000 (11:49 +1000)] 
Skip LMS tests if fetch for the LMS algorithm fails

Check for specific LMS error

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

6 weeks agoDo not use RW mutexes on RISC-V arch
Bernd Edlinger [Fri, 19 Sep 2025 06:52:24 +0000 (08:52 +0200)] 
Do not use RW mutexes on RISC-V arch

For unknown reasons using RW mutexes on RISC-V arch
seems to be broken, at least with glibc.

Fixes #28550

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

6 weeks agoAdd Linux Foundation Health Score badge to README
Jonathan Reimer [Thu, 18 Sep 2025 15:32:41 +0000 (17:32 +0200)] 
Add Linux Foundation Health Score badge to README

CLA: trivial

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

6 weeks agox509: fix mem leak on error path
Nikola Pajkovsky [Mon, 22 Sep 2025 10:17:16 +0000 (12:17 +0200)] 
x509: fix mem leak on error path

The x509_store_add() creates X509_OBJECT wrapping either X509 or
X509_CRL. However, if you set the type to X509_LU_NONE before
X509_OBJECT_free then it skips the free on the wrapped type and just
calls OPENSSL_free on the object itself. Hence, leaking wrapped
object.

Signed-off-by: Nikola Pajkovsky <nikolap@openssl.org>
Reviewed-by: Matt Caswell <matt@openssl.org>
Reviewed-by: Tomas Mraz <tomas@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/28631)

6 weeks agoRe-enable the ssl_trace_test()
Tomas Mraz [Sat, 20 Sep 2025 14:53:46 +0000 (16:53 +0200)] 
Re-enable the ssl_trace_test()

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

6 weeks agosslapitest.c: Skip test_ssl_trace() with FIPS providers older than 3.5
Tomas Mraz [Sat, 20 Sep 2025 14:52:07 +0000 (16:52 +0200)] 
sslapitest.c: Skip test_ssl_trace() with FIPS providers older than 3.5

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

6 weeks agotls_common.c: Handle inner content type properly on Big Endian
Tomas Mraz [Sat, 20 Sep 2025 14:45:50 +0000 (16:45 +0200)] 
tls_common.c: Handle inner content type properly on Big Endian

When passing the inner content type to msg_callback,
the lowest byte of rec->type needs to be passed instead
of directly passing the rec->type otherwise the value is
incorrect on Big Endian platforms.

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

6 weeks agoFix the abnormal branch memory leak in ssl_set_cert_and_key function
lan1120 [Fri, 19 Sep 2025 10:45:30 +0000 (18:45 +0800)] 
Fix the abnormal branch memory leak in ssl_set_cert_and_key function

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

6 weeks agoEnsure q variable is freed
Nikola Pajkovsky [Thu, 18 Sep 2025 06:56:44 +0000 (08:56 +0200)] 
Ensure q variable is freed

Fixes: d88c43a64408 ("Ensure that empty or 1 element stacks are always sorted.")
Resolves: https://scan5.scan.coverity.com/#/project-view/65138/10222?selectedIssue=1665465
Signed-off-by: Nikola Pajkovsky <nikolap@openssl.org>
Reviewed-by: Matt Caswell <matt@openssl.org>
Reviewed-by: Kurt Roeckx <kurt@roeckx.be>
Reviewed-by: Paul Dale <ppzgs1@gmail.com>
Reviewed-by: Tomas Mraz <tomas@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/28596)

6 weeks agoCorrect version used to check for elf_aux_info() on FreeBSD
Brad Smith [Wed, 17 Sep 2025 03:16:48 +0000 (23:16 -0400)] 
Correct version used to check for elf_aux_info() on FreeBSD

FreeBSD also added elf_aux_info() to the 11 branch and was shipped
with 11.4.

https://github.com/freebsd/freebsd-src/commit/03444a7d439755189e4dc8ccd56403bbaef3d6b0

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

6 weeks agobio_ok.c: Integer Overflow in BIO_f_reliable record parser leads to Out-of-Bounds...
Luigino Camastra [Wed, 10 Sep 2025 10:13:11 +0000 (12:13 +0200)] 
bio_ok.c: Integer Overflow in BIO_f_reliable record parser leads to Out-of-Bounds Read

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

6 weeks agoAdded test suggested by Shane Lontis
Viktor Dukhovni [Mon, 22 Sep 2025 05:02:28 +0000 (15:02 +1000)] 
Added test suggested by Shane Lontis

Reviewed-by: Paul Dale <ppzgs1@gmail.com>
Reviewed-by: Tom Cosgrove <tom.cosgrove@arm.com>
Reviewed-by: Shane Lontis <shane.lontis@oracle.com>
(Merged from https://github.com/openssl/openssl/pull/28624)

6 weeks agoHarden property put_str() helper corner case
Viktor Dukhovni [Sat, 20 Sep 2025 04:02:52 +0000 (14:02 +1000)] 
Harden property put_str() helper corner case

The put_str() helper of the internal ossl_property_list_to_string()
function failed to correctly check the remaining buffer length in a
corner case in which a property name or string value needs quoting,
and exactly one byte of unused space remained in the output buffer.

The only potentially affected calling code is conditionally compiled
(disabled by default) provider "QUERY" tracing that is executed only
when also requested at runtime.  An initial fragment of the property
list encoding would need to use up exactly 511 bytes, leaving just 1
byte for the next string which requires quoting.  Bug reported by

    Aniruddhan Murali (@ashamedbit)
    Noble Saji Mathews (@NobleMathews)

both from the University of Waterloo.

Reviewed-by: Paul Dale <ppzgs1@gmail.com>
Reviewed-by: Tom Cosgrove <tom.cosgrove@arm.com>
Reviewed-by: Shane Lontis <shane.lontis@oracle.com>
(Merged from https://github.com/openssl/openssl/pull/28624)

6 weeks agoAdd unsupported features in NOTES-C99.md: complex.h and variable length array
Richard Levitte [Thu, 18 Sep 2025 11:22:47 +0000 (13:22 +0200)] 
Add unsupported features in NOTES-C99.md: complex.h and variable length array

Resolves: https://github.com/openssl/openssl/issues/28598

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

6 weeks agoMake generated files read-only
Richard Levitte [Thu, 18 Sep 2025 15:12:33 +0000 (17:12 +0200)] 
Make generated files read-only

This is an attempt to discouraged manual changes of generated files,
as people have done so, just to get their changes over-written next
time those files are re-generated.

Reference: https://github.com/openssl/openssl/discussions/28269

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

6 weeks agoFix OPENSSL_VERSION_NUMBER to always have zero status bits
Richard Levitte [Thu, 18 Sep 2025 05:14:13 +0000 (07:14 +0200)] 
Fix OPENSSL_VERSION_NUMBER to always have zero status bits

The documentation suggested that they were always zero, while the
implementation in <openssl/opensslv.h> suggested that it could be
0xf in OpenSSL releases...  which (almost) never happened because
of a bug in said implementation.

Therefore, we solidify that the status bits are indeed always zero,
at least in all OpenSSL 3 versions.

Resolves: https://github.com/openssl/project/issues/1621

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

7 weeks agoFix CI Pipeline by Disabling SSL_TRACE_TEST
Ryan Hooper [Fri, 19 Sep 2025 15:33:09 +0000 (11:33 -0400)] 
Fix CI Pipeline by Disabling SSL_TRACE_TEST

Disabling the SSL_TRACE_TEST since it caused an issue on
some cross compiles. A follow-on commit will change
the test.

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

7 weeks agoFix another memory order issue
Bernd Edlinger [Mon, 15 Sep 2025 19:12:37 +0000 (21:12 +0200)] 
Fix another memory order issue

this adds another release/acquire link between update_qp and
get_hold_current_qp via the reader_idx because the current
one which is based on the qp users count is only preventing
a race condition, but does not help when the reader acquires
the next qp.

Fixes #27267

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

7 weeks agoFix ML-KEM key equality check when either unset
Viktor Dukhovni [Tue, 16 Sep 2025 12:40:32 +0000 (22:40 +1000)] 
Fix ML-KEM key equality check when either unset

Fixes #28563

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

7 weeks agoRevert "rsa: expose pairwise consistency test API"
Eugene Syromiatnikov [Mon, 15 Sep 2025 20:55:59 +0000 (22:55 +0200)] 
Revert "rsa: expose pairwise consistency test API"

This reverts commit dc5cd6f70a0e "rsa: expose pairwise consistency test API",
that has introduced ossl_rsa_key_pairwise_test() function, as the only user
has been removed in 7f7f75816f26 "import pct: remove import PCTs for most
algorithms".

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: Richard Levitte <levitte@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/28557)