]> git.ipfire.org Git - thirdparty/openssl.git/log
thirdparty/openssl.git
7 months agotest: the attributeMappings X.509v3 extension
Jonathan M. Wilbur [Thu, 12 Dec 2024 02:14:41 +0000 (02:14 +0000)] 
test: the attributeMappings X.509v3 extension

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

7 months agofeat: support the attributeMappings X.509v3 extension
Jonathan M. Wilbur [Thu, 12 Dec 2024 02:10:25 +0000 (02:10 +0000)] 
feat: support the attributeMappings X.509v3 extension

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

7 months agoTake into account no_store when pushing algorithm
Dmitry Belyavskiy [Wed, 18 Dec 2024 20:28:14 +0000 (21:28 +0100)] 
Take into account no_store when pushing algorithm

When we put algorithm to the store, we have a fallback to the
OSSL_LIB_CTX level store when store is NULL.

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

7 months agoThis is a test for nocache provider behavior
Dmitry Belyavskiy [Tue, 17 Dec 2024 15:18:37 +0000 (16:18 +0100)] 
This is a test for nocache provider behavior

A follow-up to #26038

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

7 months agoossl_i2c_ASN1_BIT_STRING(): Fix a possible heap buffer overflow
Andrey Tsygunka [Tue, 26 Nov 2024 07:53:31 +0000 (10:53 +0300)] 
ossl_i2c_ASN1_BIT_STRING(): Fix a possible heap buffer overflow

When data contains only zero values a buffer overflow happens.

CLA: trivial

Signed-off-by: Andrey Tsygunka <aitsygunka@yandex.ru>
Reviewed-by: Tom Cosgrove <tom.cosgrove@arm.com>
Reviewed-by: Tomas Mraz <tomas@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/26190)

7 months agosafe_math.h: Check if __GNUC__ is defined
Kalavakolanu, Hema Anmisha [Wed, 18 Dec 2024 05:19:55 +0000 (10:49 +0530)] 
safe_math.h: Check if __GNUC__ is defined

REF:https://bugzilla.tianocore.org/show_bug.cgi?id=4880

Facing the below issue after openssl is upgraded

Edk2\CryptoPkg\Library\OpensslLib\openssl\include\internal/safe_math.h(19):
warning C4668: '__GNUC__' is not defined as a preprocessor macro, replacing
with '0' for '#if/#elif'

CLA: trivial

Reviewed-by: Gerd Hoffmann <kraxel@redhat.com>
Signed-off-by: Kalavakolanu Hema Anmisha <hema.anmisha.kalavakolanu@intel.com>
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/26204)

7 months agotest_evp_cipher_pipeline(): Fix memory leaks on errors
Tomas Mraz [Wed, 18 Dec 2024 08:21:10 +0000 (09:21 +0100)] 
test_evp_cipher_pipeline(): Fix memory leaks on errors

Fixes Coverity 16368441636845

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

7 months agodoc: Correctly reflect parameter constraints in EVP_DecryptUpdate()
Patrick J. LoPresti [Tue, 17 Dec 2024 23:46:04 +0000 (15:46 -0800)] 
doc: Correctly reflect parameter constraints in EVP_DecryptUpdate()

Fixes #26169

CLA: trivial

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

7 months agoFix missing HISTORY doc entries
Michael Baentsch [Mon, 16 Dec 2024 07:16:42 +0000 (08:16 +0100)] 
Fix missing HISTORY doc entries

Also add a check to find-doc-nits for HISTORY sections.

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

7 months agoAdd amplification limit test to interop quic testing
Neil Horman [Sat, 14 Dec 2024 20:56:22 +0000 (15:56 -0500)] 
Add amplification limit test to interop quic testing

Because this ci job only runs from the master branch, we need to add the
test here to validate that our server respects amplification limits in
our ci runs.

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

7 months agoCheck whether ctx->pctx != NULL
otherddn1978 [Fri, 13 Dec 2024 15:00:09 +0000 (18:00 +0300)] 
Check whether ctx->pctx != NULL

If it is NULL, ctx->pctx->pmeth dereference will cause a crash.

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

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

7 months agodocs: update man3 and man7 with cipher pipeline APIs 26136/head
Ramkumar [Sun, 10 Nov 2024 17:50:04 +0000 (23:20 +0530)] 
docs: update man3 and man7 with cipher pipeline APIs

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

7 months agotest: add evp_extra_test case for cipher pipeline API with fake pipeline provider
Ramkumar [Sat, 31 Aug 2024 12:03:49 +0000 (17:33 +0530)] 
test: add evp_extra_test case for cipher pipeline API with fake pipeline provider

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

7 months agofeat: add EVP APIs for cipher pipelining
Ramkumar [Mon, 9 Sep 2024 06:58:28 +0000 (12:28 +0530)] 
feat: add EVP APIs for cipher pipelining

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

