]> git.ipfire.org Git - thirdparty/openssl.git/log
thirdparty/openssl.git
2 months agorsa: add security category support
Pauli [Tue, 6 May 2025 03:18:48 +0000 (13:18 +1000)] 
rsa: add security category support

Reviewed-by: Shane Lontis <shane.lontis@oracle.com>
Reviewed-by: Dmitry Belyavskiy <beldmit@gmail.com>
(Merged from https://github.com/openssl/openssl/pull/27571)

2 months agoml-kem: add security category support
Pauli [Tue, 6 May 2025 01:33:14 +0000 (11:33 +1000)] 
ml-kem: add security category support

Reviewed-by: Shane Lontis <shane.lontis@oracle.com>
Reviewed-by: Dmitry Belyavskiy <beldmit@gmail.com>
(Merged from https://github.com/openssl/openssl/pull/27571)

2 months agoml-dsa: add security category support
Pauli [Tue, 6 May 2025 01:32:48 +0000 (11:32 +1000)] 
ml-dsa: add security category support

Reviewed-by: Shane Lontis <shane.lontis@oracle.com>
Reviewed-by: Dmitry Belyavskiy <beldmit@gmail.com>
(Merged from https://github.com/openssl/openssl/pull/27571)

2 months agoecx/ml-kem: add security category support
Pauli [Tue, 6 May 2025 03:34:33 +0000 (13:34 +1000)] 
ecx/ml-kem: add security category support

Reviewed-by: Shane Lontis <shane.lontis@oracle.com>
Reviewed-by: Dmitry Belyavskiy <beldmit@gmail.com>
(Merged from https://github.com/openssl/openssl/pull/27571)

2 months agoecx: add security category support
Pauli [Tue, 6 May 2025 03:08:37 +0000 (13:08 +1000)] 
ecx: add security category support

Reviewed-by: Shane Lontis <shane.lontis@oracle.com>
Reviewed-by: Dmitry Belyavskiy <beldmit@gmail.com>
(Merged from https://github.com/openssl/openssl/pull/27571)

2 months agoec: add security category support
Pauli [Tue, 6 May 2025 03:36:13 +0000 (13:36 +1000)] 
ec: add security category support

Reviewed-by: Shane Lontis <shane.lontis@oracle.com>
Reviewed-by: Dmitry Belyavskiy <beldmit@gmail.com>
(Merged from https://github.com/openssl/openssl/pull/27571)

2 months agodsa: add security category support
Pauli [Tue, 6 May 2025 03:51:39 +0000 (13:51 +1000)] 
dsa: add security category support

Reviewed-by: Shane Lontis <shane.lontis@oracle.com>
Reviewed-by: Dmitry Belyavskiy <beldmit@gmail.com>
(Merged from https://github.com/openssl/openssl/pull/27571)

2 months agodh: add security category support
Pauli [Tue, 6 May 2025 03:18:34 +0000 (13:18 +1000)] 
dh: add security category support

Reviewed-by: Shane Lontis <shane.lontis@oracle.com>
Reviewed-by: Dmitry Belyavskiy <beldmit@gmail.com>
(Merged from https://github.com/openssl/openssl/pull/27571)

2 months agoevp_test: support security-category for public key operations
Pauli [Tue, 6 May 2025 01:32:21 +0000 (11:32 +1000)] 
evp_test: support security-category for public key operations

Reviewed-by: Shane Lontis <shane.lontis@oracle.com>
Reviewed-by: Dmitry Belyavskiy <beldmit@gmail.com>
(Merged from https://github.com/openssl/openssl/pull/27571)

2 months agodoc: document the security category param for pkeys
Pauli [Tue, 6 May 2025 02:09:53 +0000 (12:09 +1000)] 
doc: document the security category param for pkeys

Reviewed-by: Shane Lontis <shane.lontis@oracle.com>
Reviewed-by: Dmitry Belyavskiy <beldmit@gmail.com>
(Merged from https://github.com/openssl/openssl/pull/27571)

2 months agoAdd security-category param name
Pauli [Tue, 6 May 2025 01:32:01 +0000 (11:32 +1000)] 
Add security-category param name

Reviewed-by: Shane Lontis <shane.lontis@oracle.com>
Reviewed-by: Dmitry Belyavskiy <beldmit@gmail.com>
(Merged from https://github.com/openssl/openssl/pull/27571)

2 months agoquic-interop-ci: Fix docker install
Norbert Pocs [Thu, 22 May 2025 12:39:21 +0000 (14:39 +0200)] 
quic-interop-ci: Fix docker install

Signed-off-by: Norbert Pocs <norbertp@openssl.org>
Reviewed-by: Tomas Mraz <tomas@openssl.org>
Reviewed-by: Neil Horman <nhorman@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/27687)

2 months agoAdd more instructions in HACKING.md
Richard Levitte [Wed, 21 May 2025 06:22:50 +0000 (08:22 +0200)] 
Add more instructions in HACKING.md

It's been long since it was updated or refined, and it was a bit too
vague in certain areas.

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

2 months agoAvoid leaking duplicated EVP_PKEY_CTX in case of error
Tomas Mraz [Thu, 22 May 2025 14:22:13 +0000 (16:22 +0200)] 
Avoid leaking duplicated EVP_PKEY_CTX in case of error

Fixes Coverity 1647946 1647947

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

(cherry picked from commit 240228979b92b5f45d5c0a42997d86755c850001)

2 months agoFix memory leaks after failure of PKCS7_add_signed_attribute()
widneve [Tue, 20 May 2025 14:23:09 +0000 (16:23 +0200)] 
Fix memory leaks after failure of PKCS7_add_signed_attribute()

If PKCS7_add_signed_attribute fails,
seq never escapes out of the callee and will
therefore result in a memory leak.
This is similar to ed3d277127.

CLA: trivial

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

2 months agoUpdated Windows notes on the use of “no-makedepend” for new builds
klaus triendl [Sat, 12 Apr 2025 08:26:34 +0000 (11:26 +0300)] 
Updated Windows notes on the use of “no-makedepend” for new builds

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

2 months agoquic-interop-ci: Fix failing CI
Norbert Pocs [Wed, 21 May 2025 18:02:57 +0000 (20:02 +0200)] 
quic-interop-ci: Fix failing CI

The issue was a flaky "impossible to reach server" in the CI.

The issue was caused by introduction of indeterminism to docker
networking (docker engine v28.0) and docker compose is affected by that
since v2.33.1.

Using constant network interface names solves the issue. The
"interface_name" was introduced in docker compose v2.36.0.

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

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

2 months agoapps/x509.c: Fix the -addreject option adding trust instead of rejection
Tomas Mraz [Tue, 20 May 2025 14:34:10 +0000 (16:34 +0200)] 
apps/x509.c: Fix the -addreject option adding trust instead of rejection

Fixes CVE-2025-4575

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

2 months agoUpdate pkcs11-provider submodule
Ondrej Moris [Thu, 17 Apr 2025 02:17:41 +0000 (04:17 +0200)] 
Update pkcs11-provider submodule

Signed-off-by: Ondrej Moris <omoris@redhat.com>
Reviewed-by: Dmitry Belyavskiy <beldmit@gmail.com>
Reviewed-by: Tomas Mraz <tomas@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/27602)

2 months agotest: reduce the scope of pkcs11-provider external test
Ondrej Moris [Wed, 16 Apr 2025 16:03:35 +0000 (18:03 +0200)] 
test: reduce the scope of pkcs11-provider external test

To ease maintenance and improve reliability of pkcs11-provider
external test we only want it to run with kryoptic token.

Signed-off-by: Ondrej Moris <omoris@redhat.com>
Reviewed-by: Dmitry Belyavskiy <beldmit@gmail.com>
Reviewed-by: Tomas Mraz <tomas@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/27602)

2 months agotest: skip tlsfuzzer tests pkcs11-provider test
Ondrej Moris [Tue, 4 Mar 2025 05:36:56 +0000 (06:36 +0100)] 
test: skip tlsfuzzer tests pkcs11-provider test

Tlsfuzzer tests in pkcs11-provider external test currently uses hard-coded
lists of TLS 1.3 signature algorithms expected from openssl. However, openssl
neither promises a fixed default set of the signature algorithms nor promises
a fixed default ordering ofthese algorithms and hence test might fail
eventually even though there is nothing wrong anywhere.

Signed-off-by: Ondrej Moris <omoris@redhat.com>
Reviewed-by: Dmitry Belyavskiy <beldmit@gmail.com>
Reviewed-by: Tomas Mraz <tomas@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/27602)

2 months agoci: run all non-external tests on fedora:latest
Ondrej Moris [Sat, 17 May 2025 23:03:09 +0000 (01:03 +0200)] 
ci: run all non-external tests on fedora:latest

Before pkcs11-provider external test runs, we run all
non-external tests since we want to make sure they work
fine on fedora:latest container.

Signed-off-by: Ondrej Moris <omoris@redhat.com>
Reviewed-by: Dmitry Belyavskiy <beldmit@gmail.com>
Reviewed-by: Tomas Mraz <tomas@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/27602)

2 months agoci: run pkcs11-provider external test on Fedora
Ondrej Moris [Wed, 16 Apr 2025 16:03:24 +0000 (18:03 +0200)] 
ci: run pkcs11-provider external test on Fedora

We want to be able to run pkcs11-provider external test with
kryoptic token that is currently only available on Fedora.
Therefore we have to separate the test from the external test
for oqs provider.

Signed-off-by: Ondrej Moris <omoris@redhat.com>
Reviewed-by: Dmitry Belyavskiy <beldmit@gmail.com>
Reviewed-by: Tomas Mraz <tomas@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/27602)

2 months agoci: re-enable pkcs11-provider external test
Ondrej Moris [Mon, 7 Apr 2025 14:31:38 +0000 (16:31 +0200)] 
ci: re-enable pkcs11-provider external test

Signed-off-by: Ondrej Moris <omoris@redhat.com>
Reviewed-by: Dmitry Belyavskiy <beldmit@gmail.com>
Reviewed-by: Tomas Mraz <tomas@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/27602)

2 months agocrypto/evp/signature.c: add checks for consistent presence of 'update' and 'final...
Dr. David von Oheimb [Wed, 16 Apr 2025 04:20:23 +0000 (06:20 +0200)] 
crypto/evp/signature.c: add checks for consistent presence of 'update' and 'final' functions

Reviewed-by: Nicola Tuveri <nic.tuv@gmail.com>
Reviewed-by: Tomas Mraz <tomas@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/27367)

2 months agoprovider-signature.pod: add missing doc of OSSL_FUNC_signature_query_key_types()...
Dr. David von Oheimb [Mon, 14 Apr 2025 14:05:01 +0000 (16:05 +0200)] 
provider-signature.pod: add missing doc of OSSL_FUNC_signature_query_key_types(), fix doc of return types, etc.

Reviewed-by: Nicola Tuveri <nic.tuv@gmail.com>
Reviewed-by: Tomas Mraz <tomas@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/27367)

2 months agocrypto/evp/signature.c: add more specific diagnostic data in case provider does not...
Dr. David von Oheimb [Mon, 14 Apr 2025 14:03:00 +0000 (16:03 +0200)] 
crypto/evp/signature.c: add more specific diagnostic data in case provider does not implement functions needed

Reviewed-by: Nicola Tuveri <nic.tuv@gmail.com>
Reviewed-by: Tomas Mraz <tomas@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/27367)

2 months agocrypto/evp/signature.c: compensate for providers not adding error queue entries on...
Dr. David von Oheimb [Mon, 14 Apr 2025 14:01:30 +0000 (16:01 +0200)] 
crypto/evp/signature.c: compensate for providers not adding error queue entries on operation failure

Reviewed-by: Nicola Tuveri <nic.tuv@gmail.com>
Reviewed-by: Tomas Mraz <tomas@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/27367)

