]> git.ipfire.org Git - thirdparty/openssl.git/log
thirdparty/openssl.git
11 months agoFix unpredictible refcount handling of d2i functions
Bernd Edlinger [Tue, 12 Mar 2024 19:04:56 +0000 (20:04 +0100)] 
Fix unpredictible refcount handling of d2i functions

The passed in reference of a ref-counted object
is free'd by d2i functions in the error handling.
However if it is not the last reference, the
in/out reference variable is not set to null here.
This makes it impossible for the caller to handle
the error correctly, because there are numerous
cases where the passed in reference is free'd
and set to null, while in other cases, where the
passed in reference is not free'd, the reference
is left untouched.

Therefore the passed in reference must be set
to NULL even when it was not the last reference.

Fixes #23713

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

11 months agoExtend test case for reused PEM_ASN1_read_bio
Bernd Edlinger [Fri, 24 Nov 2023 06:02:35 +0000 (07:02 +0100)] 
Extend test case for reused PEM_ASN1_read_bio

This is related to #22780, simply add test cases
for the different failure modes of PEM_ASN1_read_bio.
Depending on whether the PEM or the DER format is valid or not,
the passed in CRL may be deleted ot not, therefore a statement
like this:

reused_crl = PEM_read_bio_X509_CRL(b, &reused_crl, NULL, NULL);

must be avoided, because it can create memory leaks.

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

11 months agoreplace static declarations
Pauli [Fri, 16 Aug 2024 01:31:43 +0000 (11:31 +1000)] 
replace static declarations

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

11 months agoRevert "fipsinstall: add ed_no_verify_digested option"
Pauli [Wed, 14 Aug 2024 23:53:04 +0000 (09:53 +1000)] 
Revert "fipsinstall: add ed_no_verify_digested option"

This reverts commit 70b6d57fd94fe11fa2510bc8026fa6a6ead51d68.

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

11 months agoRevert "doc: add documentation for -eddsa_no_verify_digested fipsinstall option"
Pauli [Wed, 14 Aug 2024 23:52:10 +0000 (09:52 +1000)] 
Revert "doc: add documentation for -eddsa_no_verify_digested fipsinstall option"

This reverts commit b00ea9a6a2a72f5ac7b38e82c9a7b6796972fc36.

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

11 months agoRevert "doc: add verify-digested param for EdDSA"
Pauli [Wed, 14 Aug 2024 23:52:09 +0000 (09:52 +1000)] 
Revert "doc: add verify-digested param for EdDSA"

This reverts commit ab02a297eb3d7f314eea371038c0b8e4038f658b.

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

11 months agoRevert "param: add OSSL_SIGNATURE_PARAM_EDDSA_VERIFY_DIGESTED"
Pauli [Wed, 14 Aug 2024 23:52:06 +0000 (09:52 +1000)] 
Revert "param: add OSSL_SIGNATURE_PARAM_EDDSA_VERIFY_DIGESTED"

This reverts commit 5abd7e5f796a9564c5f020053833deee1b9f7c6e.

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

11 months agoRevert "fips: add no digested option to FIPS provider"
Pauli [Wed, 14 Aug 2024 23:52:04 +0000 (09:52 +1000)] 
Revert "fips: add no digested option to FIPS provider"

This reverts commit 889277effb65b7f276e375cf0176c4c8597f4203.

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

11 months agoRevert "EdDSA: disallow verification from a pregenerated hash when in FIPS"
Pauli [Wed, 14 Aug 2024 23:51:08 +0000 (09:51 +1000)] 
Revert "EdDSA: disallow verification from a pregenerated hash when in FIPS"

This reverts commit 2d759937e2ee78c27c83f1433f79b33256ab1a39.

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

11 months agoRevert "test: update EdDSA tests for FIPS and no pre-hashing"
Pauli [Wed, 14 Aug 2024 23:51:07 +0000 (09:51 +1000)] 
Revert "test: update EdDSA tests for FIPS and no pre-hashing"

This reverts commit 09eaf16771fe5b5b57cac0ddfd6bf8ca3584134b.

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

