]> git.ipfire.org Git - thirdparty/openssl.git/log
thirdparty/openssl.git
4 days agoargon2: rename C file for conversion to generated param name decoding
Pauli [Wed, 2 Jul 2025 06:54:20 +0000 (16:54 +1000)] 
argon2: rename C file for conversion to generated param name decoding

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

4 days agokrb5kdf: convert to generated OSSL_PARAM parser
Pauli [Wed, 2 Jul 2025 06:53:40 +0000 (16:53 +1000)] 
krb5kdf: convert to generated OSSL_PARAM parser

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

4 days agokrb5kdf: update build infrastructure
Pauli [Wed, 2 Jul 2025 06:52:34 +0000 (16:52 +1000)] 
krb5kdf: update build infrastructure

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

4 days agokrb5kdf: rename C file for conversion to generated param name decoding
Pauli [Wed, 2 Jul 2025 06:45:50 +0000 (16:45 +1000)] 
krb5kdf: rename C file for conversion to generated param name decoding

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

4 days agopbkdf1: convert to generated OSSL_PARAM parser
Pauli [Wed, 2 Jul 2025 06:45:10 +0000 (16:45 +1000)] 
pbkdf1: convert to generated OSSL_PARAM parser

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

4 days agopbkdf1: update build infrastructure
Pauli [Wed, 2 Jul 2025 06:39:52 +0000 (16:39 +1000)] 
pbkdf1: update build infrastructure

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

4 days agopbkdf1: rename C file for conversion to generated param name decoding
Pauli [Wed, 2 Jul 2025 06:39:34 +0000 (16:39 +1000)] 
pbkdf1: rename C file for conversion to generated param name decoding

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

4 days agopkcs12kdf: convert to generated OSSL_PARAM parser
Pauli [Wed, 2 Jul 2025 06:37:26 +0000 (16:37 +1000)] 
pkcs12kdf: convert to generated OSSL_PARAM parser

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

4 days agopkcs12kdf: update build infrastructure
Pauli [Wed, 2 Jul 2025 06:35:24 +0000 (16:35 +1000)] 
pkcs12kdf: update build infrastructure

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

4 days agopkcs12kdf: rename C file for conversion to generated param name decoding
Pauli [Wed, 2 Jul 2025 06:34:58 +0000 (16:34 +1000)] 
pkcs12kdf: rename C file for conversion to generated param name decoding

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

4 days agoscrypt: convert to generated OSSL_PARAM parser
Pauli [Wed, 2 Jul 2025 06:28:39 +0000 (16:28 +1000)] 
scrypt: convert to generated OSSL_PARAM parser

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

4 days agoscrypt: update build infrastructure
Pauli [Wed, 2 Jul 2025 06:28:24 +0000 (16:28 +1000)] 
scrypt: update build infrastructure

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

4 days agoscrypt: rename C file for conversion to generated param name decodering
Pauli [Wed, 2 Jul 2025 06:28:09 +0000 (16:28 +1000)] 
scrypt: rename C file for conversion to generated param name decodering

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

4 days agopbkdf2: convert to generated OSSL_PARAM parser
Pauli [Wed, 2 Jul 2025 06:16:15 +0000 (16:16 +1000)] 
pbkdf2: convert to generated OSSL_PARAM parser

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

4 days agopbkdf2: build infrastructure changes
Pauli [Wed, 2 Jul 2025 05:54:13 +0000 (15:54 +1000)] 
pbkdf2: build infrastructure changes

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

4 days agopbkdf2: rename for autogeneration of param name parsing
Pauli [Wed, 2 Jul 2025 05:54:02 +0000 (15:54 +1000)] 
pbkdf2: rename for autogeneration of param name parsing

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

4 days agox9.42kdf: convert to generated OSSL_PARAM parser
Pauli [Wed, 2 Jul 2025 00:31:31 +0000 (10:31 +1000)] 
x9.42kdf: convert to generated OSSL_PARAM parser

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

4 days agobuild infrastructure changes for X9.42 KDF
Pauli [Wed, 2 Jul 2025 00:10:31 +0000 (10:10 +1000)] 
build infrastructure changes for X9.42 KDF

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

4 days agorename X9.42 KDF for autogeneration of param name parsing
Pauli [Wed, 2 Jul 2025 00:09:30 +0000 (10:09 +1000)] 
rename X9.42 KDF for autogeneration of param name parsing

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

4 days agopvkkdf: convert to generated OSSL_PARAM parser
Pauli [Wed, 2 Jul 2025 00:07:19 +0000 (10:07 +1000)] 
pvkkdf: convert to generated OSSL_PARAM parser

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

4 days agosshkdf: convert to generated OSSL_PARAM parser
Pauli [Tue, 1 Jul 2025 23:59:42 +0000 (09:59 +1000)] 
sshkdf: convert to generated OSSL_PARAM parser

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