2 months agocrypto/evp: compensate for providers not adding error queue entries for keymgmt,...
Dr. David von Oheimb [Sun, 13 Apr 2025 05:25:46 +0000 (07:25 +0200)] 
crypto/evp: compensate for providers not adding error queue entries for keymgmt, sigver, and asymcipher

Reviewed-by: Nicola Tuveri <nic.tuv@gmail.com>
Reviewed-by: Tomas Mraz <tomas@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/27367)

2 months agostore_result.c: add to error queue which provider failed to load credential and hint...
Dr. David von Oheimb [Sun, 13 Apr 2025 05:28:08 +0000 (07:28 +0200)] 
store_result.c: add to error queue which provider failed to load credential and hint on using default provider

Reviewed-by: Nicola Tuveri <nic.tuv@gmail.com>
Reviewed-by: Tomas Mraz <tomas@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/27367)

2 months ago80-test_cms.t: Fix indentation by replacing tabs with spaces
Jan Luebbe [Thu, 8 May 2025 13:59:40 +0000 (15:59 +0200)] 
80-test_cms.t: Fix indentation by replacing tabs with spaces

Reviewed-by: Paul Yang <kaishen.yy@antfin.com>
Reviewed-by: Tomas Mraz <tomas@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/27590)

2 months agoFix some typos in the man pages
Jan Luebbe [Fri, 9 May 2025 07:56:26 +0000 (09:56 +0200)] 
Fix some typos in the man pages