11 months agoRevert "test: omit failing test when using a FIPS provider that supports eddsa_no_ver...
Pauli [Wed, 14 Aug 2024 23:51:02 +0000 (09:51 +1000)] 
Revert "test: omit failing test when using a FIPS provider that supports eddsa_no_verify_digested"

This reverts commit 54933db9f0e1a03b644cecc6735f8f2025b748b5.

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

11 months agoRevert "Apply the FIPS_eddsa_no_verify_digested indicator on prehash EdDSA only"
Pauli [Wed, 14 Aug 2024 23:49:05 +0000 (09:49 +1000)] 
Revert "Apply the FIPS_eddsa_no_verify_digested indicator on prehash EdDSA only"

This reverts commit ca112fccdd34a8538f14ddf8c3569b8331eae357.

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

11 months agoFIPS: Remove ability to bypass the FIPS self tests
slontis [Fri, 9 Aug 2024 02:29:04 +0000 (12:29 +1000)] 
FIPS: Remove ability to bypass the FIPS self tests

This is a FIPS 140-3 requirement.
It should not be done as a FIPS indicator.

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

11 months agoChange existing evp_test KeyGen Ctrls to use provider algorithm
slontis [Fri, 26 Jul 2024 03:42:09 +0000 (13:42 +1000)] 
Change existing evp_test KeyGen Ctrls to use provider algorithm
parameter names.

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

11 months agoUpdate evp_test KeyGen
slontis [Fri, 26 Jul 2024 03:31:42 +0000 (13:31 +1000)] 
Update evp_test KeyGen

The EVP_PKEY_CTX is now created in keygen_test_run().
keygen_test_parse() inserts all values into KEYGEN_TEST_DATA.
The 'Ctrl' parameters have been changed to just be settables,
rather than using legacy controls.

Added EC keygen tests

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

11 months agoRestrict FIPS EC Keygen to only allow curves with a security strength
slontis [Fri, 26 Jul 2024 00:23:57 +0000 (10:23 +1000)] 
Restrict FIPS EC Keygen to only allow curves with a security strength
>=112 bits

Add a FIPS indicator to EC keygen

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

11 months agoEnsure the msg_callback is called on CCS receipt in TLSv1.3
Matt Caswell [Mon, 12 Aug 2024 15:41:56 +0000 (16:41 +0100)] 
Ensure the msg_callback is called on CCS receipt in TLSv1.3

CCS records are ignore in TLSv1.3. But we should still call the msg_callback
anyway.

Fixes #25166

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

11 months agoAdd FIPS Indicator for ECDH cofactor.
slontis [Thu, 8 Aug 2024 06:56:22 +0000 (16:56 +1000)] 
Add FIPS Indicator for ECDH cofactor.

FIPS KAS requires use of ECC CDH.

The EC 'B' and 'K' curves have a cofactor that is not 1, and this
MUST be multiplied by the private key when deriving the shared secret.

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

11 months agoapps/cms.c, apps/smime.c: Fix -crlfeol help messages
Andreas Treichel [Sat, 18 May 2024 06:27:46 +0000 (08:27 +0200)] 
apps/cms.c, apps/smime.c: Fix -crlfeol help messages

CLA: trivial

Reviewed-by: Todd Short <todd.short@me.com>
Reviewed-by: Tom Cosgrove <tom.cosgrove@arm.com>
Reviewed-by: Tomas Mraz <tomas@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/24434)

11 months agoFix SSL_CTX_set1_groups documentation on preference orders
David Benjamin [Fri, 8 Mar 2024 04:38:58 +0000 (23:38 -0500)] 
Fix SSL_CTX_set1_groups documentation on preference orders

The documentation currently describes SSL_CTX_set1_groups as a
preference order, but this does not match the typical interpretation of
"preference order" in OpenSSL and TLS. Typically, an application can
order more secure options ahead of less secure ones and pick up TLS's
usual downgrade protection guarantees.

TLS 1.3 servers need to balance an additional consideration: some
options will perform worse than others due to key share prediction. The
prototypical selection procedure is to first select the set of more
secure options, then select the most performant among those.

