]> git.ipfire.org Git - thirdparty/openssl.git/log
thirdparty/openssl.git
11 months agotest: add error reasons to TLS 1.2 PRF tests
Pauli [Thu, 8 Aug 2024 03:43:47 +0000 (13:43 +1000)] 
test: add error reasons to TLS 1.2 PRF tests

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

11 months agotest: add error reasons to Single Step KDF tests
Pauli [Thu, 8 Aug 2024 03:40:57 +0000 (13:40 +1000)] 
test: add error reasons to Single Step KDF tests

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

11 months agotest: add error reasons to SSHKDF tests
Pauli [Thu, 8 Aug 2024 03:39:46 +0000 (13:39 +1000)] 
test: add error reasons to SSHKDF tests

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

11 months agotest: add error reasons to PBKDF2 tests
Pauli [Thu, 8 Aug 2024 03:37:38 +0000 (13:37 +1000)] 
test: add error reasons to PBKDF2 tests

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

11 months agotest: add error reasons to HKDF tests
Pauli [Thu, 8 Aug 2024 03:35:17 +0000 (13:35 +1000)] 
test: add error reasons to HKDF tests

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

11 months agotest: add error reasons to KMAC tests
Pauli [Thu, 8 Aug 2024 03:32:27 +0000 (13:32 +1000)] 
test: add error reasons to KMAC tests

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

11 months agotest: add error reasons to RSA tests
Pauli [Thu, 8 Aug 2024 03:25:18 +0000 (13:25 +1000)] 
test: add error reasons to RSA tests

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

11 months agofips: change from function call to macro in rsa_enc.c
Pauli [Thu, 8 Aug 2024 01:40:49 +0000 (11:40 +1000)] 
fips: change from function call to macro in rsa_enc.c

Use of the function instead of the macro for the indicator unapproved check was
noted in: https://github.com/openssl/openssl/pull/25070#discussion_r1706564363
Fix things to use the macro properly.

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

11 months agoamend! fixup! limit bignums to 512 bytes
Neil Horman [Tue, 30 Jul 2024 07:52:24 +0000 (03:52 -0400)] 
amend! fixup! limit bignums to 512 bytes

fixup! limit bignums to 512 bytes

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

11 months agolimit bignums to 128 bytes
Neil Horman [Fri, 26 Jul 2024 15:01:05 +0000 (11:01 -0400)] 
limit bignums to 128 bytes

Keep us from spinning forever doing huge amounts of math in the fuzzer

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

11 months agoAdd "no-fips-post" configure option.
slontis [Thu, 1 Aug 2024 07:52:56 +0000 (17:52 +1000)] 
Add "no-fips-post" configure option.

Using this option disables the OpenSSL FIPS provider
self tests.
This is intended for debugging purposes only,
as it breaks FIPS compliance.

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

11 months agoFix FIPS indicator defines for larger indicies.
slontis [Wed, 7 Aug 2024 06:19:10 +0000 (16:19 +1000)] 
Fix FIPS indicator defines for larger indicies.

A newer PR is using setable3 now so these indicies should be fixed.

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

12 months agotest: add negative tests for KBKDF key size check under FIPS
Pauli [Mon, 5 Aug 2024 23:37:49 +0000 (09:37 +1000)] 
test: add negative tests for KBKDF key size check under FIPS

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

12 months agofips: add kbkdf key length check as per SP 800-131a revision 2
Pauli [Mon, 5 Aug 2024 06:07:43 +0000 (16:07 +1000)] 
fips: add kbkdf key length check as per SP 800-131a revision 2

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

12 months agofips: add kbkdf key check checking function
Pauli [Mon, 5 Aug 2024 05:57:00 +0000 (15:57 +1000)] 
fips: add kbkdf key check checking function

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

12 months agodoc: docment key-check param for kbkdf
Pauli [Mon, 5 Aug 2024 05:52:07 +0000 (15:52 +1000)] 
doc: docment key-check param for kbkdf

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

12 months agodoc: document kbkdf key check argument for fipsinstall
Pauli [Mon, 5 Aug 2024 05:48:47 +0000 (15:48 +1000)] 
doc: document kbkdf key check argument for fipsinstall

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