Reviewed-by: Paul Yang <kaishen.yy@antfin.com>
Reviewed-by: Tomas Mraz <tomas@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/27590)

2 months agoThe condition that is never checked has been removed.
Dmitriy Denisov [Tue, 13 May 2025 08:56:33 +0000 (11:56 +0300)] 
The condition that is never checked has been removed.
If criterion == OSSL_STORE_SEARCH_BY_KEY_FINGERPRINT, the criterion !=0 condition will be triggered.

Found by Linux Verification Center (linuxtesting.org) with SVACE.

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

2 months agoCheck NASM version for {vex} prefix support
Zhiguo Zhou [Wed, 14 May 2025 14:30:47 +0000 (22:30 +0800)] 
Check NASM version for {vex} prefix support

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

2 months agoRemove redundant space in effective address
Zhiguo Zhou [Wed, 14 May 2025 12:39:01 +0000 (20:39 +0800)] 
Remove redundant space in effective address

To have effective address of vmovapd instruction recognized and
translated to Intel format by the x86_64 assembler translator.

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

2 months agoPick up {vex} in x86_64 assembler translator
Zhiguo Zhou [Wed, 14 May 2025 12:35:43 +0000 (20:35 +0800)] 
Pick up {vex} in x86_64 assembler translator

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

2 months agoapps/prime.c: Remove unused assignment
Norbert Pocs [Fri, 16 May 2025 09:09:51 +0000 (11:09 +0200)] 
apps/prime.c: Remove unused assignment

The variable is never read after the assignment.

Coverity issue: 1646789

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

2 months agodemos/bio/sconnect.c: Free ssl_bio on error to avoid memory leak
JiashengJiang [Fri, 16 May 2025 13:37:48 +0000 (09:37 -0400)] 
demos/bio/sconnect.c: Free ssl_bio on error to avoid memory leak

Call BIO_free() to release ssl_bio if an error occurs before BIO_push(), preventing a memory leak.

Fixes: 396e720965 ("Fix certificate validation for IPv6 literals in sconnect demo")
Signed-off-by: JiashengJiang <jiasheng@purdue.edu>
Reviewed-by: Tom Cosgrove <tom.cosgrove@arm.com>
Reviewed-by: Tomas Mraz <tomas@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/27639)

2 months agocrypto/x509/v3_lib.c: Free tmpext if X509V3_EXT_add() fails to avoid memory leak
JiashengJiang [Mon, 5 May 2025 17:46:53 +0000 (13:46 -0400)] 
crypto/x509/v3_lib.c: Free tmpext if X509V3_EXT_add() fails to avoid memory leak

Add OPENSSL_free to free tmpext if X509V3_EXT_add() fails to avoid memory leak.

Fixes: 878dc8dd95 ("Join the x509 and x509v3 directories")
Signed-off-by: JiashengJiang <jiasheng@purdue.edu>
Reviewed-by: Tom Cosgrove <tom.cosgrove@arm.com>
Reviewed-by: Tomas Mraz <tomas@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/27566)