4 days agobuild infrastructure for PVK KDF
Pauli [Tue, 1 Jul 2025 23:48:02 +0000 (09:48 +1000)] 
build infrastructure for PVK KDF

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

4 days agobuild infrastructure changes for SSH KDF
Pauli [Tue, 1 Jul 2025 23:42:20 +0000 (09:42 +1000)] 
build infrastructure changes for SSH KDF

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

4 days agorename sshkdf for autogeneration of param name parsing
Pauli [Tue, 1 Jul 2025 23:13:26 +0000 (09:13 +1000)] 
rename sshkdf for autogeneration of param name parsing

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

4 days agotls1prf: update to use generated param decoders
Pauli [Tue, 1 Jul 2025 01:42:34 +0000 (11:42 +1000)] 
tls1prf: update to use generated param decoders

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

4 days agokdf: remove max argument to the param concatenation helper
Pauli [Tue, 1 Jul 2025 00:49:50 +0000 (10:49 +1000)] 
kdf: remove max argument to the param concatenation helper

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

4 days agotls1_prf: update build infrastructure for generated param parsers
Pauli [Tue, 1 Jul 2025 00:01:00 +0000 (10:01 +1000)] 
tls1_prf: update build infrastructure for generated param parsers

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

4 days agorename tls1 PRF C file
Pauli [Mon, 30 Jun 2025 23:58:41 +0000 (09:58 +1000)] 
rename tls1 PRF C file

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

4 days agokbkdf: conversion to use generated param parsers
Pauli [Mon, 30 Jun 2025 03:10:48 +0000 (13:10 +1000)] 
kbkdf: conversion to use generated param parsers

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

4 days agosskdf: conversion to use generated param parsers
Pauli [Mon, 30 Jun 2025 03:10:40 +0000 (13:10 +1000)] 
sskdf: conversion to use generated param parsers

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

4 days agoutil: add helper functions that don't locate the parameters
Pauli [Mon, 30 Jun 2025 03:09:53 +0000 (13:09 +1000)] 
util: add helper functions that don't locate the parameters

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

4 days agoparams: add helper functions that don't locate the parameters
Pauli [Mon, 30 Jun 2025 03:09:29 +0000 (13:09 +1000)] 
params: add helper functions that don't locate the parameters

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

4 days agofips: update FIPS indicator functions so non-locating flavours are available
Pauli [Mon, 30 Jun 2025 03:08:23 +0000 (13:08 +1000)] 
fips: update FIPS indicator functions so non-locating flavours are available

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

4 days agohkdf: conversion to use generated param parsers
Pauli [Wed, 25 Jun 2025 22:12:03 +0000 (08:12 +1000)] 
hkdf: conversion to use generated param parsers

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

4 days agokdf: rename SSKDF and KBKDF for param parser generation
Pauli [Fri, 27 Jun 2025 01:55:28 +0000 (11:55 +1000)] 
kdf: rename SSKDF and KBKDF for param parser generation

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

4 days agohkdf: rename file for Perl processing
Pauli [Wed, 25 Jun 2025 00:56:43 +0000 (10:56 +1000)] 
hkdf: rename file for Perl processing

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

4 days agoparams: update param parser generator script to support duplicated parameters
Pauli [Wed, 25 Jun 2025 22:11:47 +0000 (08:11 +1000)] 
params: update param parser generator script to support duplicated parameters

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

4 days agobuild infrastructure changes for KBKDF and SSKDF to use generated param parsers
Pauli [Fri, 27 Jun 2025 01:55:55 +0000 (11:55 +1000)] 
build infrastructure changes for KBKDF and SSKDF to use generated param parsers

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

4 days agoUpdate build infrastructure for generated hkdf.c file
Pauli [Tue, 24 Jun 2025 04:05:42 +0000 (14:05 +1000)] 
Update build infrastructure for generated hkdf.c file

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

4 days agotest: seperate the integer and string fetches of the 'mode' parameter
Pauli [Mon, 30 Jun 2025 03:11:51 +0000 (13:11 +1000)] 
test: seperate the integer and string fetches of the 'mode' parameter

The generated parameter parsers don't accept duplication of parameters so this
causes an error at runtime if not seperated.

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

4 days agoparams: add additional error checking to generated param name parsers
Pauli [Thu, 26 Jun 2025 00:13:25 +0000 (10:13 +1000)] 
params: add additional error checking to generated param name parsers

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

4 days agoparams: update generated decoder based implementations to handle return code
Pauli [Wed, 25 Jun 2025 00:50:43 +0000 (10:50 +1000)] 
params: update generated decoder based implementations to handle return code

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

4 days agoparams: generated decoder functions return an error state on failure
Pauli [Wed, 25 Jun 2025 00:50:15 +0000 (10:50 +1000)] 
params: generated decoder functions return an error state on failure

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