7 months agodocs: EVP pipeline API design document
Ramkumar [Wed, 7 Aug 2024 17:58:45 +0000 (23:28 +0530)] 
docs: EVP pipeline API design document

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

7 months agoUpdate HISTORY sections of libssl functions > 3.0.0
Michael Baentsch [Thu, 12 Dec 2024 08:01:55 +0000 (09:01 +0100)] 
Update HISTORY sections of libssl functions > 3.0.0

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

7 months agoFix breakage on arm64_32 platforms
Tomas Mraz [Tue, 10 Dec 2024 10:04:31 +0000 (11:04 +0100)] 
Fix breakage on arm64_32 platforms

We just avoid the special handling needed for Apple M1.

Fixes #26135

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

7 months agoopenssl-dgst: Document that xoflen is required for shake
Ryan Farley [Fri, 6 Dec 2024 12:21:45 +0000 (06:21 -0600)] 
openssl-dgst: Document that xoflen is required for shake

With b911fef216d1386210ec24e201d54d709528abb4, there is no longer a
default xoflen for shake algorithms. Update the manual to reflect this.

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

7 months agoExtension of OPENSSL_ia32cap to accommodate additional CPUID bits
Elizarova, Alina [Wed, 4 Dec 2024 18:29:23 +0000 (10:29 -0800)] 
Extension of OPENSSL_ia32cap to accommodate additional CPUID bits

bits 128 - 191 CPUID.(EAX=07H,ECX=0H).EDX and CPUID.(EAX=07H,ECX=1H).EAX
bits 192 - 255 CPUID.(EAX=07H,ECX=1H).EDX and CPUID.(EAX=07H,ECX=1H).EBX
bits 256 - 319 CPUID.(EAX=07H,ECX=1H).ECX and CPUID.(EAX=24H,ECX=0H).EBX

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

7 months agoFix typo in SSL_get_shared_sigalgs docs
Sasha Romijn [Wed, 11 Dec 2024 13:31:12 +0000 (14:31 +0100)] 
Fix typo in SSL_get_shared_sigalgs docs

psighash -> psignhash

CLA: trivial

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

7 months agoLimit tests with non-openssl clients
Neil Horman [Fri, 6 Dec 2024 20:16:49 +0000 (15:16 -0500)] 
Limit tests with non-openssl clients

Several quic interop implementations have a server implementation, but
not a client implementation.  Don't bother trying to run those

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

7 months agoAdd HISTORY to BIO_s_mem documentation
Michael Baentsch [Tue, 10 Dec 2024 13:35:22 +0000 (14:35 +0100)] 
Add HISTORY to BIO_s_mem documentation

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

7 months agoFix leak of a RAND_POOL in error condition
Tomas Mraz [Wed, 11 Dec 2024 15:34:25 +0000 (16:34 +0100)] 
Fix leak of a RAND_POOL in error condition

Fixes Coverity 1636676

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

7 months agoX509: document non-standard behavior checking EKU extensions in CA and TA certs
Dr. David von Oheimb [Mon, 9 Dec 2024 21:22:24 +0000 (22:22 +0100)] 
X509: document non-standard behavior checking EKU extensions in CA and TA certs

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

7 months agoFix the intermittent lhash_test failure on Windows
Tomas Mraz [Wed, 11 Dec 2024 14:40:40 +0000 (15:40 +0100)] 
Fix the intermittent lhash_test failure on Windows

We must set pending_delete before the actual deletion as another inserting
or deleting thread can pick up the delete callback before the
ossl_ht_write_unlock() call.

This can happen only if no read locks are pending and only on Windows where
we do not use the write mutex to get the callback list.

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

7 months agoTo verify MAC, we need a MAC
Dmitry Belyavskiy [Mon, 9 Dec 2024 18:05:33 +0000 (19:05 +0100)] 
To verify MAC, we need a MAC

Fixes #26106

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

7 months agotest: the timeSpecification X.509v3 extension
Jonathan M. Wilbur [Mon, 16 Sep 2024 23:39:01 +0000 (23:39 +0000)] 
test: the timeSpecification X.509v3 extension

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

7 months agodoc: the timeSpecification X.509v3 extension
Jonathan M. Wilbur [Mon, 16 Sep 2024 23:26:16 +0000 (23:26 +0000)] 
doc: the timeSpecification X.509v3 extension

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

7 months agofeat: support the timeSpecification X.509v3 extension
Jonathan M. Wilbur [Mon, 16 Sep 2024 22:50:14 +0000 (22:50 +0000)] 
feat: support the timeSpecification X.509v3 extension

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