2 months agoWorkaround for issue with assembler on OS X 10.4
ztp6893 [Mon, 10 Mar 2025 04:00:48 +0000 (00:00 -0400)] 
Workaround for issue with assembler on OS X 10.4

Local labels cannot be used in some circumstances as they might
be pointing to wrong locations.

Reviewed-by: Tim Hudson <tjh@openssl.org>
Reviewed-by: Neil Horman <nhorman@openssl.org>
Reviewed-by: Bernd Edlinger <bernd.edlinger@hotmail.de>
(Merged from https://github.com/openssl/openssl/pull/27017)

2 months agoFix AIX build in test/radix/quic_tests.c
sashan [Fri, 11 Apr 2025 20:46:10 +0000 (22:46 +0200)] 
Fix AIX build in test/radix/quic_tests.c

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

2 months agoFix build failure on AIX
sashan [Fri, 11 Apr 2025 15:42:31 +0000 (17:42 +0200)] 
Fix build failure on AIX

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

2 months agossl/t1_lib.c: Free gix if sk_TLS_GROUP_IX_push() fails to avoid memory leak
JiashengJiang [Mon, 5 May 2025 18:07:54 +0000 (14:07 -0400)] 
ssl/t1_lib.c: Free gix if sk_TLS_GROUP_IX_push() fails to avoid memory leak

Add OPENSSL_free() to free gix if sk_TLS_GROUP_IX_push() fails to avoid memory leak

Fixes: 4b1c73d2dd ("ML-KEM hybrids for TLS")
Signed-off-by: JiashengJiang <jiasheng@purdue.edu>
Reviewed-by: Tom Cosgrove <tom.cosgrove@arm.com>
Reviewed-by: Viktor Dukhovni <viktor@openssl.org>
Reviewed-by: Tomas Mraz <tomas@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/27568)

2 months agodemos/guide/tls-client-block.c Spelling correction
Benson Muite [Tue, 13 May 2025 15:52:22 +0000 (18:52 +0300)] 
demos/guide/tls-client-block.c Spelling correction

Fix spelling error in one word.

CLA: trivial

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

2 months agos3_lib.c: Use illegal_parameter for failing encapsulation in ml_kem
Norbert Pocs [Thu, 15 May 2025 07:53:00 +0000 (09:53 +0200)] 
s3_lib.c: Use illegal_parameter for failing encapsulation in ml_kem

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: Tomas Mraz <tomas@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/27627)

2 months agoFix trace output for provider algorithm names
Ilie Halip [Wed, 14 May 2025 14:40:21 +0000 (17:40 +0300)] 
Fix trace output for provider algorithm names

Use the index variable to print out the provider algorithm details.

CLA: trivial

Signed-off-by: Ilie Halip <ilie.halip@nxp.com>
Reviewed-by: Paul Yang <kaishen.yy@antfin.com>
Reviewed-by: Richard Levitte <levitte@openssl.org>
Reviewed-by: Tomas Mraz <tomas@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/27624)

2 months agoprime.c: Remove uneeded if check for NULL value
Norbert Pocs [Wed, 14 May 2025 13:52:56 +0000 (15:52 +0200)] 
prime.c: Remove uneeded if check for NULL value

This was reported by coverity scan issue 1646789

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

2 months agocipher_chacha20_poly1305.c: Remove unneeded check
Norbert Pocs [Wed, 14 May 2025 13:59:24 +0000 (15:59 +0200)] 
cipher_chacha20_poly1305.c: Remove unneeded check

This iterates through the given param list which means the param p
should always be present in the given array.

Resolves coverity scan issue 1646880.

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

2 months agoconfigutl.c: Resolve possible resource leak of config file
Norbert Pocs [Wed, 14 May 2025 12:50:42 +0000 (14:50 +0200)] 
configutl.c: Resolve possible resource leak of config file

The coverity detects Resource leak here. It may come to leak when the
option is passed multiple times.

Resolve coverity scan issue 1646846

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

2 months agoconfigutl.c: Remove dead code
Norbert Pocs [Wed, 14 May 2025 12:53:31 +0000 (14:53 +0200)] 
configutl.c: Remove dead code

Resolve coverity issue 16468481646847

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

2 months agoAdd NULL check in ossl_quic_get_peer_token
Neil Horman [Tue, 13 May 2025 14:48:05 +0000 (10:48 -0400)] 
Add NULL check in ossl_quic_get_peer_token

If a peer address hasn't been set on a quic channel yet, we will not
yield a token from our hashtable of available tokens.  Fail the
get_peer_token lookup in that event

Fixes #27608

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

2 months agos3_lib.c: Handle weak x keys as illegal_parameter alert
Norbert Pocs [Sun, 11 May 2025 15:36:05 +0000 (17:36 +0200)] 
s3_lib.c: Handle weak x keys as illegal_parameter alert

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

2 months agoAPPS/x509: add -multi option for outputting all certs found in input
Jeremy Doupe [Thu, 10 Apr 2025 15:19:31 +0000 (10:19 -0500)] 
APPS/x509: add -multi option for outputting all certs found in input

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

2 months agod2i_X509.pod: add missing doc of return value of i2d_ASN1_bio_stream()
Dr. David von Oheimb [Mon, 14 Apr 2025 09:20:18 +0000 (11:20 +0200)] 
d2i_X509.pod: add missing doc of return value of i2d_ASN1_bio_stream()

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