OpenSSL follows this procedure, but it *unconditionally* treats all
configured curves as equivalent security. Per discussion on GitHub,
OpenSSL's position is that this is an intended behavior.

While not supported by built-in providers, OpenSSL now documents that
external providers can extend the group list and CHANGES.md explicitly
cites post-quantum as a use case. With post-quantum providers, it's
unlikely that application developers actually wanted options to be
equivalent security. To avoid security vulnerabilities arising from
mismatched expectations, update the documentation to clarify the server
behavior.

Per the OTC decision in
https://github.com/openssl/openssl/issues/22203#issuecomment-1744465829,
this documentation fix should be backported to stable branches.

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

11 months agoapps/req.c: No warning reading from stdin if redirected
Bhaskar Metiya [Wed, 14 Aug 2024 07:27:14 +0000 (12:57 +0530)] 
apps/req.c: No warning reading from stdin if redirected

CLA: trivial

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

11 months agoReturn SSL_AD_DECRYPT_ERROR alert on PSK binder validation failure (RFC 8446)
Bhaskar Metiya [Wed, 14 Aug 2024 06:04:01 +0000 (11:34 +0530)] 
Return SSL_AD_DECRYPT_ERROR alert on PSK binder validation failure (RFC 8446)

CLA: trivial

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

11 months agofips: allow to customize provider vendor name
Dimitri John Ledkov [Fri, 10 May 2024 10:58:18 +0000 (11:58 +0100)] 
fips: allow to customize provider vendor name

FIPS providers need to specify identifiable names and versions. Allow
to customize the fips provider name prefix, via VERSION.dat which
already allows to customize version & buildinfo. With this patch
in-place it removes the need of patching code to set customized
provider name.

E.g. echo FIPS_VENDOR=ACME >> VERSION.dat, results in

```
$ OPENSSL_CONF=fips-and-base.cnf ../util/wrap.pl ../apps/openssl list -providers --verbose
Providers:
  base
    name: OpenSSL Base Provider
    version: 3.4.0
    status: active
    build info: 3.4.0-dev
    gettable provider parameters:
      name: pointer to a UTF8 encoded string (arbitrary size)
      version: pointer to a UTF8 encoded string (arbitrary size)
      buildinfo: pointer to a UTF8 encoded string (arbitrary size)
      status: integer (arbitrary size)
  fips
    name: ACME FIPS Provider for OpenSSL
    version: 3.4.0
    status: active
    build info: 3.4.0-dev
    gettable provider parameters:
      name: pointer to a UTF8 encoded string (arbitrary size)
      version: pointer to a UTF8 encoded string (arbitrary size)
      buildinfo: pointer to a UTF8 encoded string (arbitrary size)
      status: integer (arbitrary size)
      security-checks: integer (arbitrary size)
      tls1-prf-ems-check: integer (arbitrary size)
      drbg-no-trunc-md: integer (arbitrary size)
```

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

11 months agoApply the FIPS_eddsa_no_verify_digested indicator on prehash EdDSA only
Tomas Mraz [Wed, 14 Aug 2024 15:36:56 +0000 (17:36 +0200)] 
Apply the FIPS_eddsa_no_verify_digested indicator on prehash EdDSA only

Reviewed-by: Kurt Roeckx <kurt@roeckx.be>
Reviewed-by: Neil Horman <nhorman@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/25188)

11 months agoDon't compile in support for DSA speed testing if not needed
Matt Caswell [Mon, 12 Aug 2024 08:32:56 +0000 (09:32 +0100)] 
Don't compile in support for DSA speed testing if not needed

If there is no DSA support in the library we should not compile in support
for speed testing of DSA. We should skip it in much the same way that we
do for other algorithms.

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

11 months agoFix a memory leak in the speed app
Matt Caswell [Mon, 12 Aug 2024 08:04:19 +0000 (09:04 +0100)] 
Fix a memory leak in the speed app

Make sure we free the ecdsa_key object after we have finished using it.

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