4 days agoCMS KEMRecipientInfo support requires HKDF with fixed digests
Tomas Mraz [Thu, 31 Jul 2025 09:54:28 +0000 (11:54 +0200)] 
CMS KEMRecipientInfo support requires HKDF with fixed digests

These are not present in FIPS providers <3.6.0.

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

5 days agoRemove unnecessary OPENSSL_NO_RSA remnants
Michael Baentsch [Tue, 29 Jul 2025 10:32:00 +0000 (12:32 +0200)] 
Remove unnecessary OPENSSL_NO_RSA remnants

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

5 days agofuzz/dtlsserver.c: Remove incorrect ifdef guard
Michael Baentsch [Mon, 28 Jul 2025 04:52:49 +0000 (06:52 +0200)] 
fuzz/dtlsserver.c: Remove incorrect ifdef guard

Reviewed-by: Kurt Roeckx <kurt@roeckx.be>
Reviewed-by: Matt Caswell <matt@openssl.org>
Reviewed-by: Tomas Mraz <tomas@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/28102)

5 days agotest_tlsext_status_type(): Avoid leaking of previously allocated data
Tomas Mraz [Mon, 28 Jul 2025 08:55:45 +0000 (10:55 +0200)] 
test_tlsext_status_type(): Avoid leaking of previously allocated data

Fixes Coverity 165922616592241659223

Reviewed-by: David von Oheimb <david.von.oheimb@siemens.com>
Reviewed-by: Viktor Dukhovni <viktor@openssl.org>
Reviewed-by: Matt Caswell <matt@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/28105)

5 days agoOnly report generic error if provider did not put an error on the error queue
Ingo Franzki [Tue, 22 Jul 2025 13:09:27 +0000 (15:09 +0200)] 
Only report generic error if provider did not put an error on the error queue

Commit 72351b0d18078170af270418b2d5e9fc579cb1af added code to unconditionally
put a generic error onto the error stack, if key generation, encryption,
decryption, sign, or verify fails to ensure that there is an error entry
on the error queue, even if the provider did not itself put a specific error
onto the queue.

However, this can hide error details if an application just looks at the very
last error entry and checks for specific errors. Now, the generic error is
always the last entry, and the application won't find the expected error
entry, although it would be there as second last entry. This can lead to
different application behavior in error situations than before this change.

To fix this, only add the generic error entry if the provider did not itself
add an error entry onto the queue. That way, there always is an error on the
error queue in case of a failure, but no behavior change in case the provider
emitted the error entry itself.

Closes: https://github.com/openssl/openssl/issues/27992
Signed-off-by: Ingo Franzki <ifranzki@linux.ibm.com>
Reviewed-by: Dmitry Belyavskiy <beldmit@gmail.com>
Reviewed-by: Tomas Mraz <tomas@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/28073)

5 days agoMake ERR_count_to_mark() available to providers via 'in' dispatch array
Ingo Franzki [Tue, 22 Jul 2025 13:01:38 +0000 (15:01 +0200)] 
Make ERR_count_to_mark() available to providers via 'in' dispatch array

Functions like ERR_set_mark(), ERR_clear_last_mark(), and ERR_pop_to_mark()
are already passed to the a provider via the 'in' dispatch array of the
provider initialization function (although the documentation did not
mention them).

Also pass ERR_count_to_mark() to the provider the same way, and update
the documentation to mention all four functions.

Signed-off-by: Ingo Franzki <ifranzki@linux.ibm.com>
Reviewed-by: Dmitry Belyavskiy <beldmit@gmail.com>
Reviewed-by: Tomas Mraz <tomas@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/28073)

5 days agoFix hanging of test_external_cf_quiche
Eugene Syromiatnikov [Wed, 30 Jul 2025 13:55:14 +0000 (15:55 +0200)] 
Fix hanging of test_external_cf_quiche

The commit "Remove HARNESS_OSSL_PREFIX manipulation in the test harness"
forced all the output to be processed by the test harness, which means
that any process that keeps the stdout FD open prevents the run() call
from finishing, as was the case in the test_external_cf_quiche test that
ran quiche server in the background, but retaining the std{in,out,err}
descriptors.  Avoid that by explicitly redirecting them to a log file.

Reported-by: Tomas Mraz <tomas@openssl.org>
Fixes: 70c05fcde53cf "Remove HARNESS_OSSL_PREFIX manipulation in the test harness"
Signed-off-by: Eugene Syromiatnikov <esyr@openssl.org>
Reviewed-by: Neil Horman <nhorman@openssl.org>
Reviewed-by: Tim Hudson <tjh@openssl.org>
Reviewed-by: Tomas Mraz <tomas@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/28125)