7 months agodh_cms_set_peerkey(): Fix the incorrect condition
Shakti Shah [Mon, 25 Nov 2024 15:16:45 +0000 (20:46 +0530)] 
dh_cms_set_peerkey(): Fix the incorrect condition

Only absent parameters allowed in RFC 3370.

Fixes #25824

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

7 months agoAdd function to mix in an additional input into a RAND_POOL
Tomas Mraz [Fri, 6 Dec 2024 15:22:42 +0000 (16:22 +0100)] 
Add function to mix in an additional input into a RAND_POOL

It will be just xor-ed over the existing entropy
in the pool.

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

7 months agoFix potential use-after-free in REF_PRINT_COUNT
Neil Horman [Wed, 16 Oct 2024 18:34:08 +0000 (14:34 -0400)] 
Fix potential use-after-free in REF_PRINT_COUNT

We use REF_PRINT_COUNT to dump out the value of various reference
counters in our code

However, we commonly use this macro after an increment or decrement.  On
increment its fine, but on decrement its not, because the macro
dereferences the object holding the counter value, which may be freed by
another thread, as we've given up our ref count to it prior to using the
macro.

The rule is that we can't reference memory for an object once we've
released our reference, so lets fix this by altering REF_PRINT_COUNT to
accept the value returned by CRYPTO_[UP|DOWN]_REF instead.  The
eliminates the need to dereference the memory the object points to an
allows us to use the call after we release our reference count

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

7 months agoFix memory ordering guarantees and TSAN errors
Tomas Mraz [Thu, 17 Oct 2024 09:25:17 +0000 (11:25 +0200)] 
Fix memory ordering guarantees and TSAN errors

If we had refcounted object allowing lockless writes
the relaxed semantics on DOWN_REF would allow scheduling
these writes after simultaneous release of the object by
another thread.

We do not have any such objects yet, but better to make
the refcount correct just in case we will have them
in future.

TSAN doesn't properly understand this so we use
even stronger acq_rel semantics if building with TSAN.

Fixes #25660

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

7 months agoAdd test for releasing a shared EVP_PKEY across threads
Tomas Mraz [Thu, 10 Oct 2024 20:10:54 +0000 (22:10 +0200)] 
Add test for releasing a shared EVP_PKEY across threads

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

7 months agoossl_cms_get1_crls_ex(): Avoid doublefree if CRL up ref fails
Tomas Mraz [Thu, 5 Dec 2024 08:29:08 +0000 (09:29 +0100)] 
ossl_cms_get1_crls_ex(): Avoid doublefree if CRL up ref fails