11 months agoAdd a test recipe for testing the speed command
Matt Caswell [Fri, 9 Aug 2024 14:59:16 +0000 (15:59 +0100)] 
Add a test recipe for testing the speed command

Previously there was no test for the speed command. We just do some simple
testing, running the command with various options to confirm that it doesn't
crash or report errors. We use the new -testmode option to ensure that this
happens quickly and doesn't really run full speed tests.

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

11 months agoDocument the new -testmode option to the speed command
Matt Caswell [Fri, 9 Aug 2024 13:43:01 +0000 (14:43 +0100)] 
Document the new -testmode option to the speed command

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

11 months agoAdd a test mode to the speed app
Matt Caswell [Fri, 9 Aug 2024 12:27:11 +0000 (13:27 +0100)] 
Add a test mode to the speed app

We add a testmode option to the speed app which simply runs 1 iteration of
any speed tests. If anything fails along the way the app returns an error
code.

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

11 months agoUpdate krb5 to latest master to pick up CVE fixes
Shih-Yi Chen [Wed, 7 Aug 2024 21:33:53 +0000 (21:33 +0000)] 
Update krb5 to latest master to pick up CVE fixes

CLA: trivial

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

(cherry picked from commit 099a71b48b6e1f27f39b2905fb67f2afaefd9171)

11 months agoAdd EDDSA FIPS self tests.
slontis [Fri, 15 Sep 2023 02:40:39 +0000 (12:40 +1000)] 
Add EDDSA FIPS self tests.

See FIPS 140-3 IG Section 10.3.A Part 11
Indicates ECDSA requires a sign and verify test.
Note 11 states that HashEdDSA is not required to be tested if PureEdDSA is tested.
Note 12 indicates that both ED25519 and X448 need to be tested.

Since ED uses the oneshot interface, additional API's needed to be exposed to the
FIPS provider using #ifdef FIPS_MODULE.

Changed ED25518 and ED448 to use fips=true in the FIPS provider.
Updated documentation for provider lists for EDDSA.

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

11 months agoImprove the EVP_PKEY_CTX_set_kem_op() documentation
Dmitry Belyavskiy [Mon, 12 Aug 2024 12:42:59 +0000 (14:42 +0200)] 
Improve the EVP_PKEY_CTX_set_kem_op() documentation

Fixes #25142

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

11 months agotest: Improve coverage for the PBKDF2 unit tests
Pauli [Mon, 12 Aug 2024 01:08:09 +0000 (11:08 +1000)] 
test: Improve coverage for the PBKDF2 unit tests

Fixes #25136

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

11 months agoEncap/decap in pkeyutl - tests
Dmitry Belyavskiy [Thu, 8 Aug 2024 11:45:19 +0000 (13:45 +0200)] 
Encap/decap in pkeyutl - tests

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

11 months agoEncap/decap in pkeyutl - documentation
Dmitry Belyavskiy [Wed, 7 Aug 2024 15:50:51 +0000 (17:50 +0200)] 
Encap/decap in pkeyutl - documentation

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

11 months agoSupport of en/decapsulation in the pkeyutl command
Dmitry Belyavskiy [Wed, 7 Aug 2024 15:17:18 +0000 (17:17 +0200)] 
Support of en/decapsulation in the pkeyutl command

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

11 months agoadds TLS signature algorithms list feature
Michael Baentsch [Tue, 9 Jul 2024 09:07:01 +0000 (11:07 +0200)] 
adds TLS signature algorithms list feature

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

11 months agoRestrict salt length for RSA-PSS in the FIPS provider
pohsingwu [Wed, 7 Aug 2024 02:24:36 +0000 (10:24 +0800)] 
Restrict salt length for RSA-PSS in the FIPS provider

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

11 months agoSetup padding mode correctly in acvp_test
pohsingwu [Tue, 6 Aug 2024 14:40:00 +0000 (22:40 +0800)] 
Setup padding mode correctly in acvp_test

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

11 months agofipsmodule.cnf: set the signature digest checks option on installation
Pauli [Mon, 29 Jul 2024 02:42:58 +0000 (12:42 +1000)] 
fipsmodule.cnf: set the signature digest checks option on installation

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