2 months agoasn_mime.c multi_split(): add missing I/O error checking
Dr. David von Oheimb [Mon, 14 Apr 2025 09:59:00 +0000 (11:59 +0200)] 
asn_mime.c multi_split(): add missing I/O error checking

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

2 months agoSMIME_text(): add missing I/O error checking
Dr. David von Oheimb [Mon, 14 Apr 2025 09:52:11 +0000 (11:52 +0200)] 
SMIME_text(): add missing I/O error checking

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

2 months agoSMIME_crlf_copy(): add missing I/O error checking
Dr. David von Oheimb [Mon, 14 Apr 2025 09:43:29 +0000 (11:43 +0200)] 
SMIME_crlf_copy(): add missing I/O error checking

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

2 months agoPEM_write_bio_ASN1_stream(): complete I/O error checking
Dr. David von Oheimb [Mon, 14 Apr 2025 09:22:30 +0000 (11:22 +0200)] 
PEM_write_bio_ASN1_stream(): complete I/O error checking

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

2 months agoapps/cms.c: add failure handling for I/O errors of 'BIO_printf(out, ...)'
Dr. David von Oheimb [Mon, 14 Apr 2025 09:10:52 +0000 (11:10 +0200)] 
apps/cms.c: add failure handling for I/O errors of 'BIO_printf(out, ...)'

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

2 months agoapps/cms.c: clarify treatment of 'ret' variable in cms_main()
Dr. David von Oheimb [Sun, 13 Apr 2025 08:00:15 +0000 (10:00 +0200)] 
apps/cms.c: clarify treatment of 'ret' variable in cms_main()

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

2 months agoapps/cms.c: remove needless ERR_print_errors() calls
Dr. David von Oheimb [Sun, 13 Apr 2025 07:59:07 +0000 (09:59 +0200)] 
apps/cms.c: remove needless ERR_print_errors() calls

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

2 months agoapps/cms.c: add missing error messages in various error cases
Dr. David von Oheimb [Sun, 13 Apr 2025 07:58:06 +0000 (09:58 +0200)] 
apps/cms.c: add missing error messages in various error cases

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

2 months agofix asn1_write_micalg() in asn_mime.c on GostR3411 and SHAKE, also return 0 on I...
Dr. David von Oheimb [Sun, 13 Apr 2025 15:21:27 +0000 (17:21 +0200)] 
fix asn1_write_micalg() in asn_mime.c on GostR3411 and SHAKE, also return 0 on I/O errors

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

2 months agoSMIME_write_ASN1_ex() used for CMS: add error checking for calls to BIO_printf()...
Dr. David von Oheimb [Sun, 13 Apr 2025 07:52:15 +0000 (09:52 +0200)] 
SMIME_write_ASN1_ex() used for CMS: add error checking for calls to BIO_printf(), BIO_puts(), and asn1_write_micalg()

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

2 months agoapps/cms.c: add missing error message on error writing CMS output (ret == 6)
Dr. David von Oheimb [Mon, 14 Apr 2025 18:08:54 +0000 (20:08 +0200)] 
apps/cms.c: add missing error message on error writing CMS output (ret == 6)

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

2 months agoReturn SLH-DSA public key when requested
Simo Sorce [Mon, 12 May 2025 18:40:29 +0000 (14:40 -0400)] 
Return SLH-DSA public key when requested

Signed-off-by: Simo Sorce <simo@redhat.com>
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/27605)

2 months agoReturn ML-DSA public key when requested
Simo Sorce [Mon, 12 May 2025 18:39:58 +0000 (14:39 -0400)] 
Return ML-DSA public key when requested

Signed-off-by: Simo Sorce <simo@redhat.com>
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/27605)

2 months agochacha_poly: use TRIE based param name decoder
Pauli [Wed, 30 Apr 2025 04:47:43 +0000 (14:47 +1000)] 
chacha_poly: use TRIE based param name decoder

Converted to using a TRIE based param name decoder to improve
performance.

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

2 months agotest/testutil/testutil_init.c: Add OPENSSL_free() to avoid memory leak
JiashengJiang [Mon, 12 May 2025 14:02:05 +0000 (10:02 -0400)] 
test/testutil/testutil_init.c: Add OPENSSL_free() to avoid memory leak

Free trace_data if error occurs to avoid memory leak.

Fixes: d73458d17a ("Add tracing capability in test utilities")
Signed-off-by: JiashengJiang <jiasheng@purdue.edu>
Reviewed-by: Paul Dale <ppzgs1@gmail.com>
Reviewed-by: Tomas Mraz <tomas@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/27600)

2 months agoStop a TLSv1.3 server emitting an unsolicited PSK extension
Matt Caswell [Thu, 8 May 2025 13:54:35 +0000 (14:54 +0100)] 
Stop a TLSv1.3 server emitting an unsolicited PSK extension

If we attempt to accept a connection on an SSL object, and the
application has set an SSL_SESSION on that SSL object then we
can mistakenly believe that we are resuming and
emit an unsolicited PSK extension back to the client.

This can especially happen when using SSL_clear() which leaves
any SSL_SESSION associated with the SSL object.

See
https://github.com/openssl/openssl/discussions/27563#discussioncomment-13049352
and
https://github.com/openssl/openssl/discussions/24567

Reviewed-by: Todd Short <todd.short@me.com>
Reviewed-by: Tomas Mraz <tomas@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/27584)