Reviewed-by: Tim Hudson <tjh@openssl.org>
Reviewed-by: David von Oheimb <david.von.oheimb@siemens.com>
(Merged from https://github.com/openssl/openssl/pull/26100)

(cherry picked from commit ef0be53f90045d0a9f0d085a7a4289335f49ee41)

7 months agoRevert the behavior change of CMS_get1_certs() and CMS_get1_crls()
Tomas Mraz [Tue, 3 Dec 2024 11:40:01 +0000 (12:40 +0100)] 
Revert the behavior change of CMS_get1_certs() and CMS_get1_crls()

Fixes #26079

Reviewed-by: Tim Hudson <tjh@openssl.org>
Reviewed-by: David von Oheimb <david.von.oheimb@siemens.com>
(Merged from https://github.com/openssl/openssl/pull/26100)

(cherry picked from commit afd36cbef8b3b7b00bd4bcdc33802d4cb39fdffa)

7 months agoRemove references to git.openssl.org from README.md
Tom Cosgrove [Thu, 5 Dec 2024 17:27:52 +0000 (17:27 +0000)] 
Remove references to git.openssl.org from README.md

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

7 months agospeed.c: Changed the declaration of aead_ivlen to a #define
Mohammed Alhabib [Wed, 4 Dec 2024 06:03:17 +0000 (09:03 +0300)] 
speed.c: Changed the declaration of aead_ivlen to a #define

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

7 months agoExchange jitter and no-ct jobs between daily and on push CI
Tomas Mraz [Wed, 4 Dec 2024 10:20:08 +0000 (11:20 +0100)] 
Exchange jitter and no-ct jobs between daily and on push CI

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

7 months agojitter_generate(): Properly mix in the additional input
Tomas Mraz [Wed, 4 Dec 2024 10:00:11 +0000 (11:00 +0100)] 
jitter_generate(): Properly mix in the additional input

By adding the additional input directly to the pool
we were using just the additional input.

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

7 months agoA typo fix in a comment
willmafh [Thu, 5 Dec 2024 03:49:21 +0000 (11:49 +0800)] 
A typo fix in a comment

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

7 months agoAdd spaces to make macros more clear
willmafh [Wed, 4 Dec 2024 12:59:40 +0000 (20:59 +0800)] 
Add spaces to make macros more clear

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

7 months agoCode & comments changes to make them in consistent
willmafh [Wed, 4 Dec 2024 03:00:35 +0000 (11:00 +0800)] 
Code & comments changes to make them in consistent

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

7 months agoone more empty line for code style consistency
willmafh [Tue, 3 Dec 2024 05:15:14 +0000 (13:15 +0800)] 
one more empty line for code style consistency

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

7 months agoChange all one's complement to ones' complement for consistency
willmafh [Tue, 3 Dec 2024 05:13:39 +0000 (13:13 +0800)] 
Change all one's complement to ones' complement for consistency

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

7 months agoBN_secure_new function indentation correction
willmafh [Tue, 3 Dec 2024 05:11:33 +0000 (13:11 +0800)] 
BN_secure_new function indentation correction

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

7 months agoDelete redundant parentheses for code consistency
willmafh [Tue, 3 Dec 2024 05:08:55 +0000 (13:08 +0800)] 
Delete redundant parentheses for code consistency

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

7 months agoDelete a redundant break
willmafh [Tue, 3 Dec 2024 05:06:46 +0000 (13:06 +0800)] 
Delete a redundant break

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

8 months agoRun interop tests on feature/quic-server branch
Neil Horman [Sun, 1 Dec 2024 21:11:28 +0000 (16:11 -0500)] 
Run interop tests on feature/quic-server branch

We currently run interop tests as a client only from the master branch.
While we are developing quic-server it would be beneficial to also get
interop test results from the quic-server branch run as both a client
and a server, until such time as the feature branch is merged.  Add
building and running of a container in the test harness to our CI set

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

8 months agoAdd handling for additional input in jitter rng
jsondevers [Thu, 28 Nov 2024 16:49:23 +0000 (11:49 -0500)] 
Add handling for additional input in jitter rng

Fixes #25917

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

8 months agofips: zeroization of ECX public keys
Joachim Vandersmissen [Sun, 27 Oct 2024 04:48:55 +0000 (23:48 -0500)] 
fips: zeroization of ECX public keys

Commit fa338aa7cd added zeroization of public security parameters as
required by ISO 19790:2012/Cor.1:2015 7.9. However, that commit
overlooked ECX keys, which are used for EdDSA and X25519/X448.

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

8 months agoproviders: stop probing for getentropy(3) on recent FreeBSD
Kyle Evans [Tue, 16 Jul 2024 05:21:58 +0000 (00:21 -0500)] 
providers: stop probing for getentropy(3) on recent FreeBSD

FreeBSD has supported both getrandom(2) and getentropy(3) since 12.0.
The last version which did *not* have these went EoL in September 2021.
Use getrandom(2) unconditionally and fallback to sysctl kern.arandom if
we do happen to have a FreeBSD that old.

This is generally a necessary step for FreeBSD's _FORTIFY_SOURCE
implementation, which needs to do some symbol renaming tricks with the
getentropy declaration that would otherwise add some platform-specific
hacks here to accommodate.  getentropy(3) uses getrandom(2) internally
on FreeBSD, so we just cut out the middleman.

While we're here, it doesn't seem to make sense to ever prefer the
sysctl on FreeBSD or NetBSD.  For both platforms, it's limited to 256
bytes in a single request while getrandom(2) will generally use the same
backend but service the entire request in one shot, even for larger
amounts of entropy, modulo the EINTR possibility that presents itself
with larger requests.

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

8 months agofips-label.yml: Fix ABI change label removal
Tomas Mraz [Thu, 28 Nov 2024 15:58:06 +0000 (16:58 +0100)] 
fips-label.yml: Fix ABI change label removal

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

8 months agoAvoid NULL dereference with PKCS7_OP_SET_DETACHED_SIGNATURE
Tomas Mraz [Thu, 28 Nov 2024 09:10:28 +0000 (10:10 +0100)] 
Avoid NULL dereference with PKCS7_OP_SET_DETACHED_SIGNATURE

We would dereference p7->d.sign pointer which can be NULL.

Reported by Han Zheng.

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

8 months agoDocument version-specific utility of EVP_PKEY_Q_keygen
Michael Baentsch [Sat, 23 Nov 2024 05:44:40 +0000 (06:44 +0100)] 
Document version-specific utility of EVP_PKEY_Q_keygen

Reviewed-by: Matt Caswell <matt@openssl.org>
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/26040)

8 months agoMinor nit fix to EVP_CipherFinal_ex() return code documentation.
Frederik Wedel-Heinen [Fri, 1 Nov 2024 13:18:38 +0000 (14:18 +0100)] 
Minor nit fix to EVP_CipherFinal_ex() return code documentation.

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

8 months agoFix memleak in dsa_gen()
Holger Dengler [Thu, 14 Nov 2024 08:55:50 +0000 (09:55 +0100)] 
Fix memleak in dsa_gen()

Free the stack return value `dsa` on each early exit.

Fixes #25905

Signed-off-by: Holger Dengler <dengler@linux.ibm.com>
Reviewed-by: Kurt Roeckx <kurt@roeckx.be>
Reviewed-by: Saša Nedvědický <sashan@openssl.org>
Reviewed-by: Tomas Mraz <tomas@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/25948)