12 months agofips: install with the kbkdf key check option set
Pauli [Mon, 5 Aug 2024 05:47:27 +0000 (15:47 +1000)] 
fips: install with the kbkdf key check option set

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

12 months agoparams: add kbkdf key check param
Pauli [Mon, 5 Aug 2024 05:46:28 +0000 (15:46 +1000)] 
params: add kbkdf key check param

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

12 months agofipsinstall: add kbkdf key check option
Pauli [Mon, 5 Aug 2024 05:45:30 +0000 (15:45 +1000)] 
fipsinstall: add kbkdf key check option

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

12 months agoUpdate BN_add.pod documentation so it is consistent with header declarations
JulieDzeze1 [Fri, 19 Apr 2024 21:50:19 +0000 (17:50 -0400)] 
Update BN_add.pod documentation so it is consistent with header declarations

CLA: trivial

Reviewed-by: Nicola Tuveri <nic.tuv@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/24215)

12 months agoRemove duplicate colon in otherName display
Mathis Marion [Thu, 1 Aug 2024 07:59:49 +0000 (09:59 +0200)] 
Remove duplicate colon in otherName display

The colon is already added in X509V3_EXT_val_prn(). In fact, the other
branches from i2v_GENERAL_NAME() do not include a trailing colon.

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

12 months agoAdd OIDs id-kp-wisun-fan-device and id-on-hardwareModule
Mathis Marion [Fri, 12 Jan 2024 15:48:15 +0000 (16:48 +0100)] 
Add OIDs id-kp-wisun-fan-device and id-on-hardwareModule

Sub-OIDs for {iso(1) identified-organization(3) dod(6) internet(1)
private(4) enterprise(1) 45605} are recorded in the document "Wi-SUN
Assigned Value Registry" (WAVR).

OID id-on-hardwareModule is defined in RFC 4108.

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

12 months agoRemove the event queue code
Matt Caswell [Tue, 6 Aug 2024 09:05:06 +0000 (10:05 +0100)] 
Remove the event queue code

PR #18345 added some code for an event queue. It also added a test for it.
Unfortunately this event queue code has never been used for anything.
Additionally the test was never integrated into a test recipe, so it never
actually gets invoked via "make test". This makes the code entirely dead,
unnecessarily bloats the size of libssl and causes a decrease in our
testing code coverage value.

We remove the dead code.

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

12 months agodh_kmgmt.c: Avoid expensive public key validation for known safe-prime groups
Tomas Mraz [Mon, 5 Aug 2024 15:54:14 +0000 (17:54 +0200)] 
dh_kmgmt.c: Avoid expensive public key validation for known safe-prime groups

The partial validation is fully sufficient to check the key validity.

Thanks to Szilárd Pfeiffer for reporting the issue.

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

12 months agoossl_print_attribute_value(): use a sequence value only if type is a sequence
Tomas Mraz [Mon, 5 Aug 2024 14:51:56 +0000 (16:51 +0200)] 
ossl_print_attribute_value(): use a sequence value only if type is a sequence

Move the switch to print a distinguished name inside the
switch by the printed attribute type, otherwise a malformed
attribute will cause a crash.

Updated the fuzz corpora with the testcase

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

12 months agorsa_pss_compute_saltlen(): Avoid integer overflows and check MD and RSA sizes
Tomas Mraz [Mon, 5 Aug 2024 13:08:39 +0000 (15:08 +0200)] 
rsa_pss_compute_saltlen(): Avoid integer overflows and check MD and RSA sizes

Fixes Coverity 1604651