11 months agofips: support signature-digest-checks in FIPS provider
Pauli [Mon, 29 Jul 2024 02:39:39 +0000 (12:39 +1000)] 
fips: support signature-digest-checks in FIPS provider

Fixes #24936

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

11 months agotest: add unit tests for disallowed XOF digests
Pauli [Mon, 29 Jul 2024 02:24:18 +0000 (12:24 +1000)] 
test: add unit tests for disallowed XOF digests

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

11 months agosignatures: disallow XOF digests when doing signatures
Pauli [Mon, 29 Jul 2024 02:07:39 +0000 (12:07 +1000)] 
signatures: disallow XOF digests when doing signatures

Except for Ed448 and RSA PSS where they are mandatory and allow respectively.

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

11 months agofipsinstall: use correct macro for no drbg trunc digest option
Pauli [Mon, 29 Jul 2024 02:07:09 +0000 (12:07 +1000)] 
fipsinstall: use correct macro for no drbg trunc digest option

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

11 months agotest: update fipsinstall tests to cover signature_digest_check option
Pauli [Mon, 29 Jul 2024 01:55:08 +0000 (11:55 +1000)] 
test: update fipsinstall tests to cover signature_digest_check option

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

11 months agoAdd signature digest check option to fipsinstall
Pauli [Fri, 26 Jul 2024 00:16:52 +0000 (10:16 +1000)] 
Add signature digest check option to fipsinstall

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

11 months agodoc: document -signature_digest_check option to fipsinstall
Pauli [Thu, 25 Jul 2024 23:29:05 +0000 (09:29 +1000)] 
doc: document -signature_digest_check option to fipsinstall

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

11 months agoFix typing on call to interlockedExchange for windows
Neil Horman [Fri, 26 Jul 2024 17:09:06 +0000 (13:09 -0400)] 
Fix typing on call to interlockedExchange for windows

mingw is complaining on builds about the use of InterlockedExchange on a
uint32_t type, as the input parameter here is expected to be LONG
(defined as signed 32 bit on all versions of windows).

the input value (reader_idx) will never grow larger than the group size
of the lock (nominally 2, but always a reasonably small value), so it
should be safe to just cast it to the appropriate type here.

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

11 months agoFix PBMAC1 MAC verification in FIPS mode
Dmitry Belyavskiy [Thu, 8 Aug 2024 15:20:53 +0000 (17:20 +0200)] 
Fix PBMAC1 MAC verification in FIPS mode

The check for fetchability PKCS12KDF doesn't make sense when we have a
different MAC mechanism

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

12 months agotest: add error reasons to KBKDF tests
Pauli [Thu, 8 Aug 2024 04:28:00 +0000 (14:28 +1000)] 
test: add error reasons to KBKDF 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)

12 months agotest: add positive FIPS indicator failure tests for DRBGs
Pauli [Thu, 8 Aug 2024 03:54:36 +0000 (13:54 +1000)] 
test: add positive FIPS indicator failure tests for DRBGs

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)

12 months agotest: add error reasons to TLS 1 PRF tests
Pauli [Thu, 8 Aug 2024 03:50:08 +0000 (13:50 +1000)] 
test: add error reasons to TLS 1 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)

12 months agotest: add error reasons to X9.63 test
Pauli [Thu, 8 Aug 2024 03:48:14 +0000 (13:48 +1000)] 
test: add error reasons to X9.63 test

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)

12 months agotest: add error reasons to X9.42 test
Pauli [Thu, 8 Aug 2024 03:47:05 +0000 (13:47 +1000)] 
test: add error reasons to X9.42 test

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)

12 months agotest: add error reasons to TLS 1.3 KDF tests
Pauli [Thu, 8 Aug 2024 03:46:11 +0000 (13:46 +1000)] 
test: add error reasons to TLS 1.3 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)

12 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)

12 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)

12 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)

12 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)

12 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)

12 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)

12 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)

12 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)

12 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)

12 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)

12 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)

12 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)