8 months agoFix EVP_PKEY_print_private() so that it works with non default providers.
slontis [Wed, 20 Nov 2024 01:39:35 +0000 (12:39 +1100)] 
Fix EVP_PKEY_print_private() so that it works with non default providers.

At some point in time it was decided that the EC keymanagers ec_export()
function would only allow the selection to be both the public + private
parts. If just the private element is selected it returns an error.
Many openssl commandline apps use EVP_PKEY_print_private() which passes
EVP_PKEY_PRIVATE_KEY to the encoder. This selection propagates to
encoder_construct_pkey(). For external providers (such as the fips
provider this will call the keymanagers export() with the selection set
to just the private part.

So we either need to
1) change the selection in EVP_PKEY_print_private() or
2) modify the selection used in the export used in
   encoder_construct_pkey
3) Change the ec_export to allow this.

I have chosen 2) but I am not sure if this is the correct thing to do
or whether it should conditionally do this when the output_type ==
'text'.

Issue was reported by Ilia Okomin (Oracle).

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

8 months agodie() in .tmpl file should not be silently ignored.
Alexandr Nedvedicky [Tue, 26 Nov 2024 08:05:09 +0000 (09:05 +0100)] 
die() in .tmpl file should not be silently ignored.

call to die() in perl templates is currently ignored.
any error printed by die() commad appears in template
output.

In order to make sure die() terminates processing we
must ensure we emite `undef` value. This is ensured
by adding a `BROKEN` callback to `fill_in()` Template
method. The callback must return undef to stop processing.

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

8 months agoapps/passwd.c: Convert a redundant check to assert
Bartel Artem [Mon, 25 Nov 2024 11:28:05 +0000 (14:28 +0300)] 
apps/passwd.c: Convert a redundant check to assert

Reviewed-by: Tom Cosgrove <tom.cosgrove@arm.com>
Reviewed-by: Paul Yang <kaishen.yy@antfin.com>
Reviewed-by: Tomas Mraz <tomas@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/26053)

8 months agoFix solaris build in CRYPTO_atomic_store api
Neil Horman [Wed, 27 Nov 2024 17:22:19 +0000 (12:22 -0500)] 
Fix solaris build in CRYPTO_atomic_store api

Misnamed variable, just correct it to dst

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

8 months agoUse static array (length 256) for copy of OPENSSL_MALLOC_FAILURES
sftcd [Mon, 25 Nov 2024 16:01:39 +0000 (16:01 +0000)] 
Use static array (length 256) for copy of OPENSSL_MALLOC_FAILURES

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

8 months agoDeprecate all BIO_meth_get_*() functions
Tomas Mraz [Mon, 25 Nov 2024 15:06:47 +0000 (16:06 +0100)] 
Deprecate all BIO_meth_get_*() functions

Their use by applications is inherently unsafe.
Fixes #26047

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

8 months agoUse sk_X509_ATTRIBUTE_deep_copy() to copy attribute stacks in pk7_doit.c
Niels Dossche [Wed, 16 Oct 2024 18:37:29 +0000 (20:37 +0200)] 
Use sk_X509_ATTRIBUTE_deep_copy() to copy attribute stacks in pk7_doit.c

Clean up the code by using the dedicated stack copy function.

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

8 months agoci: add daily runcheckers to exercise the -DOPENSSL_PEDANTIC_ZEROIZATION option
Pauli [Wed, 27 Nov 2024 00:24:29 +0000 (11:24 +1100)] 
ci: add daily runcheckers to exercise the -DOPENSSL_PEDANTIC_ZEROIZATION option

Reviewed-by: Richard Levitte <levitte@openssl.org>
Reviewed-by: Tim Hudson <tjh@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/26068)

8 months agofips: change integrity check zeroization to use the OPENSSL_PEDANTIC_ZEROIZATION...
Pauli [Wed, 27 Nov 2024 00:21:08 +0000 (11:21 +1100)] 
fips: change integrity check zeroization to use the OPENSSL_PEDANTIC_ZEROIZATION define

Reviewed-by: Richard Levitte <levitte@openssl.org>
Reviewed-by: Tim Hudson <tjh@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/26068)