2 months agostatem_srvr.c: Add check for empty ecdhe encoded key
Norbert Pocs [Fri, 9 May 2025 09:48:17 +0000 (11:48 +0200)] 
statem_srvr.c: Add check for empty ecdhe encoded key

The RFC definition about the errors is very vague. The TLSv1.3 RFC is a
bit more specific about decode_error (but if this specific case goes for
decode_error or illegal parameter is still debatable):

```
 decode_error:  A message could not be decoded because some field was
      out of the specified range or the length of the message was
      incorrect.  This alert is used for errors where the message does
      not conform to the formal protocol syntax.  This alert should
      never be observed in communication between proper implementations,
      except when messages were corrupted in the network.
```

Thank you @GeorgePantelakis for reporting this issue!

Resolves: #27530

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

2 months agoAPPS/cmp.c: fix char encoding of subject, issuer, sender, and recipient DN
Dr. David von Oheimb [Fri, 9 May 2025 09:44:57 +0000 (11:44 +0200)] 
APPS/cmp.c: fix char encoding of subject, issuer, sender, and recipient DN

Fixes #27572

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

2 months agoCheck rand_meth_lock existence before trying to lock it
Jakub Zelenka [Sat, 22 Mar 2025 11:04:23 +0000 (12:04 +0100)] 
Check rand_meth_lock existence before trying to lock it

There are situations during exit clean up where dependent libraries
might be using TLS to finalize stuff but that might crash because
the rand_meth_lock can get freed and there is still an attempt to
get rand bytes. This change makes sure that things fail nicely.

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

2 months agoRaise an error if PBKDF2 iteration count set to zero on check disabled in default...
pohsingwu [Fri, 9 May 2025 07:26:35 +0000 (15:26 +0800)] 
Raise an error if PBKDF2 iteration count set to zero on check disabled in default provider

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

2 months agoAdd retry capability to apt commands in quic interop
Neil Horman [Thu, 24 Apr 2025 12:28:42 +0000 (08:28 -0400)] 
Add retry capability to apt commands in quic interop

We're getting more frequent overnight failures in quic interop due to
failing updates that appear transient when conducting apt installs

Add the capability to do retry commands here

Reviewed-by: Saša Nedvědický <sashan@openssl.org>
Reviewed-by: Tim Hudson <tjh@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/27489)

2 months agoSHA512/x86_64: Fix SIGSEGV on $avx=0 path
Stanciu, Adrian [Tue, 6 May 2025 17:24:36 +0000 (10:24 -0700)] 
SHA512/x86_64: Fix SIGSEGV on $avx=0 path

Fixes #27555

When $avx>1, codegen is:
    lea OPENSSL_ia32cap_P(%rip),%r10
    mov 0(%r10),%r9
    mov 8(%r10),%r11d
    mov 20(%r10),%r10d

When $avx is true, codegen was:
    lea OPENSSL_ia32cap_P(%rip),%r10
    mov 0(%r10),%r9
    mov 8(%r10),%r11d
    mov 20(%r10),%r10d    # not used by dispatcher

When $avx=0, codegen was:
    mov 20(%r10),%r10d    # %r10 not initalized, causing SIGSEGV

After fix, `mov 20(%r10),%r10d` is only included when $avx>1

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

2 months agotest/timing_load_creds.c: Free contents in error handling to avoid memory leak
JiashengJiang [Mon, 5 May 2025 18:52:40 +0000 (14:52 -0400)] 
test/timing_load_creds.c: Free contents in error handling to avoid memory leak

Add a call to OPENSSL_free() in the error handling path to ensure contents is properly freed and prevent a memory leak.