5 days agoImplement KEMRecipientInfo (RFC9629) in CMS
Daniel Van Geest [Thu, 3 Apr 2025 10:19:43 +0000 (11:19 +0100)] 
Implement KEMRecipientInfo (RFC9629) in CMS

Also add support for ML-KEM in CMS (draft-ietf-lamps-cms-kyber).

Add the -recip_kdf and -recip_ukm parameters to `openssl cms -encrypt`
to allow the user to specify the KDF algorithm and optional user
keying material for each recipient.

A provider may indicate which RecipientInfo type is supported
for a key, otherwise CMS will try to figure it out itself. A
provider may also indicate which KDF to use in KEMRecipientInfo
if the user hasn't specified one.

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

5 days agocrypto: evp: fix potential null pointer dereference in EVP_DigestSignUpdate in m_sigver.c
Anton Moryakov [Fri, 25 Jul 2025 12:43:15 +0000 (15:43 +0300)] 
crypto: evp: fix potential null pointer dereference in EVP_DigestSignUpdate in m_sigver.c

Static analysis detected that EVP_DigestSign() could lead to null pointer
dereference in EVP_DigestSignUpdate() when pctx->pmeth is NULL. The issue
occurs in the legacy code path where pmeth is accessed without prior null
check.

This fix adds a proper null check for pctx->pmeth in the legacy section
of EVP_DigestSignUpdate() to prevent the crash when the function is called
through EVP_DigestSign() with improperly initialized context.

The check is placed in EVP_DigestSignUpdate() rather than EVP_DigestSign()
to maintain proper separation of concerns and follow OpenSSL's architectural
patterns where lower-level functions handle their own parameter validation.

Fixes potential crash in signature operations with legacy providers.