8 months agopbkdf2: change FIPS zeroization to use the OPENSSL_PEDANTIC_ZEROIZATION define
Pauli [Wed, 27 Nov 2024 00:19:32 +0000 (11:19 +1100)] 
pbkdf2: change FIPS zeroization to use the OPENSSL_PEDANTIC_ZEROIZATION define

Reviewed-by: Richard Levitte <levitte@openssl.org>
Reviewed-by: Tim Hudson <tjh@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/26068)

8 months agohkdf: change FIPS zeroization to use the OPENSSL_PEDANTIC_ZEROIZATION define
Pauli [Wed, 27 Nov 2024 00:19:19 +0000 (11:19 +1100)] 
hkdf: change FIPS zeroization to use the OPENSSL_PEDANTIC_ZEROIZATION define

Reviewed-by: Richard Levitte <levitte@openssl.org>
Reviewed-by: Tim Hudson <tjh@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/26068)

8 months agorsa: change FIPS zeroization to use the OPENSSL_PEDANTIC_ZEROIZATION define
Pauli [Wed, 27 Nov 2024 00:19:00 +0000 (11:19 +1100)] 
rsa: change FIPS zeroization to use the OPENSSL_PEDANTIC_ZEROIZATION define

Reviewed-by: Richard Levitte <levitte@openssl.org>
Reviewed-by: Tim Hudson <tjh@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/26068)

8 months agoffc: change FIPS zeroization to use the OPENSSL_PEDANTIC_ZEROIZATION define
Pauli [Wed, 27 Nov 2024 00:18:51 +0000 (11:18 +1100)] 
ffc: change FIPS zeroization to use the OPENSSL_PEDANTIC_ZEROIZATION define

Reviewed-by: Richard Levitte <levitte@openssl.org>
Reviewed-by: Tim Hudson <tjh@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/26068)

8 months agoec: change FIPS zeroization to use the OPENSSL_PEDANTIC_ZEROIZATION define
Pauli [Wed, 27 Nov 2024 00:18:38 +0000 (11:18 +1100)] 
ec: change FIPS zeroization to use the OPENSSL_PEDANTIC_ZEROIZATION define

Reviewed-by: Richard Levitte <levitte@openssl.org>
Reviewed-by: Tim Hudson <tjh@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/26068)

8 months agoA typo fix in a comment
willmafh [Wed, 27 Nov 2024 03:06:36 +0000 (11:06 +0800)] 
A typo fix in a comment

CLA: trivial

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

8 months agoDocument expected BIO operations for libssl
David Benjamin [Mon, 25 Nov 2024 16:01:17 +0000 (11:01 -0500)] 
Document expected BIO operations for libssl

If your custom BIO does not implement BIO_CTRL_FLUSH, it won't work, but
this is not document anywhere.

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

8 months agoUpgrade action/{upload,download}-artifact to v4
Richard Levitte [Mon, 11 Nov 2024 10:44:56 +0000 (11:44 +0100)] 
Upgrade action/{upload,download}-artifact to v4

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

8 months agofips-jitter: set provider into error state upon CRNG permanent failures
Dimitri John Ledkov [Fri, 15 Nov 2024 05:32:33 +0000 (05:32 +0000)] 
fips-jitter: set provider into error state upon CRNG permanent failures

With fips-jitter build time option, jitter can be inside FIPS
boundary.

Calls to jent_read_entropy() can return permanent failures for
Repetitive Count Test (RTC), Adaptive Proportion Test (APT), LAG
prediction test.

Ensure the module enters error state upon permanent jitter failures.

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

8 months agoFix potential memory leak on failure of ecx_gen_init()
Niels Dossche [Wed, 20 Nov 2024 18:57:38 +0000 (19:57 +0100)] 
Fix potential memory leak on failure of ecx_gen_init()

When ecx_gen_set_params() returns 0, it could have duplicated the memory
for the parameter OSSL_KDF_PARAM_PROPERTIES already in gctx->propq,
leading to a memory leak.

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

8 months agoFix potential memory leak on failure of dsa_gen_init()
Niels Dossche [Wed, 20 Nov 2024 19:22:43 +0000 (20:22 +0100)] 
Fix potential memory leak on failure of dsa_gen_init()

When dsa_gen_set_params()  returns 0, it could have duplicated the memory for the parameter
OSSL_PKEY_PARAM_FFC_DIGEST already in gctx->mdname, leading to a memory leak.

Allocated here: https://github.com/openssl/openssl/blob/47a80fd2034cd4314d3b4958539dcd3106087109/providers/implementations/keymgmt/dsa_kmgmt.c#L524
Can return 0 here: https://github.com/openssl/openssl/blob/47a80fd2034cd4314d3b4958539dcd3106087109/providers/implementations/keymgmt/dsa_kmgmt.c#L529-L536

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