Fixes: 45479dcee1 ("test/timing_load_creds.c: fix coding style and other (mostly minor) issues")
Signed-off-by: JiashengJiang <jiasheng@purdue.edu>
Reviewed-by: Tomas Mraz <tomas@openssl.org>
Reviewed-by: Paul Dale <ppzgs1@gmail.com>
(Merged from https://github.com/openssl/openssl/pull/27570)

2 months agochacha_poly: fix settable ctx param list
Pauli [Wed, 30 Apr 2025 22:12:00 +0000 (08:12 +1000)] 
chacha_poly: fix settable ctx param list

The settable list used the generic AEAD cipher list which included
an extra parameter and omitted the IV length one.  The set ctx param call
was custom so the errant list didn't directly impact operation.

The comment about ignoring OSSL_CIPHER_PARAM_AEAD_MAC_KEY is completely bogus.
That parameter isn't accepted either here or by the shared AEAD cipher params.

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

(cherry picked from commit 1c63382294750c9111e23931dcd5637d60d1b6c4)

2 months agoUpdate IMPL_*_SIGALG to not have to stringify parameter
Neil Horman [Wed, 7 May 2025 12:58:30 +0000 (08:58 -0400)] 
Update IMPL_*_SIGALG to not have to stringify parameter

Noted while playing with some c-style tools that these macros got
mis-handled when doing style changes.  Specifically, the last parameter,
as it passed externally as a token, but stringified internal to the
associated macro, got handled as an arithmetic expression rather than a
string.

Given that the only thing this parameter is used for is as a string, cut
out the middle man and just pass it as a string in the first place

Reviewed-by: Saša Nedvědický <sashan@openssl.org>
Reviewed-by: Richard Levitte <levitte@openssl.org>
Reviewed-by: Tomas Mraz <tomas@openssl.org>
Reviewed-by: Matt Caswell <matt@openssl.org>
Reviewed-by: Paul Dale <ppzgs1@gmail.com>
Reviewed-by: Todd Short <todd.short@me.com>
(Merged from https://github.com/openssl/openssl/pull/27579)

2 months agoAdd a test for app data received too early
Matt Caswell [Fri, 2 May 2025 15:40:50 +0000 (16:40 +0100)] 
Add a test for app data received too early

Add a test for app data which was received prior to the Finished is read
correctly, and that if we continue to read we get the expected result.

Reviewed-by: Viktor Dukhovni <viktor@openssl.org>
Reviewed-by: Tomas Mraz <tomas@openssl.org>
Reviewed-by: Todd Short <todd.short@me.com>
(Merged from https://github.com/openssl/openssl/pull/27543)

2 months agoEnsure we properly release DTLS buffered app data records
Matt Caswell [Fri, 2 May 2025 15:37:32 +0000 (16:37 +0100)] 
Ensure we properly release DTLS buffered app data records

If we read an app data record before we have read the Finished we buffer
it. Once we've read it we need to make sure we've properly released it
otherwise we will attempt to read it again (and this time there will be
no data in it).

Fixes #27316

Reviewed-by: Viktor Dukhovni <viktor@openssl.org>
Reviewed-by: Tomas Mraz <tomas@openssl.org>
Reviewed-by: Todd Short <todd.short@me.com>
(Merged from https://github.com/openssl/openssl/pull/27543)

2 months agotest/bio_comp_test.c: Initialize pointer to avoid undefined behavior
JiashengJiang [Mon, 5 May 2025 18:23:38 +0000 (14:23 -0400)] 
test/bio_comp_test.c: Initialize pointer to avoid undefined behavior

If the allocation for "original" fails, "result" may be freed without being
properly initialized. Since result could hold a random value due to its
assignment in do_bio_comp_test(), freeing it without initialization is unsafe
and may lead to undefined behavior.

Fixes: 12e96a2360 ("Add brotli compression support (RFC7924)")
Signed-off-by: JiashengJiang <jiasheng@purdue.edu>
Reviewed-by: Paul Dale <ppzgs1@gmail.com>
Reviewed-by: Tom Cosgrove <tom.cosgrove@arm.com>
Reviewed-by: Tomas Mraz <tomas@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/27569)

2 months agoCHANGES/NEWS entries for configutl
Dmitry Belyavskiy [Mon, 28 Apr 2025 17:15:30 +0000 (19:15 +0200)] 
CHANGES/NEWS entries for configutl

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

2 months agoConfigutl tests
Dmitry Belyavskiy [Tue, 8 Apr 2025 13:33:23 +0000 (15:33 +0200)] 
Configutl tests

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

2 months agoconfigutl documentation
Dmitry Belyavskiy [Tue, 8 Apr 2025 09:15:28 +0000 (11:15 +0200)] 
configutl documentation

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

2 months agoUtility for dumping OpenSSL config file
Dmitry Belyavskiy [Mon, 7 Apr 2025 16:04:26 +0000 (18:04 +0200)] 
Utility for dumping OpenSSL config file

Based on @neverpanic code`

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

2 months agoFix memory management in port_make_channel
Matt Caswell [Mon, 5 May 2025 14:29:36 +0000 (15:29 +0100)] 
Fix memory management in port_make_channel

Also make port_new_handshake_layer processing clearer.

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

2 months agoAdd a test for sending an empty app data record in DTLS
Matt Caswell [Wed, 30 Apr 2025 12:09:58 +0000 (13:09 +0100)] 
Add a test for sending an empty app data record in DTLS

DTLS should ignore this

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

2 months agoDrop empty app data records in DTLS
Matt Caswell [Tue, 29 Apr 2025 13:21:49 +0000 (14:21 +0100)] 
Drop empty app data records in DTLS

App data records with 0 bytes of payload will confuse callers of SSL_read().
This will cause a successful read and return 0 bytes as read. Unfortunately
a 0 return from SSL_read() is considered a failure response. A subsequent
call to SSL_get_error() will then give the wrong result.

Zero length app data records are actually allowed by the spec, but have
never been handled correctly by OpenSSL. We already disallow creating such
empty app data records. Since the SSL_read() API does not have a good way to
handle this type of read, we simply ignore them.

Partial fix for #27316

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

2 months agoAlign PBKDF2 indicator behavior with other implementations
pohsingwu [Fri, 7 Mar 2025 16:43:29 +0000 (00:43 +0800)] 
Align PBKDF2 indicator behavior with other implementations

Fixes #26983

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

2 months agocrypto/provider_conf.c: Fix possible memory leak
JiashengJiang [Mon, 5 May 2025 01:41:39 +0000 (21:41 -0400)] 
crypto/provider_conf.c: Fix possible memory leak

Assign the return value of ossl_provider_info_add_to_store to added instead of
setting it directly to 1, in order to avoid a memory leak caused by entry not
being freed if ossl_provider_info_add_to_store() fails.

Signed-off-by: JiashengJiang <jiasheng@purdue.edu>
Reviewed-by: Matt Caswell <matt@openssl.org>
Reviewed-by: Tomas Mraz <tomas@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/27472)

2 months agoccm: update CCM mode ciphers to use the TRIE param name decoder for AEAD ciphers
Pauli [Thu, 17 Apr 2025 02:09:38 +0000 (12:09 +1000)] 
ccm: update CCM mode ciphers to use the TRIE param name decoder for AEAD ciphers

This brings the implementation in line with GCM which has had this capability
for a while.  It will improveme performance setting and retrieving the
authenticatoin tag.

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

2 months agogcm: use TRIE based param name decoder
Pauli [Wed, 16 Apr 2025 07:32:35 +0000 (17:32 +1000)] 
gcm: use TRIE based param name decoder

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

2 months agoAEAD params: generate a TRIE to decode AEAD cipher parameter names
Pauli [Wed, 16 Apr 2025 07:32:13 +0000 (17:32 +1000)] 
AEAD params: generate a TRIE to decode AEAD cipher parameter names

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

2 months agorename ciphercommon.c
Pauli [Wed, 16 Apr 2025 07:31:23 +0000 (17:31 +1000)] 
rename ciphercommon.c

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

2 months agoparams: update generation script to support multiple TRIE output
Pauli [Wed, 16 Apr 2025 07:12:59 +0000 (17:12 +1000)] 
params: update generation script to support multiple TRIE output

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

2 months agoparams: don't build removed file
Pauli [Wed, 16 Apr 2025 07:10:35 +0000 (17:10 +1000)] 
params: don't build removed file

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

2 months agoparams: don't build global param name TRIE
Pauli [Wed, 16 Apr 2025 07:05:43 +0000 (17:05 +1000)] 
params: don't build global param name TRIE

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

2 months agoFixed chacha20 get updated IV
cjf7669 [Thu, 3 Apr 2025 15:31:27 +0000 (11:31 -0400)] 
Fixed chacha20 get updated IV

Fixes #26998

Addresses an issue where the EVP_CIPHER_CTX_get_updated_iv() function
does not properly return the updated IV for the ChaCha20 cipher.
chacha20_get_ctx_params was updated to be sensitive to the
OSSL_CIPHER_PARAM_UPDATED_IV parameter.

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

2 months agoEnable AES and SHA3 optimisations on Qualcomm Snapdragon X systems
Aleksander Jan Bajkowski [Fri, 25 Apr 2025 13:30:50 +0000 (15:30 +0200)] 
Enable AES and SHA3 optimisations on Qualcomm Snapdragon X systems

For larger data blocks, AES gets performance gains of up to 26.5%,
and SHA3 up to 15%. Tested on a Dell 9345 with Snapdragon X1E-80-100.
Below are detailed data.

Before:
type             16 bytes     64 bytes    256 bytes   1024 bytes   8192 bytes  16384 bytes
AES-128-GCM     176805.90k   677599.17k  1932362.15k  4803628.03k  7696804.52k  8036674.22k
AES-192-GCM     178621.88k   673165.14k  1884515.41k  4690465.11k  7669383.17k  8021562.71k
AES-256-GCM     177187.09k   668302.19k  1843664.13k  4405732.35k  6911937.19k  7201800.19k
sha3-224         71694.30k   286854.87k   686716.67k   784932.86k   922643.11k   926182.06k
sha3-256         71997.70k   288208.13k   688777.98k   786555.22k   865192.62k   874643.46k
sha3-384         72167.35k   287085.80k   487257.00k   639260.33k   673180.33k   675108.18k
sha3-512         71581.52k   287953.09k   378381.31k   436353.02k   471433.22k   472804.01k

After:
type             16 bytes     64 bytes    256 bytes   1024 bytes   8192 bytes  16384 bytes
AES-128-GCM     177140.20k   674365.06k  1928108.37k  5285980.84k  9581854.72k 10167205.89k
AES-192-GCM     178512.57k   669584.09k  1890147.75k  5052911.96k  8831027.88k  9337787.73k
AES-256-GCM     177685.05k   664798.83k  1844782.17k  4816555.35k  8176435.20k  8592359.42k
sha3-224         71444.47k   286178.99k   747224.32k   911052.46k  1063985.15k  1067712.51k
sha3-256         71188.32k   285318.74k   746304.34k   903716.52k   984566.44k   997430.61k
sha3-384         71715.30k   285965.27k   546631.59k   733781.67k   766448.98k   768262.14k
sha3-512         70853.85k   284883.33k   427553.71k   489698.99k   520415.91k   520743.59k

Change:
type             16 bytes     64 bytes    256 bytes   1024 bytes   8192 bytes  16384 bytes
AES-128-GCM      +0.2 %       -0.5 %      -0.2 %      +10.0 %      +24.5 %     +26.5 %
AES-192-GCM      -0.1 %       -0.5 %      +0.3 %       +7.7 %      +15.1 %     +16.4 %
AES-256-GCM      +0.3 %       -0.5 %      +0.1 %       +9.3 %      +18.3 %     +19.3 %
sha3-224         -0.3 %       -0.2 %      +8.8 %      +16.1 %      +15.3 %     +15.3 %
sha3-256         -1.1 %       -1.0 %      +8.4 %      +14.9 %      +13.8 %     +14.0 %
sha3-384         -0.6 %       -0.4 %     +12.2 %      +14.8 %      +13.9 %     +13.8 %
sha3-512         -1.0 %       -1.1 %     +13.0 %      +12.2 %      +10.4 %     +10.1 %

Signed-off-by: Aleksander Jan Bajkowski <olek2@wp.pl>
Reviewed-by: Tomas Mraz <tomas@openssl.org>
Reviewed-by: Paul Dale <ppzgs1@gmail.com>
(Merged from https://github.com/openssl/openssl/pull/27503)