CLA: trivial
Signed-off-by: Anton Moryakov <ant.v.moryakov@gmail.com>
Reviewed-by: Tomas Mraz <tomas@openssl.org>
Reviewed-by: Paul Dale <ppzgs1@gmail.com>
(Merged from https://github.com/openssl/openssl/pull/28095)

6 days agoFix NULL check in get_ocsp_resp_from_responder
Neil Horman [Sat, 26 Jul 2025 13:30:53 +0000 (09:30 -0400)] 
Fix NULL check in get_ocsp_resp_from_responder

We assign an allocation to *sk_resp, but only check for NULL on sk_resp,
not the value it points to.

Addresses https://scan5.scan.coverity.com/#/project-view/60762/10222?selectedIssue=1659222

Reviewed-by: Viktor Dukhovni <viktor@openssl.org>
Reviewed-by: David von Oheimb <david.von.oheimb@siemens.com>
Reviewed-by: Paul Dale <ppzgs1@gmail.com>
(Merged from https://github.com/openssl/openssl/pull/28101)

6 days agoSet *sk_resp to NULL when freeing.
Neil Horman [Sat, 26 Jul 2025 13:28:01 +0000 (09:28 -0400)] 
Set *sk_resp to NULL when freeing.

Its possible for get_ocsp_resp_from_responder to return OK after having
freed *sk_resp without setting the freed pointer to NULL, leading us to
set a garbage pointer in other code.

Ensure that we set it to NULL after freeing

Addresses https://scan5.scan.coverity.com/#/project-view/60762/10222?selectedIssue=1659225

Reviewed-by: Viktor Dukhovni <viktor@openssl.org>
Reviewed-by: David von Oheimb <david.von.oheimb@siemens.com>
Reviewed-by: Paul Dale <ppzgs1@gmail.com>
(Merged from https://github.com/openssl/openssl/pull/28101)

6 days agoFix NULL check in bring_oscp_resp_in_correct_order
Neil Horman [Sat, 26 Jul 2025 13:18:11 +0000 (09:18 -0400)] 
Fix NULL check in bring_oscp_resp_in_correct_order

We assign an allocated pointer to *sk_resp but only check if sk_resp is
NULL when sk_resp is a pointer to a pointer

Addresses https://scan5.scan.coverity.com/#/project-view/60762/10222?selectedIssue=1659227

Reviewed-by: Viktor Dukhovni <viktor@openssl.org>
Reviewed-by: David von Oheimb <david.von.oheimb@siemens.com>
Reviewed-by: Paul Dale <ppzgs1@gmail.com>
(Merged from https://github.com/openssl/openssl/pull/28101)

6 days agoreduce lock contention when adding objects to ADDED_OBJ hash table
Neil Horman [Mon, 14 Jul 2025 13:12:17 +0000 (09:12 -0400)] 
reduce lock contention when adding objects to ADDED_OBJ hash table

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

6 days agomove added creation to happen outside of write lock
Neil Horman [Sun, 13 Jul 2025 12:51:41 +0000 (08:51 -0400)] 
move added creation to happen outside of write lock

We have a global ADDED_OBJ hashtable, and we check to create it
on every object add with the write lock potentially held.  move that
creation to a RUN_ONCE routine so that its always created before the
write lock is held

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

6 days agounix-Makefile.tmpl: Run find-doc-nits with env var checker too
Norbert Pocs [Fri, 18 Jul 2025 12:29:57 +0000 (14:29 +0200)] 
unix-Makefile.tmpl: Run find-doc-nits with env var checker too

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

6 days agofind-doc-nits: Check env var documentation
Norbert Pocs [Thu, 17 Jul 2025 13:42:44 +0000 (15:42 +0200)] 
find-doc-nits: Check env var documentation

Check the code (source files and .in files) for undocumented ENV
variable names. The variable name should be documented in openssl-env or
in a designated man page in the "ENVIRONMENT" section.

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

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

6 days agodoc/man1/openssl-rehash.pod.in: document PATH environment variable
Eugene Syromiatnikov [Tue, 22 Jul 2025 03:06:30 +0000 (05:06 +0200)] 
doc/man1/openssl-rehash.pod.in: document PATH environment variable

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

6 days agodoc/man7/openssl-env: document HOME environment variable usage
Eugene Syromiatnikov [Mon, 14 Jul 2025 08:26:28 +0000 (10:26 +0200)] 
doc/man7/openssl-env: document HOME environment variable usage

Seems to be the only place where it is used, as of now.

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

6 days agodoc/man7/openssl-env: document OPENSSL_TEST_LIBCTX environment variable
Eugene Syromiatnikov [Mon, 14 Jul 2025 08:25:41 +0000 (10:25 +0200)] 
doc/man7/openssl-env: document OPENSSL_TEST_LIBCTX environment variable

Complements: e89578be2930 "Test RSA oaep in fips mode"
Signed-off-by: Eugene Syromiatnikov <esyr@openssl.org>
Reviewed-by: Neil Horman <nhorman@openssl.org>
Reviewed-by: Tomas Mraz <tomas@openssl.org>
Reviewed-by: Dmitry Belyavskiy <beldmit@gmail.com>
(Merged from https://github.com/openssl/openssl/pull/28025)

6 days agodoc/man7/openssl-env: OPENSSL_TRACE: tfix
Eugene Syromiatnikov [Mon, 14 Jul 2025 08:29:56 +0000 (10:29 +0200)] 
doc/man7/openssl-env: OPENSSL_TRACE: tfix

Fixes: ee0bf38e8709 "improve and move text on OPENSSL_TRACE from doc/man1/openssl.pod to doc/man7/openssl-env.pod"
Signed-off-by: Eugene Syromiatnikov <esyr@openssl.org>
Reviewed-by: Neil Horman <nhorman@openssl.org>
Reviewed-by: Tomas Mraz <tomas@openssl.org>
Reviewed-by: Dmitry Belyavskiy <beldmit@gmail.com>
(Merged from https://github.com/openssl/openssl/pull/28025)

6 days agodoc/man7/openssl-env: sort OPENSSL_TRACE categories lexicographically
Eugene Syromiatnikov [Mon, 14 Jul 2025 07:53:51 +0000 (09:53 +0200)] 
doc/man7/openssl-env: sort OPENSSL_TRACE categories lexicographically

There is little reason to preserve the declaration order for the reader.

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

6 days agodoc/man7/openssl-env: update REF_COUNT OPENSSL_TRACE category description
Eugene Syromiatnikov [Tue, 22 Jul 2025 01:58:38 +0000 (03:58 +0200)] 
doc/man7/openssl-env: update REF_COUNT OPENSSL_TRACE category description

It seems that its usage has been changed since the initial mention
in 6d594fdf52c4 "OSSL_trace_set_channel.pod and openssl.pod:
fix missing/inconsistent category items".

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

6 days agodoc/man7/openssl-env: document QUERY OPENSSL_TRACE category
Eugene Syromiatnikov [Mon, 14 Jul 2025 07:47:26 +0000 (09:47 +0200)] 
doc/man7/openssl-env: document QUERY OPENSSL_TRACE category

Complements: eed43f8a12ef "Add a QUERY trace category"
Signed-off-by: Eugene Syromiatnikov <esyr@openssl.org>
Reviewed-by: Neil Horman <nhorman@openssl.org>
Reviewed-by: Tomas Mraz <tomas@openssl.org>
Reviewed-by: Dmitry Belyavskiy <beldmit@gmail.com>
(Merged from https://github.com/openssl/openssl/pull/28025)

6 days agodoc/man7/openssl-env: document PROVIDER OPENSSL_TRACE category
Eugene Syromiatnikov [Mon, 14 Jul 2025 07:45:54 +0000 (09:45 +0200)] 
doc/man7/openssl-env: document PROVIDER OPENSSL_TRACE category

Complements: 93296eaaa0e8 "Adding a trace category for PROVIDER calls"
Signed-off-by: Eugene Syromiatnikov <esyr@openssl.org>
Reviewed-by: Neil Horman <nhorman@openssl.org>
Reviewed-by: Tomas Mraz <tomas@openssl.org>
Reviewed-by: Dmitry Belyavskiy <beldmit@gmail.com>
(Merged from https://github.com/openssl/openssl/pull/28025)

6 days agodoc/man7/openssl-env: reword the description
Eugene Syromiatnikov [Mon, 14 Jul 2025 07:43:07 +0000 (09:43 +0200)] 
doc/man7/openssl-env: reword the description

The manual page describes not only environment variables that pertain
the library, but some of the applications as well (OPENSSL,
OPENSSL_CONFIG, and TSGET are possible examples).  Also, the effect
of the variables is not limited to the changes in default paths.

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

6 days agodoc/man7/openssl-env: document which variables are considered security-sensitive
Eugene Syromiatnikov [Fri, 11 Jul 2025 18:10:50 +0000 (20:10 +0200)] 
doc/man7/openssl-env: document which variables are considered security-sensitive

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

6 days agodoc/man7/openssl-env: document OPENSSL_DEBUG_DECC_INIT environment variable
Eugene Syromiatnikov [Fri, 11 Jul 2025 17:50:41 +0000 (19:50 +0200)] 
doc/man7/openssl-env: document OPENSSL_DEBUG_DECC_INIT environment variable

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

6 days agoDocument LEGACY_GOST_PKCS12 environment variable
Eugene Syromiatnikov [Fri, 11 Jul 2025 17:23:39 +0000 (19:23 +0200)] 
Document LEGACY_GOST_PKCS12 environment variable

Add its mention to doc/man7/openssl-env.pod and describe its semantics
in doc/man3/PKCS12_gen_mac.pod.

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

6 days agoDocument OPENSSL_MALLOC_SEED environment variable
Eugene Syromiatnikov [Fri, 11 Jul 2025 12:49:22 +0000 (14:49 +0200)] 
Document OPENSSL_MALLOC_SEED environment variable

Add its mention to doc/man3/OPENSSL_malloc.pod,
doc/man7/openssl-env.pod, and util/other.syms.

Also, reorder the variable order in doc/man7/openssl-env.pod
to a lexicographical one.

Complements: 3df5736cf303 "Improve Malloc Failure Test"
Signed-off-by: Eugene Syromiatnikov <esyr@openssl.org>
Reviewed-by: Neil Horman <nhorman@openssl.org>
Reviewed-by: Tomas Mraz <tomas@openssl.org>
Reviewed-by: Dmitry Belyavskiy <beldmit@gmail.com>
(Merged from https://github.com/openssl/openssl/pull/28025)

6 days agodoc/man3/OPENSSL_malloc: improve OPENSSL_MALLOC_FAILURES documentation
Eugene Syromiatnikov [Fri, 11 Jul 2025 12:24:59 +0000 (14:24 +0200)] 
doc/man3/OPENSSL_malloc: improve OPENSSL_MALLOC_FAILURES documentation

Reflect its ability to accept floating point numbers in the failure
probability specification.

Complements: 3df5736cf303 "Improve Malloc Failure Test"
Signed-off-by: Eugene Syromiatnikov <esyr@openssl.org>
Reviewed-by: Neil Horman <nhorman@openssl.org>
Reviewed-by: Tomas Mraz <tomas@openssl.org>
Reviewed-by: Dmitry Belyavskiy <beldmit@gmail.com>
(Merged from https://github.com/openssl/openssl/pull/28025)

6 days agodoc/man7/openssl-env.pod: document HARNESS_OSSL_PREFIX environment variable
Eugene Syromiatnikov [Thu, 10 Jul 2025 17:08:54 +0000 (19:08 +0200)] 
doc/man7/openssl-env.pod: document HARNESS_OSSL_PREFIX environment variable

For historical purposes.

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

6 days agodoc/man7/openssl-env: sort *_PROXY environment variables, add lowercase variants
Eugene Syromiatnikov [Fri, 11 Jul 2025 15:40:22 +0000 (17:40 +0200)] 
doc/man7/openssl-env: sort *_PROXY environment variables, add lowercase variants

Sort HTTP_PROXY, HTTPS_PROXY, and NO_PROXY in lexicographical order, add
mentions of the lowercase variants of the variables (as they are already
mentioned in OSSL_HTTP_parse_url(3)), in the same order, despite
it is not a lexicographical one, do minimise confusion.

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

6 days agoDocument SSL_CIPHER environment variable
Eugene Syromiatnikov [Thu, 10 Jul 2025 17:05:33 +0000 (19:05 +0200)] 
Document SSL_CIPHER environment variable

It is apparently checked/used by openssl s_time when -cipher option
is not set.

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

6 days agodoc/man7/openssl-env: sort the variables in lexicographical order
Eugene Syromiatnikov [Thu, 10 Jul 2025 13:49:05 +0000 (15:49 +0200)] 
doc/man7/openssl-env: sort the variables in lexicographical order

The initial commit that has added the manual page (22bb8c254555 "Document
more env var stuff, fix some typo's") had them sorted.

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

6 days agodoc/man7/openssl-env: sort the capability envvars/links lexicographically
Eugene Syromiatnikov [Thu, 10 Jul 2025 13:21:33 +0000 (15:21 +0200)] 
doc/man7/openssl-env: sort the capability envvars/links lexicographically

Put the mentions of OPENSSL_*cap environment variables and man page
references in lexicographical order.  Also, add an Oxford comma before
"and" in the man page references.

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

6 days agoutil/other.syms: sort OPENSSL_*cap lexicographically, add missing variables
Eugene Syromiatnikov [Fri, 11 Jul 2025 12:46:24 +0000 (14:46 +0200)] 
util/other.syms: sort OPENSSL_*cap lexicographically, add missing variables

The list includes OPENSSL_ia32cap, OPENSSL_riscvcap, and OPENSSL_s390xcap,
but not OPENSSL_armcap, OPENSSL_ppccap, or OPENSSL_sparcv9cap;  fix that.

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

6 days agoapps/lib/apps.c: remove HARNESS_OSSL_PREFIX envvar handling
Eugene Syromiatnikov [Mon, 21 Jul 2025 11:37:16 +0000 (13:37 +0200)] 
apps/lib/apps.c: remove HARNESS_OSSL_PREFIX envvar handling

As the environment variable is no longer used by the test harness,
its support can be removed from the openssl command, along
with the possible unintended consequences of prefixing the standard
output of the openssl command with an arbitrary string set
in the environment.

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

6 days agoRemove HARNESS_OSSL_PREFIX manipulation in the test harness
Eugene Syromiatnikov [Mon, 21 Jul 2025 11:32:24 +0000 (13:32 +0200)] 
Remove HARNESS_OSSL_PREFIX manipulation in the test harness

The aim of HARNESS_OSSL_PREFIX environment variable is to avoid contaminating
TAP producer's output with stanzas that can be interpreted by a TAP producer
by prefixing them with comment;  this can be achieved by processing
the output within the runner instead, as it already does for non-standard
prefixes;  it also has the added benefit of alleviating the need
to reset it for the external tests in order to avoid messing
with their output checks.

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

6 days agoPairwise check for DH keys import as part of FIPS
Nikola Pajkovsky [Thu, 17 Jul 2025 10:45:49 +0000 (12:45 +0200)] 
Pairwise check for DH keys import as part of FIPS

For DH key import, it appears the PCT and assurances are implemented in
the source but are not be performed by default.

Signed-off-by: Nikola Pajkovsky <nikolap@openssl.org>
Reviewed-by: Neil Horman <nhorman@openssl.org>
Reviewed-by: Viktor Dukhovni <viktor@openssl.org>
Reviewed-by: Tomas Mraz <tomas@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/28058)

6 days agoUpdate dh_pub to be pairwise consistent with dh_priv
Nikola Pajkovsky [Wed, 16 Jul 2025 12:37:58 +0000 (14:37 +0200)] 
Update dh_pub to be pairwise consistent with dh_priv

Signed-off-by: Nikola Pajkovsky <nikolap@openssl.org>
Reviewed-by: Neil Horman <nhorman@openssl.org>
Reviewed-by: Viktor Dukhovni <viktor@openssl.org>
Reviewed-by: Tomas Mraz <tomas@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/28058)

7 days agoExchange no-sm2 and no-ssl-trace between on PR and daily jobs
Tomas Mraz [Mon, 28 Jul 2025 09:15:52 +0000 (11:15 +0200)] 
Exchange no-sm2 and no-ssl-trace between on PR and daily jobs

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

7 days agotest-ec: Skip SM2 key import test if SM2 is disabled
Tomas Mraz [Mon, 28 Jul 2025 09:13:06 +0000 (11:13 +0200)] 
test-ec: Skip SM2 key import test if SM2 is disabled

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

8 days agoFixed #27506, now the behavior with an empty IDN is the same as with
Igor Ustinov [Wed, 23 Jul 2025 17:48:50 +0000 (20:48 +0300)] 
Fixed #27506, now the behavior with an empty IDN is the same as with
an incorrect IDN.

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

8 days ago- adding a missing file
Alexandr Nedvedicky [Tue, 22 Jul 2025 21:31:57 +0000 (23:31 +0200)] 
- adding a missing file

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

8 days ago- changes suggested by @t8m
Alexandr Nedvedicky [Tue, 22 Jul 2025 20:59:28 +0000 (22:59 +0200)] 
- changes suggested by @t8m

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

8 days ago- fix RFC reference and indentation
sashan [Mon, 21 Jul 2025 06:57:41 +0000 (08:57 +0200)] 
- fix RFC reference and indentation

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

8 days agoUpdate ssl/quic/quic_ackm.c
Sashan [Mon, 21 Jul 2025 06:44:17 +0000 (08:44 +0200)] 
Update ssl/quic/quic_ackm.c

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

8 days agoUpdate ssl/quic/quic_ackm.c
Sashan [Mon, 21 Jul 2025 06:43:49 +0000 (08:43 +0200)] 
Update ssl/quic/quic_ackm.c

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

8 days agoACK manager must avoid infinite probe time when waiting handshake confirmation
sashan [Tue, 15 Jul 2025 13:09:40 +0000 (15:09 +0200)] 
ACK manager must avoid infinite probe time when waiting handshake confirmation

According to RFC 9002, section 6.2.2.1 the client the client must keep PTO (probe
time out) armed if it has not seen HANDSHAKE_DONE quic message from server.
Not following RFC spec here may cause the QUIC session to stale during TLS handshake.

Fixes openssl/project#1266

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

9 days agoAdd a test of 'openssl storeutl' with a BER-encoded PKCS#12 file
Richard Levitte [Wed, 16 Jul 2025 13:08:48 +0000 (15:08 +0200)] 
Add a test of 'openssl storeutl' with a BER-encoded PKCS#12 file

The test file (test-BER.p12) was given to us by David von Oheimb

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

9 days agoFix OSSL_STORE to consider cached info in the EOF check.
Richard Levitte [Thu, 10 Jul 2025 15:55:50 +0000 (17:55 +0200)] 
Fix OSSL_STORE to consider cached info in the EOF check.

OSSL_STORE_load() called OSSL_STORE_eof() before checking if there is
cached OSSL_STORE_INFO to consider.  To fix this issue, the cached info
check is moved to OSSL_STORE_eof(), as that seems to make most common
sense.

This solves an issue with PKCS#12 files, where the cached info was never
considered because the underlying file IO layer signaled that EOF is
reached.

Fixes #28010

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

10 days agoUpdate workflows to test msquic with OpenSSL
Andrew Dinh [Wed, 16 Jul 2025 14:24:28 +0000 (21:24 +0700)] 
Update workflows to test msquic with OpenSSL

Update GitHub Workflows to build msquic with OpenSSL with TLS backend, push to Quay.io, and test with current QUIC interop workflow

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

10 days agoAdd support for TLS 1.3 OCSP multi-stapling for server certs
martin [Fri, 7 Feb 2025 13:22:41 +0000 (14:22 +0100)] 
Add support for TLS 1.3 OCSP multi-stapling for server certs

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

10 days agosm2: sm2_sign.c: check EC_KEY_get0_private_key() for NULL in sm2_sig_gen()
AntonMoryakov [Mon, 2 Jun 2025 10:14:28 +0000 (13:14 +0300)] 
sm2: sm2_sign.c: check EC_KEY_get0_private_key() for NULL in sm2_sig_gen()

Static analysis revealed that sm2_sig_gen() dereferences the return value
of EC_KEY_get0_private_key() without checking for NULL. This could lead to
a crash if the private key is unset.

This patch adds a NULL check and raises ERR_R_PASSED_NULL_PARAMETER if the
key is missing.

Issue found by static analyzer:
> Return value of EC_KEY_get0_private_key() is dereferenced without checking for NULL (11/12 checked)

CLA: trivial
Signed-off-by: Anton Moryakov <ant.v.moryakov@gmail.com>
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/27741)

10 days agofix SM2 privatekey decode(PEM format, ECPrivateKey).
Alen Yan [Wed, 9 Jul 2025 01:23:00 +0000 (09:23 +0800)] 
fix SM2 privatekey decode(PEM format, ECPrivateKey).

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

11 days agoopenssl rand command should use the loaded library context
Daniel Van Geest [Wed, 23 Jul 2025 08:30:57 +0000 (10:30 +0200)] 
openssl rand command should use the loaded library context

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

11 days agotest/timing_load_creds.c: Add fclose() if error occurs
Jiasheng Jiang [Wed, 9 Jul 2025 21:10:51 +0000 (21:10 +0000)] 
test/timing_load_creds.c: Add fclose() if error occurs

Add fclose() if error occurs to release fp.

Fixes: 6212fc6814 ("Add a stand-alone "timing" program")
Signed-off-by: Jiasheng Jiang <jiashengjiangcool@gmail.com>
Reviewed-by: Kurt Roeckx <kurt@roeckx.be>
Reviewed-by: Paul Dale <ppzgs1@gmail.com>
(Merged from https://github.com/openssl/openssl/pull/28007)