8 months agoEnable AES and SHA3 optimisations on Apple Silicon M4-based macOS systems
Tom Cosgrove [Tue, 12 Nov 2024 08:27:27 +0000 (08:27 +0000)] 
Enable AES and SHA3 optimisations on Apple Silicon M4-based macOS systems

AES gets a performance enhancement of 7-33%.

Tested on an M4 Pro, but the CPU cores are the same on M4 and M4 Max.

Change-Id: I634c03f1d2b50fa5f8ca97dd65975e49d970c72b

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

8 months agofips: remove redundant RSA encrypt/decrypt KAT
Dimitri John Ledkov [Thu, 14 Nov 2024 12:03:10 +0000 (12:03 +0000)] 
fips: remove redundant RSA encrypt/decrypt KAT

FIPS 140-2 IG D.9 has become FIPS 140-3 D.G (see "Mapping FIPS 140-2
IGs to FIPS 140-3" in the FIPS 140-3 IG).

The requirements w.r.t. RSA KATs have now been relaxed, meaning that
existing full-message RSA signature verification (which is performed
separately) is sufficient to meet KAT requirements for all RSA
usecases (KEM/Encrypt/Decrypt/Sign/Verify).

Dropping this KAT is very useful, because it is large/expensive on
module startup, but also because it enables in the future to block RSA
Encrypt/Decrypt operations with paddings other than OAEP, which are
legacy or deprecated by either current or draft algorithm transition
SP.

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

8 months agofips: zeroize temporary self-check out MD variable
Dimitri John Ledkov [Thu, 14 Nov 2024 04:38:27 +0000 (04:38 +0000)] 
fips: zeroize temporary self-check out MD variable

At least this is done on module startup only.

To satisfy ISO/IEC 19790:2012/Cor.1:2015(E) Section 7.5 [05.10]
requirement.

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

8 months ago.gitignore: Ignoring demo executables
Dmitry Belyavskiy [Wed, 20 Nov 2024 13:48:32 +0000 (14:48 +0100)] 
.gitignore: Ignoring demo executables

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

8 months agoRemove the negative return values of EVP_KDF_* functions in documents
Peiwei Hu [Tue, 19 Nov 2024 09:19:02 +0000 (17:19 +0800)] 
Remove the negative return values of EVP_KDF_* functions in documents

None of the EVP_KDF_* functions will ever return a negative value.

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

8 months agoFix wrong return value checks for some functions
Peiwei Hu [Sun, 27 Oct 2024 09:53:53 +0000 (17:53 +0800)] 
Fix wrong return value checks for some functions

- in particular in use of X509_LOOKUP_load_file, EVP_PKEY_print_params,
EVP_PKEY_keygen, X509_CRL_add1_ext_i2d, EVP_PKEY_keygen_init

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

8 months agoFix multiple wrong use of BN_check_prime
Peiwei Hu [Sun, 27 Oct 2024 09:37:48 +0000 (17:37 +0800)] 
Fix multiple wrong use of BN_check_prime

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

8 months agoFix multiple wrong checks of EVP_PKEY_set1_encoded_public_key
Peiwei Hu [Sun, 27 Oct 2024 09:04:15 +0000 (17:04 +0800)] 
Fix multiple wrong checks of EVP_PKEY_set1_encoded_public_key

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

8 months agoapps/lib/apps.c: fix the wrong check in check_cert_attributes
Peiwei Hu [Sun, 27 Oct 2024 09:02:32 +0000 (17:02 +0800)] 
apps/lib/apps.c: fix the wrong check in check_cert_attributes

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

8 months agoMark OPENSSL_armcap_P .hidden in arm asm
Kai Pastor [Sat, 23 Sep 2023 18:22:03 +0000 (20:22 +0200)] 
Mark OPENSSL_armcap_P .hidden in arm asm

Fixes #25601
Fixes #22414

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

8 months agoFix SSL_write_[ex|ex2] on blocking quic streams
Neil Horman [Tue, 19 Nov 2024 16:58:30 +0000 (11:58 -0500)] 
Fix SSL_write_[ex|ex2] on blocking quic streams

When writing to a blocking quic stream, we sometimes get duplicate
transmitted data.  This occurs when a call to quic_write_blocking has to
wait for space to become available in the ring buffer.  When we do a
wait, the call sets *written to the value returned in args.total_written
as filled out by the calls to block_until_pred->quic_write_again.
However, the value there is based on the amount we requested, which is
only the remaining data that we didn't append in xso_sstream_write.  So
if we call quic_write_blocking with a buffer of length X, and initially
append Y bytes, and write the remainig X-Y bytes via a block_until_pred
call, then *written will return with the value X-Y, even though we wrote
the full X bytes to the ring buffer.

Fix it by recording the initial amount appended into *written, and then
add the args.total_written value if we have to wait on more space

Fixes openssl/project#924

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

8 months agosm2_sig_verify(): Do not call BN_CTX_end() without BN_CTX_start()
Tomas Mraz [Tue, 19 Nov 2024 10:09:58 +0000 (11:09 +0100)] 
sm2_sig_verify(): Do not call BN_CTX_end() without BN_CTX_start()

In case of memory allocation failure this
could happen.

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

8 months agoadd new keytype test for EVP_PKEY_Q_keygen
Michael Baentsch [Sat, 16 Nov 2024 16:12:18 +0000 (17:12 +0100)] 
add new keytype test for EVP_PKEY_Q_keygen

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

8 months agopkeyutl.c: Avoid freeing pkey at multiple places
Tomas Mraz [Mon, 18 Nov 2024 19:56:34 +0000 (20:56 +0100)] 
pkeyutl.c: Avoid freeing pkey at multiple places

Also fixes a leak of pkey in error case for -verifyrecover.

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

8 months agoREADME.md: Fix typo. Change 'the are' to 'there are'
spectre [Sun, 17 Nov 2024 18:15:48 +0000 (19:15 +0100)] 
README.md: Fix typo. Change 'the are' to 'there are'

This pull request fixes a typo in the documentation.
The phrase "the are" has been corrected to "there are".

CLA: trivial

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

8 months agos_cb.c: Move the negotiated group output
Michael Baentsch [Fri, 15 Nov 2024 08:49:43 +0000 (09:49 +0100)] 
s_cb.c: Move the negotiated group output

It needs to be always displayed not just with -brief.

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

8 months agoAdd CTX copy function for EVP_MD to optimize the performance of EVP_MD_CTX_copy_ex.
wangcheng [Sat, 26 Oct 2024 09:10:38 +0000 (17:10 +0800)] 
Add CTX copy function for EVP_MD to optimize the performance of EVP_MD_CTX_copy_ex.

1. Add OSSL_FUNC_digest_copyctx_fn function for EVP_MD, which is used to copy algctx from the old EVP_MD_CTX to the new one.

2. Add implementation of OSSL_FUNC_digest_copyctx_fn function for default providers.

3. Modify EVP_MD_CTX_copy_ex: When the fetched digest is the same in in and out contexts, use the copy function to copy the members in EVP_MD_CTX if the OSSL_FUNC_digest_copyctx_fn function exists. Otherwise, use the previous method to copy.

4. Add documentation for OSSL_FUNC_digest_copyctx function in doc/man7/provider-digest.pod.

5. Add testcase.

Fixes #25703

Signed-off-by: wangcheng <bangwangnj@163.com>
Reviewed-by: Dmitry Belyavskiy <beldmit@gmail.com>
Reviewed-by: Tomas Mraz <tomas@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/25726)