Reviewed-by: Dmitry Belyavskiy <beldmit@gmail.com>
Reviewed-by: Tom Cosgrove <tom.cosgrove@arm.com>
(Merged from https://github.com/openssl/openssl/pull/25085)

12 months agodo_print_ex(): Avoid possible integer overflow
Tomas Mraz [Mon, 5 Aug 2024 12:49:52 +0000 (14:49 +0200)] 
do_print_ex(): Avoid possible integer overflow

Fixes Coverity 1604657
Fixes openssl/project#780

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

12 months agotest: update SSL API test in light of PKCS#1 version 1.5 padding change under FIPS
Pauli [Fri, 2 Aug 2024 01:51:11 +0000 (11:51 +1000)] 
test: update SSL API test in light of PKCS#1 version 1.5 padding change under FIPS

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

12 months agotest: update SSL old test in light of PKCS#1 version 1.5 padding change under FIPS
Pauli [Fri, 2 Aug 2024 01:50:59 +0000 (11:50 +1000)] 
test: update SSL old test in light of PKCS#1 version 1.5 padding change under FIPS

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

12 months agosslapitest: add meaningful skip messages
Pauli [Thu, 1 Aug 2024 04:19:32 +0000 (14:19 +1000)] 
sslapitest: add meaningful skip messages

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

12 months agocms: fix tests in light of PKCS#1 version 1.5 padding check
Pauli [Thu, 1 Aug 2024 03:45:27 +0000 (13:45 +1000)] 
cms: fix tests in light of PKCS#1 version 1.5 padding check

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

12 months agofips: add PKCS#1 version 1.5 padding check option
Pauli [Thu, 1 Aug 2024 03:45:08 +0000 (13:45 +1000)] 
fips: add PKCS#1 version 1.5 padding check option

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

12 months agorsa: disallow PKCS#1 version 1.5 padding for encrpytion under FIPS.
Pauli [Wed, 31 Jul 2024 04:03:52 +0000 (14:03 +1000)] 
rsa: disallow PKCS#1 version 1.5 padding for encrpytion under FIPS.

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

12 months agofips: add option to disable PKCS#1 version 1.5 padding
Pauli [Wed, 31 Jul 2024 03:30:05 +0000 (13:30 +1000)] 
fips: add option to disable PKCS#1 version 1.5 padding

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

12 months agoparam: add ASYM_CIPHER_PARAM_PKCS15_PADDING_DISABLED
Pauli [Wed, 31 Jul 2024 03:29:53 +0000 (13:29 +1000)] 
param: add ASYM_CIPHER_PARAM_PKCS15_PADDING_DISABLED

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

12 months agodoc: document pkcs15-padding-disabled param for RSA
Pauli [Wed, 31 Jul 2024 03:26:02 +0000 (13:26 +1000)] 
doc: document pkcs15-padding-disabled param for RSA

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

12 months agodoc: fix typos
Pauli [Wed, 31 Jul 2024 03:19:45 +0000 (13:19 +1000)] 
doc: fix typos

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

12 months agodoc: document the fipsintsall option to disallow PKCS#1 version 1.5 padding for key...
Pauli [Wed, 31 Jul 2024 03:14:04 +0000 (13:14 +1000)] 
doc: document the fipsintsall option to disallow PKCS#1 version 1.5 padding for key agreement & transport

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

12 months agofipsinstall: add option to disable RSA PKCS#1 version 1.5 padding
Pauli [Wed, 31 Jul 2024 03:07:52 +0000 (13:07 +1000)] 
fipsinstall: add option to disable RSA PKCS#1 version 1.5 padding

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

12 months agoAdd a test for a missing supported_versions extension in the HRR
Matt Caswell [Thu, 1 Aug 2024 13:57:48 +0000 (14:57 +0100)] 
Add a test for a missing supported_versions extension in the HRR

Confirm that we correctly fail if supported_versions is missing from an
HRR.

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

12 months agoCheck that a supported_versions extension is present in an HRR
Matt Caswell [Thu, 1 Aug 2024 13:55:11 +0000 (14:55 +0100)] 
Check that a supported_versions extension is present in an HRR

If an HRR is sent then it MUST contain supported_versions according to the
RFC. We were sanity checking any supported_versions extension that was sent
but failed to verify that it was actually present.

Fixes #25041

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

12 months agoAdd logging support for early data
Leonie Theobald [Mon, 29 Jul 2024 13:48:01 +0000 (15:48 +0200)] 
Add logging support for early data

-trace option didn't cover early data message which resulted in
misleading logging.

CLA: trivial

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

12 months agossl: factorize and improved hex conversion code
FdaSilvaYY [Thu, 1 Aug 2024 20:51:25 +0000 (22:51 +0200)] 
ssl: factorize and improved hex conversion code

Add inline qualifier to avoid exporting a function for one unique use

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

12 months agocrypto: factorize to hex chars conversion code.
FdaSilvaYY [Thu, 1 Aug 2024 20:47:00 +0000 (22:47 +0200)] 
crypto: factorize to hex chars conversion code.

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

12 months agossl: remove stdio.h and sprintf use from libssl.
FdaSilvaYY [Thu, 18 Jul 2024 21:35:02 +0000 (23:35 +0200)] 
ssl: remove stdio.h and sprintf use from libssl.

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

12 months agoapps: add missing entry to tls extension label list
FdaSilvaYY [Thu, 18 Jul 2024 21:33:49 +0000 (23:33 +0200)] 
apps: add missing entry to tls extension label list

noticed by @sftcd

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

12 months agoFix '--strict-warnings' build breakage
FdaSilvaYY [Sat, 20 Feb 2021 23:04:07 +0000 (00:04 +0100)] 
Fix '--strict-warnings' build breakage

... due to a missing const.

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

12 months agoFix typos found by codespell
Dimitri Papadopoulos [Sun, 21 Jul 2024 09:32:06 +0000 (11:32 +0200)] 
Fix typos found by codespell

Reviewed-by: Kurt Roeckx <kurt@roeckx.be>
Reviewed-by: Tim Hudson <tjh@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/24949)