8 months agox509_vfy.c and x509_lu.c: refactor find_issuer(), X509_STORE_CTX_get1_issuer(), etc.
Dr. David von Oheimb [Sat, 9 Jul 2022 08:23:33 +0000 (10:23 +0200)] 
x509_vfy.c and x509_lu.c: refactor find_issuer(), X509_STORE_CTX_get1_issuer(), etc.

Reviewed-by: Hugo Landau <hlandau@devever.net>
Reviewed-by: Tomas Mraz <tomas@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/18762)

8 months agoos-zoo CI: Replace macos-12 run with macos-15
Tomas Mraz [Wed, 16 Oct 2024 19:49:50 +0000 (21:49 +0200)] 
os-zoo CI: Replace macos-12 run with macos-15

macos-12 runners will be removed in December.

Reviewed-by: Paul Dale <ppzgs1@gmail.com>
Reviewed-by: Hugo Landau <hlandau@devever.net>
(Merged from https://github.com/openssl/openssl/pull/25715)

8 months agoAdd docs for OSSL_PARAM_print_to_buf
Neil Horman [Mon, 14 Oct 2024 17:34:38 +0000 (13:34 -0400)] 
Add docs for OSSL_PARAM_print_to_buf

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

8 months agoMake ossl_trace_param_values an official api function
Neil Horman [Mon, 14 Oct 2024 17:23:33 +0000 (13:23 -0400)] 
Make ossl_trace_param_values an official api function

lots of people may want to print params to a buffer.  Make it part of
our api

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

8 months agoAdd QUERY trace points
Neil Horman [Sun, 6 Oct 2024 17:16:16 +0000 (13:16 -0400)] 
Add QUERY trace points

Adds trace messages for method store add/remove and fetch operations

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

8 months agoAdd a QUERY trace category
Neil Horman [Sat, 5 Oct 2024 13:51:00 +0000 (09:51 -0400)] 
Add a QUERY trace category

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