12 months agocoveralls.yml: Do not run tests in parallel
Tomas Mraz [Tue, 6 Aug 2024 13:34:00 +0000 (15:34 +0200)] 
coveralls.yml: Do not run tests in parallel

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

12 months agoFix Potential NULL pointer dereference
icy17 [Wed, 7 Aug 2024 09:07:09 +0000 (17:07 +0800)] 
Fix Potential NULL pointer dereference

CLA: trivial

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

12 months agoUse parent directory instead of index.html
Andrew Dinh [Fri, 2 Aug 2024 14:01:12 +0000 (21:01 +0700)] 
Use parent directory instead of index.html

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

12 months agoUpdate links in CONTRIBUTING.md
Andrew Dinh [Fri, 2 Aug 2024 13:58:13 +0000 (20:58 +0700)] 
Update links in CONTRIBUTING.md

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

12 months agoFix some small typos
Andrew Dinh [Fri, 2 Aug 2024 13:54:13 +0000 (20:54 +0700)] 
Fix some small typos

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

12 months agoTest vectors from rfc9579 and creation tests
Dmitry Belyavskiy [Thu, 6 Jun 2024 15:01:45 +0000 (17:01 +0200)] 
Test vectors from rfc9579 and creation tests

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

12 months agoImplementation of the RFC 9579, PBMAC1 in PKCS#12 - documentation
Dmitry Belyavskiy [Fri, 7 Jun 2024 12:38:40 +0000 (14:38 +0200)] 
Implementation of the RFC 9579, PBMAC1 in PKCS#12 - documentation

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

12 months agoImplementation of the RFC 9579, PBMAC1 in PKCS#12
Dmitry Belyavskiy [Fri, 7 Jun 2024 12:37:57 +0000 (14:37 +0200)] 
Implementation of the RFC 9579, PBMAC1 in PKCS#12

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

12 months agotest: omit failing test when using a FIPS provider that supports eddsa_no_verify_digested
Pauli [Tue, 30 Jul 2024 04:46:33 +0000 (14:46 +1000)] 
test: omit failing test when using a FIPS provider that supports eddsa_no_verify_digested

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

12 months agotest: update EdDSA tests for FIPS and no pre-hashing
Pauli [Tue, 30 Jul 2024 04:13:02 +0000 (14:13 +1000)] 
test: update EdDSA tests for FIPS and no pre-hashing

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

12 months agoEdDSA: disallow verification from a pregenerated hash when in FIPS
Pauli [Tue, 30 Jul 2024 04:11:49 +0000 (14:11 +1000)] 
EdDSA: disallow verification from a pregenerated hash when in FIPS

Also includes an indicator and the capability to bypass via configuration
or params.

Fixes #24937

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

12 months agofips: add no digested option to FIPS provider
Pauli [Tue, 30 Jul 2024 01:36:25 +0000 (11:36 +1000)] 
fips: add no digested option to FIPS provider

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

12 months agoparam: add OSSL_SIGNATURE_PARAM_EDDSA_VERIFY_DIGESTED
Pauli [Tue, 30 Jul 2024 01:29:48 +0000 (11:29 +1000)] 
param: add OSSL_SIGNATURE_PARAM_EDDSA_VERIFY_DIGESTED

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

12 months agodoc: add verify-digested param for EdDSA
Pauli [Tue, 30 Jul 2024 01:29:32 +0000 (11:29 +1000)] 
doc: add verify-digested param for EdDSA

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

12 months agodoc: add documentation for -eddsa_no_verify_digested fipsinstall option
Pauli [Tue, 30 Jul 2024 01:23:07 +0000 (11:23 +1000)] 
doc: add documentation for -eddsa_no_verify_digested fipsinstall option

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

12 months agofipsinstall: add ed_no_verify_digested option
Pauli [Tue, 30 Jul 2024 01:11:40 +0000 (11:11 +1000)] 
fipsinstall: add ed_no_verify_digested option

FIPS doesn't permit message hashes to be processed by thee algorithms.

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

12 months agoAdd FIPS DSA Keygen tests
slontis [Wed, 24 Jul 2024 07:24:33 +0000 (17:24 +1000)] 
Add FIPS DSA Keygen tests

Adjust the existing tests to disable DSA keygen in FIPS mode.

Allow evp_test to load DSA 'KeyParams' that can then be used to
perform a DSA KeyGen.

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

12 months agoDisallow DSA Keygen in the FIPS provider
slontis [Wed, 24 Jul 2024 06:33:56 +0000 (16:33 +1000)] 
Disallow DSA Keygen in the FIPS provider

This uses a FIPS indicator.
Since DSA KeyGen is only useful for DSA signing,
it reuses the DSA signing FIPS configuration option and settable ctx name.

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

12 months agoAdd KeyManagement keygen parameter getter/gettable functions.
slontis [Wed, 24 Jul 2024 06:20:14 +0000 (16:20 +1000)] 
Add KeyManagement keygen parameter getter/gettable functions.

Added OSSL_FUNC_keymgmt_gen_get_params() and
OSSL_FUNC_keymgmt_gen_gettable_params()

This will allow a FIPS indicator parameter to be queried after keygen.

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

12 months agoFix evp_test HKDF failure in crosstest 3.1.2 FIPS provider with master
slontis [Mon, 5 Aug 2024 22:40:38 +0000 (08:40 +1000)] 
Fix evp_test HKDF failure in crosstest 3.1.2 FIPS provider with master

Fixes #25089
The test to check if the FIPS indicator was correct failed in 3.1.2
since EVP_PKEY_CTX_get_params() returns 0 if there is no
gettable/getter.

The code has been modified to return 1 if there is no gettable.
Manually reproduced and tested by copying the 3.1.2 FIPS provider to master.

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

12 months agogithub: fix quoting in github workflow for jitter tests
Dimitri John Ledkov [Wed, 31 Jul 2024 10:01:35 +0000 (11:01 +0100)] 
github: fix quoting in github workflow for jitter tests

Nested quoting got ignore previously. And this way one can specify
string name directly.

Successfully run with Jitter at
https://github.com/xnox/openssl/actions/runs/10223149419/job/28289017013

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

12 months agoAdd new configurable item `pbkdf2-lower-bound-check`
pohsingwu [Fri, 26 Jul 2024 07:28:51 +0000 (15:28 +0800)] 
Add new configurable item `pbkdf2-lower-bound-check`

Since FIPS provider performs lower bound check by default from v3.0, the
default value for new configurable item will be one.

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

12 months agoAdd explicit indicator for PBKDF2
pohsingwu [Thu, 11 Jul 2024 06:44:25 +0000 (14:44 +0800)] 
Add explicit indicator for PBKDF2

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

12 months agoDo not implicitly start connection with SSL_handle_events() or SSL_poll()
Tomas Mraz [Thu, 1 Aug 2024 17:36:00 +0000 (19:36 +0200)] 
Do not implicitly start connection with SSL_handle_events() or SSL_poll()

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

12 months agoReturn infinity time from SSL_get_event_timeout when the connection is not started
Tomas Mraz [Thu, 1 Aug 2024 17:14:16 +0000 (19:14 +0200)] 
Return infinity time from SSL_get_event_timeout when the connection is not started

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

12 months agoDo not falsely start the connection through SSL_pending()/_has_pending()
Tomas Mraz [Thu, 1 Aug 2024 15:17:42 +0000 (17:17 +0200)] 
Do not falsely start the connection through SSL_pending()/_has_pending()

Fixes #25054

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

12 months agofix: util/mkinstallvars.pl mistreated LDLIBS on Unix (and Windows)
Richard Levitte [Sun, 28 Jul 2024 08:47:08 +0000 (10:47 +0200)] 
fix: util/mkinstallvars.pl mistreated LDLIBS on Unix (and Windows)

Don't do comma separation on those platforms.

Fixes #24986

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

12 months agossl_evp_cipher_fetch(): Avoid using 3DES from the FIPS provider
Tomas Mraz [Tue, 30 Jul 2024 07:31:11 +0000 (09:31 +0200)] 
ssl_evp_cipher_fetch(): Avoid using 3DES from the FIPS provider

Avoid using a fetched cipher that is decrypt-only
which is the case for 3DES from the fips provider.

Add a decrypt-only parameter to the EVP_CIPHER and test it
in libssl when fetching.

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

12 months ago3DES ciphersuites are not allowed in FIPS anymore
Tomas Mraz [Mon, 29 Jul 2024 17:49:51 +0000 (19:49 +0200)] 
3DES ciphersuites are not allowed in FIPS anymore

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

12 months agoAdd enable-weak-ssl-ciphers to full_featured CI job
Tomas Mraz [Mon, 29 Jul 2024 17:23:33 +0000 (19:23 +0200)] 
Add enable-weak-ssl-ciphers to full_featured CI job

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

12 months agoSpeed up SSL_add_{file,dir}_cert_subjects_to_stack
Clemens Lang [Wed, 31 Jul 2024 10:45:11 +0000 (12:45 +0200)] 
Speed up SSL_add_{file,dir}_cert_subjects_to_stack

The X509_NAME comparison function converts its arguments to DER using
i2d_X509_NAME before comparing the results using memcmp(). For every
invocation of the comparison function (of which there are many when
loading many certificates), it allocates two buffers of the appropriate
size for the DER encoding.

Switching to static buffers (possibly of X509_NAME_MAX size as defined
in crypto/x509/x_name.c) would not work with multithreaded use, e.g.,
when two threads sort two separate STACK_OF(X509_NAME)s at the same
time. A suitable re-usable buffer could have been added to the
STACK_OF(X509_NAME) if sk_X509_NAME_compfunc did have a void* argument,
or a pointer to the STACK_OF(X509_NAME) – but it does not.

Instead, copy the solution chosen in SSL_load_client_CA_file() by
filling an LHASH_OF(X509_NAME) with all existing names in the stack and
using that to deduplicate, rather than relying on sk_X509_NAME_find(),
which ends up being very slow.

Adjust SSL_add_dir_cert_subjects_to_stack() to keep a local
LHASH_OF(X509_NAME)s over the complete directory it is processing.

In a small benchmark that calls SSL_add_dir_cert_subjects_to_stack()
twice, once on a directory with one entry, and once with a directory
with 1000 certificates, and repeats this in a loop 10 times, this change
yields a speed-up of 5.32:

| Benchmark 1: ./bench 10 dir-1 dir-1000
|   Time (mean ± σ):      6.685 s ±  0.017 s    [User: 6.402 s, System: 0.231 s]
|   Range (min … max):    6.658 s …  6.711 s    10 runs
|
| Benchmark 2: LD_LIBRARY_PATH=. ./bench 10 dir-1 dir-1000
|   Time (mean ± σ):      1.256 s ±  0.013 s    [User: 1.034 s, System: 0.212 s]
|   Range (min … max):    1.244 s …  1.286 s    10 runs
|
| Summary
|   LD_LIBRARY_PATH=. ./bench 10 dir-1 dir-1000 ran
|    5.32 ± 0.06 times faster than ./bench 10 dir-1 dir-1000

In the worst case scenario where many entries are added to a stack that
is then repeatedly used to add more certificates, and with a larger test
size, the speedup is still very significant. With 15000 certificates,
a single pass to load them, followed by attempting to load a subset of
1000 of these 15000 certificates, followed by a single certificate, the
new approach is ~85 times faster:

| Benchmark 1: ./bench 1 dir-15000 dir-1000 dir-1
|   Time (mean ± σ):     176.295 s ±  4.147 s    [User: 174.593 s, System: 0.448 s]
|   Range (min … max):   173.774 s … 185.594 s    10 runs
|
| Benchmark 2: LD_LIBRARY_PATH=. ./bench 1 dir-15000 dir-1000 dir-1
|   Time (mean ± σ):      2.087 s ±  0.034 s    [User: 1.679 s, System: 0.393 s]
|   Range (min … max):    2.057 s …  2.167 s    10 runs
|
| Summary
|   LD_LIBRARY_PATH=. ./bench 1 dir-15000 dir-1000 dir-1 ran
|    84.48 ± 2.42 times faster than ./bench 1 dir-15000 dir-1000 dir-1

Signed-off-by: Clemens Lang <cllang@redhat.com>
Reviewed-by: Dmitry Belyavskiy <beldmit@gmail.com>
Reviewed-by: Tomas Mraz <tomas@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/25056)

12 months agoFree fetched digest in show_digests
Marc Brooks [Tue, 30 Jul 2024 20:29:34 +0000 (15:29 -0500)] 
Free fetched digest in show_digests

Fixes #24892

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

12 months agoUpdate documentation
pohsingwu [Tue, 30 Jul 2024 09:23:47 +0000 (17:23 +0800)] 
Update documentation

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

12 months agoCall key_check_passed in set_ctx_params
pohsingwu [Tue, 30 Jul 2024 09:12:55 +0000 (17:12 +0800)] 
Call key_check_passed in set_ctx_params

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

12 months agoAdd FIPS indicator tests for KDFs
pohsingwu [Fri, 12 Jul 2024 06:25:50 +0000 (14:25 +0800)] 
Add FIPS indicator tests for KDFs

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

12 months agoRestrict the length of key-derivation key used in KDFs
pohsingwu [Sun, 2 Jun 2024 11:34:13 +0000 (19:34 +0800)] 
Restrict the length of key-derivation key used in KDFs

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

12 months agoCMS_get1_crls(): Remove redundant check for NULL crls
Tomas Mraz [Thu, 18 Jul 2024 08:11:05 +0000 (10:11 +0200)] 
CMS_get1_crls(): Remove redundant check for NULL crls

Fixes Coverity 1610380

Reviewed-by: Tom Cosgrove <tom.cosgrove@arm.com>
Reviewed-by: Neil Horman <nhorman@openssl.org>
Reviewed-by: Dmitry Belyavskiy <beldmit@gmail.com>
(Merged from https://github.com/openssl/openssl/pull/24928)

12 months agodisable rwlocks on nonstop klt model
Neil Horman [Mon, 29 Jul 2024 19:17:07 +0000 (15:17 -0400)] 
disable rwlocks on nonstop klt model

It appears nonstops new threading model defines some level of rwlock
pthread api, but its not working properly.  Disable rwlocks for
_KLT_MODEL_ for now

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

12 months agoAdd error checking to CRYPTO_atomic_[load|store] calls
Neil Horman [Mon, 29 Jul 2024 19:12:00 +0000 (15:12 -0400)] 
Add error checking to CRYPTO_atomic_[load|store] calls

Noted that we didn't check return codes of the atomic loads/stores in
the new hashtable, and they can fail

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

12 months agoMake ossl_ht_delete use read-once semantics
Neil Horman [Mon, 22 Jul 2024 21:28:02 +0000 (17:28 -0400)] 
Make ossl_ht_delete use read-once semantics

To ensure that the value of h->md doesn't get recomputed during a delete
operation use ossl_rcu_deref on it

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

12 months agoFix CRYPTO_atomic_store
Neil Horman [Mon, 22 Jul 2024 21:17:54 +0000 (17:17 -0400)] 
Fix CRYPTO_atomic_store

If the implementation of this function falls to using a pthread lock to
update a value, it should be a write lock, not a read lock

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

12 months agoevp_get_digest/cipherbyname_ex(): Try to fetch if not found
Tomas Mraz [Fri, 19 Jul 2024 10:24:47 +0000 (12:24 +0200)] 
evp_get_digest/cipherbyname_ex(): Try to fetch if not found

If the name is not found in namemap, we need
to try to fetch the algorithm and query the
namemap again.

Fixes #19338

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

12 months agoAvoid leaking *ba_ret on reconnections
Tomas Mraz [Thu, 18 Jul 2024 09:01:00 +0000 (11:01 +0200)] 
Avoid leaking *ba_ret on reconnections

Also fixes Coverity 1604639
There is no point in checking ba_ret as it can never be NULL.

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

12 months agojitter: retry intermittent failures
Dimitri John Ledkov [Tue, 16 Jul 2024 12:07:44 +0000 (13:07 +0100)] 
jitter: retry intermittent failures

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

12 months agoJITTER: implement error handling from jitter library
Dimitri John Ledkov [Fri, 12 Jul 2024 20:55:14 +0000 (21:55 +0100)] 
JITTER: implement error handling from jitter library

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

12 months agoJITTER: excercise all tests in CI with JITTER seed source under certain build configu...
Dimitri John Ledkov [Thu, 11 Jul 2024 11:36:31 +0000 (12:36 +0100)] 
JITTER: excercise all tests in CI with JITTER seed source under certain build configuration

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

12 months agoJITTER: add documentation
Dimitri John Ledkov [Thu, 11 Jul 2024 11:20:09 +0000 (12:20 +0100)] 
JITTER: add documentation

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

12 months agojitter: add a new provider containing a jitter entropy source alone
Dimitri John Ledkov [Wed, 10 Jul 2024 14:39:01 +0000 (15:39 +0100)] 
jitter: add a new provider containing a jitter entropy source alone

This entropy source can be used instead of SEED-SRC. Sample
openssl.cnf configuration is provided. It is built as a separate
provider, because it is likely to require less frequent updates than
fips provider. The same build likely can span multiple generations of
FIPS 140 standard revisions.

Note that rand-instances currently chain from public/private instances
to primary, prior to consuming the seed. Thus currently a unique ESV
needs to be obtained, and resue of jitterentropy.a certificate is not
possible as is. Separately a patch will be sent to allow for
unchaining public/private RAND instances for the purpose of reusing
ESV.

Also I do wonder if it makes sense to create a fips variant of stock
SEED-SRC entropy source, which in addition to using getrandom() also
verifies that the kernel is operating in FIPS mode and thus is likely
a validated entropy source. As in on Linux, check that
/proc/sys/crypto/fips_enabled is set to 1, and similar checks on
Windows / MacOS and so on.

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

12 months agoAdd FIPS indicator to CMAC.
slontis [Mon, 29 Jul 2024 07:47:46 +0000 (17:47 +1000)] 
Add FIPS indicator to CMAC.

There is a issue currently related to CMAC TDES, when the new provider
is tested against older branches.

The new strict check caused backwards compatibility issues when
using old branch with the new FIPS provider.

To get around this CMAC now allows TDES by default, but it can be either
enabled via config or a settable. (i.e it uses an indicator)

Where the TDES cipher check can be done turned out to be problematic.
Shifting the check in the TDES cipherout of the init doesnt work because
ciphers can run thru either final or cipher (and checking on every
cipher call seemed bad). This means it needs to stay in the cipher init.
So the check needs to be done in CMAC BEFORE the underlying TDES cipher
does it check.
When using an indicator the TDES cipher needs its "encrypt-check" set
so that needs to be propagated from the CMAC object. This requires
the ability to set the param at the time the cipher ctx is inited.
An internal function was required in order to pass params to CMAC_Init.

Note also that the check was done where it is, because EVP_Q_mac() calls
EVP_MAC_CTX_set_params(ctx, cipher_param)
EVP_MAC_CTX_set_params(ctx, params)
EVP_MAC_init(ctx, key, keylen, params)
Where the second call to set_params would set up "encrypt-check" after
"cipher".

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

12 months agoAdd negative tests for SHAKE with PBKDF2 and X9.42 KDF
Pauli [Fri, 12 Jul 2024 02:30:00 +0000 (12:30 +1000)] 
Add negative tests for SHAKE with PBKDF2 and X9.42 KDF

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

12 months agoDisallow SHAKE when using PBKDF2 and X9.42 KDF
Pauli [Fri, 12 Jul 2024 02:29:08 +0000 (12:29 +1000)] 
Disallow SHAKE when using PBKDF2 and X9.42 KDF

The operation is non-sensical.

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