]> git.ipfire.org Git - thirdparty/openssl.git/log
thirdparty/openssl.git
4 weeks agotests: Add CMS tests for no-attribute signing for ML/SLH-DSA and EdDSA
Stefan Berger [Tue, 14 Oct 2025 22:23:28 +0000 (17:23 -0500)] 
tests: Add CMS tests for no-attribute signing for ML/SLH-DSA and EdDSA

Add CMS test cases for no-attribute signing for ML-DSA, SLH-DSA
amd EdDSA (Ed448 and Ed25519 keys).

Fixes: #11915
Signed-off-by: Stefan Berger <stefanb@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/28923)

4 weeks agocms: Enable signature verification for no-attribute case (hashless signing)
Stefan Berger [Mon, 13 Oct 2025 18:54:17 +0000 (13:54 -0500)] 
cms: Enable signature verification for no-attribute case (hashless signing)

Enable signature verification for hashless signing schemes, such as ML-DSA
and EdDSA, for the non-attribute case of CMS. Also in this case the BIO
with the plain input data needs to be passed through to the signature
verification function so that the pure-mode signature verification method
can hash the plain data itself.

Signed-off-by: Stefan Berger <stefanb@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/28923)

4 weeks agocms: Enable signing with hashless signing for no-attributes case
Stefan Berger [Mon, 13 Oct 2025 16:00:38 +0000 (11:00 -0500)] 
cms: Enable signing with hashless signing for no-attributes case

Enable the ability to sign with a hashless signing schemes, such as ML-DSA
in pure mode, in case no attributes are used in CMS. To support this, pass
the BIO with the plain data through to the signing function so that key's
pure mode signing scheme can hash the data itself.

The current implementation relies on a seek'able BIO so that the data
stream can be read multiple times for support of multiple keys.

Some signing schemes, such as ML-DSA, support the message_update function
when signing data, others, such as EdDSA keys do not support it. The former
allows for reading data in smaller chunks and calling
EVP_PKEY_sign_message_update with the data, while the latter requires that
all data are all read into memory and then passed for signing. This latter
method could run into out-of-memory issue when signing very large files.

Fixes: #28279
Signed-off-by: Stefan Berger <stefanb@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/28923)

4 weeks agocms: Get a default hash for hash-less signing schemes
Stefan Berger [Tue, 14 Oct 2025 22:52:45 +0000 (17:52 -0500)] 
cms: Get a default hash for hash-less signing schemes

Get a default hash for hash-less signing schemes such as ML-DSA, SLH-DSA,
and EdDSA in the case when signed attributes are present as well as for the
no signed attributes case. For the latter case, EdDSA is the only signing
scheme that has a required hash (sha512 for ED25519 and shake256 for
ED448), all other ones have a suggested hash. Only use the suggested hash
if the hash provided by the caller of CMS_add1_signer passed a NULL pointer
for md. Use the required hash in any case, overriding any choice of the
caller.

Fixes: #13523
Signed-off-by: Stefan Berger <stefanb@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/28923)

4 weeks agoapps/s_socket: fix FD and addrinfo leak on SCTP failure in init_client
Joshua Rogers [Sat, 11 Oct 2025 22:34:40 +0000 (06:34 +0800)] 
apps/s_socket: fix FD and addrinfo leak on SCTP failure in init_client

If BIO_new_dgram_sctp(*sock, BIO_NOCLOSE) fails we returned 0 directly,
skipping the out: cleanup and leaking the just created socket plus the
addrinfo lists.

Signed-off-by: Joshua Rogers <MegaManSec@users.noreply.github.com>
Reviewed-by: Dmitry Belyavskiy <beldmit@gmail.com>
Reviewed-by: Tom Cosgrove <tom.cosgrove@arm.com>
(Merged from https://github.com/openssl/openssl/pull/28917)

4 weeks agocrypto/bio/bss_acpt: set b->init only on successful BIO_parse_hostserv
Joshua Rogers [Sat, 11 Oct 2025 21:43:38 +0000 (05:43 +0800)] 
crypto/bio/bss_acpt: set b->init only on successful BIO_parse_hostserv

BIO_C_SET_ACCEPT with num == 0 unconditionally set b->init = 1 even if
BIO_parse_hostserv failed. Only mark the BIO initialized when parsing
succeeds to avoid inconsistent state.

Signed-off-by: Joshua Rogers <MegaManSec@users.noreply.github.com>
Reviewed-by: Saša Nedvědický <sashan@openssl.org>
Reviewed-by: Dmitry Belyavskiy <beldmit@gmail.com>
(Merged from https://github.com/openssl/openssl/pull/28912)

4 weeks agoasn_mime: Harden SMIME_write_ASN1_ex() against an empty stack
Joshua Rogers [Sat, 11 Oct 2025 12:27:52 +0000 (20:27 +0800)] 
asn_mime: Harden SMIME_write_ASN1_ex() against an empty stack

Label an empty digest list as `signed-data` instead of `certs-only`.

Signed-off-by: Joshua Rogers <MegaManSec@users.noreply.github.com>
Reviewed-by: Saša Nedvědický <sashan@openssl.org>
Reviewed-by: Tomas Mraz <tomas@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/28881)

4 weeks agoasn_mime: Harden multi_split() against pushing NULL if a section is empty
Joshua Rogers [Sat, 11 Oct 2025 12:25:46 +0000 (20:25 +0800)] 
asn_mime: Harden multi_split() against pushing NULL if a section is empty

Signed-off-by: Joshua Rogers <MegaManSec@users.noreply.github.com>
Reviewed-by: Saša Nedvědický <sashan@openssl.org>
Reviewed-by: Tomas Mraz <tomas@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/28881)

4 weeks agoasn_mime: Harden strip_eol()
Joshua Rogers [Sat, 11 Oct 2025 12:24:58 +0000 (20:24 +0800)] 
asn_mime: Harden strip_eol()

Signed-off-by: Joshua Rogers <MegaManSec@users.noreply.github.com>
Reviewed-by: Saša Nedvědický <sashan@openssl.org>
Reviewed-by: Tomas Mraz <tomas@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/28881)

4 weeks agoasn_mime: Harden strip_end() against empty strings
Joshua Rogers [Sat, 11 Oct 2025 12:23:30 +0000 (20:23 +0800)] 
asn_mime: Harden strip_end() against empty strings

Signed-off-by: Joshua Rogers <MegaManSec@users.noreply.github.com>
Reviewed-by: Saša Nedvědický <sashan@openssl.org>
Reviewed-by: Tomas Mraz <tomas@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/28881)

4 weeks agocomp/zstd: fix BIO_CTRL_RESET to properly reset state
Joshua Rogers [Fri, 10 Oct 2025 23:15:05 +0000 (07:15 +0800)] 
comp/zstd: fix BIO_CTRL_RESET to properly reset state

BIO_CTRL_RESET zeroed compress.bufsize and did not reinitialize the ZSTD
streams or buffer positions. After a reset, the next write could try to use
a 0 byte buffer and stall or behave unpredictably.

Signed-off-by: Joshua Rogers <MegaManSec@users.noreply.github.com>
Reviewed-by: Saša Nedvědický <sashan@openssl.org>
Reviewed-by: Tomas Mraz <tomas@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/28844)

4 weeks agoFix CI Provider compatibility test breakage
slontis [Mon, 17 Nov 2025 03:37:00 +0000 (14:37 +1100)] 
Fix CI Provider compatibility test breakage

Fixes #29142

In https://github.com/openssl/openssl/pull/28349 I forgot to tag
to run 'extended tests', and the additional RSA keygen acvp test
did not check for backwards compatability when testing against
older FIPS providers.

Reviewed-by: Paul Dale <paul.dale@oracle.com>
Reviewed-by: Paul Yang <paulyang.inf@gmail.com>
(Merged from https://github.com/openssl/openssl/pull/29157)

4 weeks agoquic/quic_demux: Mirror int overflow check from demux_alloc_urxe into demux_resize_urxe
Joshua Rogers [Sun, 12 Oct 2025 00:14:24 +0000 (08:14 +0800)] 
quic/quic_demux: Mirror int overflow check from demux_alloc_urxe into demux_resize_urxe

Simple hardening. In practice new_alloc_len usually comes from demux->mtu or test injection length, but adding the same check here quiets analyzers.

Signed-off-by: Joshua Rogers <MegaManSec@users.noreply.github.com>
Reviewed-by: Neil Horman <nhorman@openssl.org>
Reviewed-by: Saša Nedvědický <sashan@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/28918)

4 weeks agoAdd negative test for PKCS12_SAFEBAG_get0_bag*() functions
Tomas Mraz [Wed, 12 Nov 2025 15:59:46 +0000 (16:59 +0100)] 
Add negative test for PKCS12_SAFEBAG_get0_bag*() functions

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

4 weeks agoAdd safety checks to PKCS12_SAFEBAG_get0_bag*() functions
Tomas Mraz [Wed, 12 Nov 2025 15:49:04 +0000 (16:49 +0100)] 
Add safety checks to PKCS12_SAFEBAG_get0_bag*() functions

Fixes #26655

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

4 weeks agoSimplify x509 time checking
Bob Beck [Wed, 22 Oct 2025 03:34:56 +0000 (21:34 -0600)] 
Simplify x509 time checking

This changes x509 verification to use int64 values of epoch
seconds internally instead of time_t. While time values from
a system will still come from/to a platform dependant time_t
which could be range constrained, we can simplify this
to convert the certificate time to a posix time and then
just do a normal comparison of the int64_t values. This
removes the need to do further computation to compare values
which potentially do not cover the range of certificate times,
and makes the internal functions a bit more readable.

This also modifies the tests to ensure the full range of
times are tested, without depending on time_t, and adds
tests for checking CRL expiry, which were lacking before.

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

4 weeks agoTest invalid out of range character handling in UTF8_getc()
Tomas Mraz [Tue, 11 Nov 2025 09:11:44 +0000 (10:11 +0100)] 
Test invalid out of range character handling in UTF8_getc()

Reviewed-by: Dmitry Belyavskiy <beldmit@gmail.com>
Reviewed-by: Paul Dale <paul.dale@oracle.com>
Reviewed-by: Norbert Pocs <norbertp@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/29119)

4 weeks agoUTF8_getc(): Fail with UTF8 values outside UNICODE_LIMIT
Tomas Mraz [Tue, 11 Nov 2025 09:08:30 +0000 (10:08 +0100)] 
UTF8_getc(): Fail with UTF8 values outside UNICODE_LIMIT

Reported by Aniruddhan Murali

Reviewed-by: Dmitry Belyavskiy <beldmit@gmail.com>
Reviewed-by: Paul Dale <paul.dale@oracle.com>
Reviewed-by: Norbert Pocs <norbertp@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/29119)

5 weeks agoTLS 1.3 session resumption convert nonce_label to ASCII hex
Angel Baez [Wed, 12 Nov 2025 12:46:28 +0000 (07:46 -0500)] 
TLS 1.3 session resumption convert nonce_label to ASCII hex

Fixes #27815
CLA: trivial

Reviewed-by: Bernd Edlinger <bernd.edlinger@hotmail.de>
Reviewed-by: Matt Caswell <matt@openssl.org>
Reviewed-by: Paul Dale <paul.dale@oracle.com>
Reviewed-by: Tomas Mraz <tomas@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/29127)

5 weeks agoDependabot update
dependabot[bot] [Wed, 12 Nov 2025 17:06:32 +0000 (17:06 +0000)] 
Dependabot update

CLA: trivial

(deps): Bump cross-platform-actions/action

Bumps [cross-platform-actions/action](https://github.com/cross-platform-actions/action) from 0.27.0 to 0.30.0.
- [Release notes](https://github.com/cross-platform-actions/action/releases)
- [Changelog](https://github.com/cross-platform-actions/action/blob/master/changelog.md)
- [Commits](https://github.com/cross-platform-actions/action/compare/fe0167d8082ac584754ef3ffb567fded22642c7d...46e8d7fb25520a8d6c64fd2b7a1192611da98eda)

---
updated-dependencies:
- dependency-name: cross-platform-actions/action
  dependency-version: 0.30.0
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Reviewed-by: Richard Levitte <levitte@openssl.org>
Reviewed-by: Tomas Mraz <tomas@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/29129)

5 weeks agoDependabot update
dependabot[bot] [Tue, 11 Nov 2025 17:05:59 +0000 (17:05 +0000)] 
Dependabot update

CLA: trivial

(deps): Bump docker/setup-docker-action

Bumps [docker/setup-docker-action](https://github.com/docker/setup-docker-action) from 4.4.0 to 4.5.0.
- [Release notes](https://github.com/docker/setup-docker-action/releases)
- [Commits](https://github.com/docker/setup-docker-action/compare/3fb92d6d9c634363128c8cce4bc3b2826526370a...efe9e3891a4f7307e689f2100b33a155b900a608)

---
updated-dependencies:
- dependency-name: docker/setup-docker-action
  dependency-version: 4.5.0
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Reviewed-by: Saša Nedvědický <sashan@openssl.org>
Reviewed-by: Richard Levitte <levitte@openssl.org>
Reviewed-by: Tomas Mraz <tomas@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/29126)

5 weeks agoDependabot update
dependabot[bot] [Tue, 11 Nov 2025 17:05:50 +0000 (17:05 +0000)] 
Dependabot update

CLA: trivial

(deps): Bump dtolnay/rust-toolchain

Bumps [dtolnay/rust-toolchain](https://github.com/dtolnay/rust-toolchain) from 6d653acede28d24f02e3cd41383119e8b1b35921 to 0f44b27771c32bda9f458f75a1e241b09791b331.
- [Release notes](https://github.com/dtolnay/rust-toolchain/releases)
- [Commits](https://github.com/dtolnay/rust-toolchain/compare/6d653acede28d24f02e3cd41383119e8b1b35921...0f44b27771c32bda9f458f75a1e241b09791b331)

---
updated-dependencies:
- dependency-name: dtolnay/rust-toolchain
  dependency-version: 0f44b27771c32bda9f458f75a1e241b09791b331
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <support@github.com>
Reviewed-by: Saša Nedvědický <sashan@openssl.org>
Reviewed-by: Tomas Mraz <tomas@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/29125)

5 weeks agoDependabot update
dependabot[bot] [Fri, 7 Nov 2025 17:05:59 +0000 (17:05 +0000)] 
Dependabot update

CLA: trivial

(deps): Bump actions/setup-python

Bumps [actions/setup-python](https://github.com/actions/setup-python) from 5.3.0 to 6.0.0.
- [Release notes](https://github.com/actions/setup-python/releases)
- [Commits](https://github.com/actions/setup-python/compare/v5.3.0...v6.0.0)

---
updated-dependencies:
- dependency-name: actions/setup-python
  dependency-version: 6.0.0
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
Reviewed-by: Saša Nedvědický <sashan@openssl.org>
Reviewed-by: Richard Levitte <levitte@openssl.org>
Reviewed-by: Tomas Mraz <tomas@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/29105)

5 weeks agoinfo: Print CPUINFO for SPARCv9 processors
nia [Mon, 10 Nov 2025 22:36:18 +0000 (23:36 +0100)] 
info: Print CPUINFO for SPARCv9 processors

Signed-off-by: Nia Alarie <nia@NetBSD.org>
Reviewed-by: Paul Dale <paul.dale@oracle.com>
Reviewed-by: Shane Lontis <shane.lontis@oracle.com>
Reviewed-by: Tomas Mraz <tomas@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/29116)

5 weeks agoNote about different exclusion of GREASE extensions
Igor Ustinov [Tue, 4 Nov 2025 15:43:49 +0000 (16:43 +0100)] 
Note about different exclusion of GREASE extensions

Different SSL_client_hello_* functions have different behavior
in regards to GREASE extensions.

Fixes #27580

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

5 weeks agoRSA: Update RSA keygen.
slontis [Wed, 27 Aug 2025 04:24:59 +0000 (14:24 +1000)] 
RSA: Update RSA keygen.

The documentation now reference(s) FIPS 186-5 instead of FIPS 186-4,
and clarifies the keygen method used.

This PR also adds the new FIPS 186-5 2 optional parameters that allow
the generated probable primes to be congruent to a value mod 8.

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

5 weeks agorevert changes in "FIPS Check and ABIDIFF" workflow
Dmitry Misharov [Mon, 10 Nov 2025 09:11:18 +0000 (10:11 +0100)] 
revert changes in "FIPS Check and ABIDIFF" workflow

Applying labels is not possible from pull request
context. This commit reverts changes from
8948ccdf03435368cd894b944b116e6c5a17ec59 commit.

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

5 weeks agoRun CIFuzz workflow on schedule
Dmitry Misharov [Wed, 5 Nov 2025 15:48:02 +0000 (16:48 +0100)] 
Run CIFuzz workflow on schedule

There is no point to run oss-fuzz on each pull request.

Reviewed-by: Bernd Edlinger <bernd.edlinger@hotmail.de>
Reviewed-by: Tomas Mraz <tomas@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/29080)

5 weeks agodoc/man3/X509_STORE_get0_param.pod: mention how to free the returned objects
Eugene Syromiatnikov [Mon, 27 Oct 2025 09:17:57 +0000 (10:17 +0100)] 
doc/man3/X509_STORE_get0_param.pod: mention how to free the returned objects

It is not entirely obvious from the description how the objects returned
by X509_STORE_get1_objects() and X509_STORE_get1_all_certs() are
supposed to be freed, explicitly mention the relevant calls, and provide
a reference to DEFINE_STACK_OF(3).

Signed-off-by: Eugene Syromiatnikov <esyr@openssl.org>
Reviewed-by: Saša Nedvědický <sashan@openssl.org>
Reviewed-by: Todd Short <todd.short@me.com>
(Merged from https://github.com/openssl/openssl/pull/29002)

5 weeks agoDJGPP configuration fix, based on the PR #27595
Igor Ustinov [Thu, 6 Nov 2025 21:08:17 +0000 (22:08 +0100)] 
DJGPP configuration fix, based on the PR #27595

Fixes #27514

Reviewed-by: Matt Caswell <matt@openssl.org>
Reviewed-by: Paul Dale <paul.dale@oracle.com>
(Merged from https://github.com/openssl/openssl/pull/29093)

5 weeks agoConfigure: Add missing variables in build.info
Orgad Shaneh [Thu, 6 Nov 2025 11:52:51 +0000 (13:52 +0200)] 
Configure: Add missing variables in build.info

Fixes the following warnings:
No value given for CMAKECONFIGDIR
No value given for PKGCONFIGDIR
No value given for libdir

Reviewed-by: Richard Levitte <levitte@openssl.org>
Reviewed-by: Paul Dale <paul.dale@oracle.com>
Reviewed-by: Tomas Mraz <tomas@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/29084)

5 weeks agoClarify processing of CRYPTO frame in SSL_set_quic_tls_cbs(3ossl)
Alexandr Nedvedicky [Wed, 5 Nov 2025 07:24:59 +0000 (08:24 +0100)] 
Clarify processing of CRYPTO frame in SSL_set_quic_tls_cbs(3ossl)

We should remind 3rd-party QUIC stack implementors their QUIC stack
must ensure to provide all CRYPTO frames to OpeNSSL/TLS for processing.
The CRYPTO frames keeping coming even after confirmation of TLS
hanndshake.

Fixes #28963

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

5 weeks agoEnable ARMV8_UNROLL12_EOR3 optimization for Neoverse N2/N3
Gowtham Suresh Kumar [Tue, 14 Oct 2025 17:03:36 +0000 (17:03 +0000)] 
Enable ARMV8_UNROLL12_EOR3 optimization for Neoverse N2/N3

Unlike Neoverse N1, the Neoverse N2 and Neoverse N3 cores support the
EOR3 instruction. Enabling ARMV8_UNROLL12_EOR3 on these cores gives
performance uplift of 9-10% for AES-CTR 128/192/256 ciphers at larger
block sizes.

Signed-off-by: Gowtham Suresh Kumar <gowtham.sureshkumar@arm.com>
Reviewed-by: Tom Cosgrove <tom.cosgrove@arm.com>
Reviewed-by: Tomas Mraz <tomas@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/29044)

5 weeks agoAdd support for Arm V3_AE platform
Paul Elliott [Thu, 25 Sep 2025 10:41:33 +0000 (11:41 +0100)] 
Add support for Arm V3_AE platform

Add cpu MIDR and ensure relevant optimisations are enabled.

Signed-off-by: Paul Elliott <paul.elliott@arm.com>
Reviewed-by: Tom Cosgrove <tom.cosgrove@arm.com>
Reviewed-by: Tomas Mraz <tomas@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/29044)

5 weeks agoslh_dsa: fix leak in early return of slh_sign_internal()
Lidong Yan [Fri, 31 Oct 2025 06:40:06 +0000 (14:40 +0800)] 
slh_dsa: fix leak in early return of slh_sign_internal()

In slh_sign_internal(), if calling PACKET_buf_init() failed, this
function return without free wpkt. Replace `return 0` with `goto err`
to free wpkt before return.

CLA: trivial
Signed-off-by: Lidong Yan <502024330056@smail.nju.edu.cn>
Reviewed-by: Matt Caswell <matt@openssl.org>
Reviewed-by: Paul Dale <paul.dale@oracle.com>
(Merged from https://github.com/openssl/openssl/pull/29041)

5 weeks agocrypto/bn/rsaz_exp.h: use constant_time_select_bn in bn_select_words
Eugene Syromiatnikov [Fri, 31 Oct 2025 01:16:04 +0000 (02:16 +0100)] 
crypto/bn/rsaz_exp.h: use constant_time_select_bn in bn_select_words

MSVC complained about possible loss of data on assignment, and it seems
that constant_time_select_bn is more suitable here than
constant_time_select_64, change the call to the former.

Fixes: 6d702cebfce3 "Add an extra reduction step to RSAZ mod_exp implementations"
Signed-off-by: Eugene Syromiatnikov <esyr@openssl.org>
Reviewed-by: Paul Dale <paul.dale@oracle.com>
Reviewed-by: Kurt Roeckx <kurt@roeckx.be>
(Merged from https://github.com/openssl/openssl/pull/29040)

5 weeks agoCRL: RFC 5280 compliance for Certificate Issuer extension
Daniel Kubec [Tue, 28 Oct 2025 14:18:53 +0000 (15:18 +0100)] 
CRL: RFC 5280 compliance for Certificate Issuer extension

Add validation to ensure Certificate Issuer extensions in CRL entries
only appear when the Indirect CRL flag is TRUE in the Issuing
Distribution Point (IDP) extension, as required by RFC 5280 section
5.3.3.

Fixes #27465

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

5 weeks agoCorrection of grammar error in doc/man1/openssl-req.pod.in
Matteo [Mon, 27 Oct 2025 17:08:14 +0000 (18:08 +0100)] 
Correction of grammar error in doc/man1/openssl-req.pod.in

I changed the word "most" with the correct word "must" at the line 406.

CLA: trivial

Reviewed-by: Neil Horman <nhorman@openssl.org>
Reviewed-by: Dmitry Belyavskiy <beldmit@gmail.com>
Reviewed-by: Paul Dale <paul.dale@oracle.com>
Reviewed-by: Tomas Mraz <tomas@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/29009)

5 weeks agonamemap: use NID_undef instead of hardcoded 0
Nikola Pajkovsky [Fri, 24 Oct 2025 09:11:29 +0000 (11:11 +0200)] 
namemap: use NID_undef instead of hardcoded 0

Signed-off-by: Nikola Pajkovsky <nikolap@openssl.org>
Reviewed-by: Saša Nedvědický <sashan@openssl.org>
Reviewed-by: Tim Hudson <tjh@openssl.org>
Reviewed-by: Paul Dale <paul.dale@oracle.com>
(Merged from https://github.com/openssl/openssl/pull/28991)

5 weeks agokdf: Fix PVK KDF provider build.info typo
thomas-baumela-stormshield [Wed, 22 Oct 2025 13:16:05 +0000 (15:16 +0200)] 
kdf: Fix PVK KDF provider build.info typo

Fix the pvkkdf.c build when using PVKKDF_GOAL

CLA: trivial

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

5 weeks agoUse array sizeof for dtls cookie size checks instead of DTLS1_COOKIE_LENGTH
Frederik Wedel-Heinen [Fri, 17 Oct 2025 04:17:53 +0000 (06:17 +0200)] 
Use array sizeof for dtls cookie size checks instead of DTLS1_COOKIE_LENGTH

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

5 weeks agoREADME.md: Expand protocol acronyms
Jack Barsa [Thu, 16 Oct 2025 20:44:23 +0000 (16:44 -0400)] 
README.md: Expand protocol acronyms

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

5 weeks agoUpdate external test to use rpki-client 9.6
Theo Buehler [Wed, 1 Oct 2025 14:01:19 +0000 (16:01 +0200)] 
Update external test to use rpki-client 9.6

rpki-client 9.6 was released ten days ago:
https://marc.info/?l=openbsd-announce&m=175847509514928&w=2

Reviewed-by: Saša Nedvědický <sashan@openssl.org>
Reviewed-by: Neil Horman <nhorman@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/28718)

5 weeks agoProperly error out when AEAD Algorithms are used with Encrypted Data
Ryan Hooper [Tue, 30 Sep 2025 16:56:33 +0000 (12:56 -0400)] 
Properly error out when AEAD Algorithms are used with Encrypted Data

Encrypted Data does not support AEAD algorithms. If you wish to
use AEAD algorithms you will have to use a CMS_AuthEnvelopedData
structure. Therefore, when AEAD algorithms are used with
CMS_EncryptedData_set1_key will now return an error.

Fixes: #28607
Reviewed-by: Paul Dale <paul.dale@oracle.com>
Reviewed-by: Tomas Mraz <tomas@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/28711)

5 weeks agoInstruction Reordering Further Optimizes OpenSSL SHA256 Performance on RISC-V
zhoulu [Fri, 26 Sep 2025 10:43:08 +0000 (18:43 +0800)] 
Instruction Reordering Further Optimizes OpenSSL SHA256 Performance on RISC-V

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

5 weeks agoIn the RFC6979 test vectors, ensure private keys are correctly encoded
Alex Gaynor [Sun, 19 Oct 2025 16:30:09 +0000 (12:30 -0400)] 
In the RFC6979 test vectors, ensure private keys are correctly encoded

The encoding of these keys is supposed to have a fixed length based on the curve (this enables constant time processing, see oss-security this week). Several of these have private scalars that have leading 0s, but were encoded with the 0s truncated off. This adds back the 0s.

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

5 weeks agoImprove the CPUINFO display for RISC-V
Bernd Edlinger [Mon, 6 Oct 2025 06:37:20 +0000 (08:37 +0200)] 
Improve the CPUINFO display for RISC-V

Prefix the base architecture to the displayed RISC-V
architecture string, so the displayed OPENSSL_riscvcap
environment value can be used as is, since otherwise
the OPENSSL_cpuid_setup would ignore the first extension,
as it is expected to be the base architecture, usually
"RV64GC" or similar.
See the comment at parse_env in crypto/riscvcap.c
Furthermore also print the VLEN value, if the V-extension
is given, since that makes a significant difference
which assembler modules are activated by the V-extension.

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

5 weeks agoprint CPUINFO in QEMU cross-compile jobs
Bernd Edlinger [Mon, 6 Oct 2025 06:54:38 +0000 (08:54 +0200)] 
print CPUINFO in QEMU cross-compile jobs

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

5 weeks agoAES-GCM: Allow the IV getter to generate the IV if it is not set yet.
slontis [Fri, 7 Nov 2025 04:22:48 +0000 (15:22 +1100)] 
AES-GCM: Allow the IV getter to generate the IV if it is not set yet.

The EVP_CipherInit API allows mutiple calls to set up parameters such as
the key and iv. If the iv is not specified for encryption, then it is generated
internally during the update phase. If you try to get the IV before the
update it would return an error.
This PR allows the getter to generate the IV early for this case.
This also means that the gen_rand variable needs to be reset to 0 if an
iv is manually set after the getter is called.

Issue found by @davidmakepeace

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

5 weeks agoDependabot update
dependabot[bot] [Fri, 7 Nov 2025 09:51:08 +0000 (09:51 +0000)] 
Dependabot update

CLA: trivial

(deps): Bump actions/download-artifact

Bumps [actions/download-artifact](https://github.com/actions/download-artifact) from 4.1.8 to 6.0.0.
- [Release notes](https://github.com/actions/download-artifact/releases)
- [Commits](https://github.com/actions/download-artifact/compare/v4.1.8...v6.0.0)

---
updated-dependencies:
- dependency-name: actions/download-artifact
  dependency-version: 6.0.0
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
Reviewed-by: Saša Nedvědický <sashan@openssl.org>
Reviewed-by: Tomas Mraz <tomas@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/29100)

5 weeks agoDependabot update
dependabot[bot] [Fri, 7 Nov 2025 09:51:02 +0000 (09:51 +0000)] 
Dependabot update

CLA: trivial

(deps): Bump actions/github-script

Bumps [actions/github-script](https://github.com/actions/github-script) from 7 to 8.
- [Release notes](https://github.com/actions/github-script/releases)
- [Commits](https://github.com/actions/github-script/compare/v7...v8)

---
updated-dependencies:
- dependency-name: actions/github-script
  dependency-version: '8'
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
Reviewed-by: Saša Nedvědický <sashan@openssl.org>
Reviewed-by: Tomas Mraz <tomas@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/29099)

5 weeks agoDependabot update
dependabot[bot] [Fri, 7 Nov 2025 09:50:59 +0000 (09:50 +0000)] 
Dependabot update

CLA: trivial

(deps): Bump actions/checkout

Bumps [actions/checkout](https://github.com/actions/checkout) from 4 to 5.
- [Release notes](https://github.com/actions/checkout/releases)
- [Changelog](https://github.com/actions/checkout/blob/main/CHANGELOG.md)
- [Commits](https://github.com/actions/checkout/compare/v4...v5)

---
updated-dependencies:
- dependency-name: actions/checkout
  dependency-version: '5'
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
Reviewed-by: Saša Nedvědický <sashan@openssl.org>
Reviewed-by: Tomas Mraz <tomas@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/29098)

5 weeks agoDependabot update
dependabot[bot] [Fri, 7 Nov 2025 09:50:39 +0000 (09:50 +0000)] 
Dependabot update

CLA: trivial

(deps): Bump cygwin/cygwin-install-action

Bumps [cygwin/cygwin-install-action](https://github.com/cygwin/cygwin-install-action) from 5 to 6.
- [Release notes](https://github.com/cygwin/cygwin-install-action/releases)
- [Commits](https://github.com/cygwin/cygwin-install-action/compare/f61179d72284ceddc397ed07ddb444d82bf9e559...f2009323764960f80959895c7bc3bb30210afe4d)

---
updated-dependencies:
- dependency-name: cygwin/cygwin-install-action
  dependency-version: '6'
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
Reviewed-by: Saša Nedvědický <sashan@openssl.org>
Reviewed-by: Tomas Mraz <tomas@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/29097)

5 weeks agoDependabot update
dependabot[bot] [Fri, 7 Nov 2025 09:50:32 +0000 (09:50 +0000)] 
Dependabot update

CLA: trivial

(deps): Bump actions/upload-artifact

Bumps [actions/upload-artifact](https://github.com/actions/upload-artifact) from 4 to 5.
- [Release notes](https://github.com/actions/upload-artifact/releases)
- [Commits](https://github.com/actions/upload-artifact/compare/v4...v5)

---
updated-dependencies:
- dependency-name: actions/upload-artifact
  dependency-version: '5'
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
Reviewed-by: Saša Nedvědický <sashan@openssl.org>
Reviewed-by: Tomas Mraz <tomas@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/29096)

5 weeks agoadd missing input in dtolnay/rust-toolchain action
Dmitry Misharov [Thu, 23 Oct 2025 10:43:49 +0000 (12:43 +0200)] 
add missing input in dtolnay/rust-toolchain action

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

5 weeks agoremove workflow_run trigger in fips and abiddif workflows
Dmitry Misharov [Thu, 23 Oct 2025 10:29:34 +0000 (12:29 +0200)] 
remove workflow_run trigger in fips and abiddif workflows

workflow_run runs in the context of the target
repository rather than the fork repository, while
also being typically triggerable by the latter.
This can lead to attacker controlled code execution
or unexpected action runs with context controlled
by a malicious fork.

https://docs.zizmor.sh/audits/#dangerous-triggers

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

5 weeks agoremove workflow_run trigger in quic workflows
Dmitry Misharov [Thu, 23 Oct 2025 10:26:31 +0000 (12:26 +0200)] 
remove workflow_run trigger in quic workflows

workflow_run runs in the context of the target
repository rather than the fork repository, while
also being typically triggerable by the latter.
This can lead to attacker controlled code execution
or unexpected action runs with context controlled
by a malicious fork.

https://docs.zizmor.sh/audits/#dangerous-triggers

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

5 weeks agoremove potentially not secure template expansions
Dmitry Misharov [Thu, 23 Oct 2025 10:23:55 +0000 (12:23 +0200)] 
remove potentially not secure template expansions

https://docs.zizmor.sh/audits/#template-injection

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

5 weeks agoexplicitely set minimial workflow permissions
Dmitry Misharov [Thu, 23 Oct 2025 10:19:27 +0000 (12:19 +0200)] 
explicitely set minimial workflow permissions

https://docs.zizmor.sh/audits/#excessive-permissions

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

5 weeks agobump dtolnay/rust-toolchain action revision
Dmitry Misharov [Thu, 23 Oct 2025 10:17:48 +0000 (12:17 +0200)] 
bump dtolnay/rust-toolchain action revision

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

5 weeks agointroduce dependabot cooldown option
Dmitry Misharov [Thu, 23 Oct 2025 10:14:28 +0000 (12:14 +0200)] 
introduce dependabot cooldown option

https://docs.zizmor.sh/audits/#dependabot-cooldown

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

5 weeks agodo not persist credentials after check out
Dmitry Misharov [Thu, 23 Oct 2025 10:10:24 +0000 (12:10 +0200)] 
do not persist credentials after check out

https://docs.zizmor.sh/audits/#artipacked

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

6 weeks agoPKCS12_set_pbmac1_pbkdf2() fixups.
slontis [Wed, 5 Nov 2025 01:20:37 +0000 (12:20 +1100)] 
PKCS12_set_pbmac1_pbkdf2() fixups.

Adding a test that called PKCS12_set_pbmac1_pbkdf2() with a saltlen of
zero, pointed out that the libctx and propq were not being propagated.

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

6 weeks agoFix potential malloc(-1) bugs.
slontis [Wed, 29 Oct 2025 06:12:00 +0000 (17:12 +1100)] 
Fix potential malloc(-1) bugs.

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

6 weeks agoRollup fixes for NonStop builds.
Randall S. Becker [Tue, 28 Oct 2025 19:11:26 +0000 (19:11 +0000)] 
Rollup fixes for NonStop builds.

This change includes bss_sock.c to deal with introduction of EPROTO use.
Reroll of rsa_ossl.c changes made at 3.5 downward.
Build a workaround in timing_load_creds.c on NonStop for lack of rusage.
   This simulates getrusage() that is not available on NonStop.
Update bioprinttest.c to handle missing PTRxPRT definitions from inttypes.h.

Fixes: #29023
Signed-off-by: Randall S. Becker <randall.becker@nexbridge.ca>
Reviewed-by: Richard Levitte <levitte@openssl.org>
Reviewed-by: Neil Horman <nhorman@openssl.org>
Reviewed-by: Dmitry Belyavskiy <beldmit@gmail.com>
(Merged from https://github.com/openssl/openssl/pull/29024)

6 weeks agoCI: replace paid runners with free one
Dmitry Misharov [Mon, 3 Nov 2025 15:01:39 +0000 (16:01 +0100)] 
CI: replace paid runners with free one

Reviewed-by: Richard Levitte <levitte@openssl.org>
Reviewed-by: Shane Lontis <shane.lontis@oracle.com>
Reviewed-by: Neil Horman <nhorman@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/29052)

6 weeks agoc_rehash: Strip \r from hash filename on msys2
Orgad Shaneh [Sun, 26 Oct 2025 07:00:09 +0000 (09:00 +0200)] 
c_rehash: Strip \r from hash filename on msys2

Sample output for c_rehash -v on ucrt64 env:
Doing .
.0nk my.pem -> 472bcb3c
.0nk ca-bundle.crt -> cd8c0d63
WARNING: Skipping duplicate certificate ca-bundle.trust.crt

Reviewed-by: Dmitry Belyavskiy <beldmit@gmail.com>
Reviewed-by: Richard Levitte <levitte@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/28996)

6 weeks agoUpdate sha512-x86_64.pl
rainerjung [Mon, 8 Sep 2025 22:10:40 +0000 (00:10 +0200)] 
Update sha512-x86_64.pl

Do not use new assembler code for CPUs with SHA512 support in case the assembler only supports avx but not avx2.

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

6 weeks agoCI: Prevent scheduled jobs from running in forks
Orgad Shaneh [Fri, 31 Oct 2025 08:28:37 +0000 (10:28 +0200)] 
CI: Prevent scheduled jobs from running in forks

There is no reason to run them in forks, and some of them fail because
they try to run on macos-15-large which is not generally available.

Reviewed-by: Tom Cosgrove <tom.cosgrove@arm.com>
Reviewed-by: Paul Dale <paul.dale@oracle.com>
(Merged from https://github.com/openssl/openssl/pull/29042)

6 weeks agoFix lock contention checker for MACOS
Neil Horman [Wed, 29 Oct 2025 15:45:03 +0000 (11:45 -0400)] 
Fix lock contention checker for MACOS

The lock contention checker uses the gettid() syscall to get a unique
thread id for each thread contending on a lock.  While MACOS has this
syscall, it does something completely different:
https://elliotth.blogspot.com/2012/04/gettid-on-mac-os.html

Resulting in -1 being returned for all threads.  Use a macos specific
call to get the thread id instead

Fixes openssl/project#1699

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

6 weeks agoAdd a test for mismatch between the pkey and sigalg
Matt Caswell [Tue, 28 Oct 2025 15:27:42 +0000 (15:27 +0000)] 
Add a test for mismatch between the pkey and sigalg

We add a test for sending an mldsa65 sigalg while using an mldsa44 key.

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

6 weeks agoUse the actual NID for provided signature algorithms
Matt Caswell [Tue, 28 Oct 2025 14:53:11 +0000 (14:53 +0000)] 
Use the actual NID for provided signature algorithms

Prior to this change we could confuse the nid used in the pkey with the
nid in the sigalg and mistakenly accept signatures by the wrong algorithm.

Fixes #28762

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

6 weeks agoModernize header macros for C23 compatibility
Igor Ustinov [Sun, 2 Nov 2025 16:37:00 +0000 (17:37 +0100)] 
Modernize header macros for C23 compatibility

Replace old-style (int (*)()) and (char *(*)()) casts with proper typed
prototypes (i2d_of_void *, d2i_of_void *, void *(*)(void)) to comply
with stricter C23 function pointer rules.

Fixes #27938

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

6 weeks agoSet the 'tmp' flag BN_FLG_FIXED_TOP in bn_mod_exp_mont_fixed_top()
Richard Levitte [Mon, 27 Oct 2025 19:47:44 +0000 (20:47 +0100)] 
Set the 'tmp' flag BN_FLG_FIXED_TOP in bn_mod_exp_mont_fixed_top()

If not set, bn_check_top() trips when BN_DEBUG is defined

Reviewed-by: Dmitry Belyavskiy <beldmit@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/28801)

6 weeks agoTest BN_DEBUG in CI
Richard Levitte [Thu, 9 Oct 2025 17:56:59 +0000 (19:56 +0200)] 
Test BN_DEBUG in CI

Reviewed-by: Dmitry Belyavskiy <beldmit@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/28801)

6 weeks agoFix BN_DEBUG: ossl_assert() → assert()
Richard Levitte [Thu, 9 Oct 2025 17:55:47 +0000 (19:55 +0200)] 
Fix BN_DEBUG: ossl_assert() → assert()

ossl_assert() has been modified so much that it no longer fits the
purpose of bn_check_top() when BN_DEBUG is defined in a debug build,
which is to abort and tell where the BIGNUM is inconsistent.  This
is by design.

This has remained undiscovered because no one has tried BN_DEBUG
for quite a while.

Assertions in bn_check_top() are also rearranged to better show what
the actual problem is.

Reviewed-by: Dmitry Belyavskiy <beldmit@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/28801)

6 weeks agofips: don't pass MAC parameter to HMAC-DRBG during self-test
Pauli [Wed, 29 Oct 2025 02:46:11 +0000 (13:46 +1100)] 
fips: don't pass MAC parameter to HMAC-DRBG during self-test

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

6 weeks agodoc: remove mention of MAC parameter to HMAC-DRBG
Pauli [Wed, 29 Oct 2025 02:43:59 +0000 (13:43 +1100)] 
doc: remove mention of MAC parameter to HMAC-DRBG

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

6 weeks agohmac-drbg: ignore any passed MAC parameter
Pauli [Tue, 28 Oct 2025 02:38:38 +0000 (13:38 +1100)] 
hmac-drbg: ignore any passed MAC parameter

The MAC parameter should only ever be set to HMAC.
Since setting it to anything else isn't defined, this parameter is ignored.

Fixes #29003

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

6 weeks agoRename SSL_CERT_LOOKUP.nid to pkey_nid
Richard Levitte [Wed, 29 Oct 2025 09:12:33 +0000 (10:12 +0100)] 
Rename SSL_CERT_LOOKUP.nid to pkey_nid

Hopefully, this will help further clarify the intent of this
SSL_CERT_LOOKUP field to future developer.

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

6 weeks agoFix NID bug in SSL_CERT_LOOKUP array construction
Richard Levitte [Wed, 29 Oct 2025 09:03:51 +0000 (10:03 +0100)] 
Fix NID bug in SSL_CERT_LOOKUP array construction

The SSL_CERT_LOOKUP NID should be for the public key algorithm (what is
often called the "key type".  Yet, when populating the SSL_CERT_LOOKUP
table with 'ssl_load_sigalgs', only the sigalg name is used to find a
NID.

This is perfectly OK to do, *if* the sigalg and the associated key type
share the same name.  However, that's not always the case.

This change infers the key type name in 'ssl_load_sigalgs' the same way
as it was already done in 'add_provider_sigalgs'.

Related-to: https://github.com/openssl/openssl/pull/29019#discussion_r2472219647
Reviewed-by: Viktor Dukhovni <viktor@openssl.org>
Reviewed-by: Matt Caswell <matt@openssl.org>
Reviewed-by: Tomas Mraz <tomas@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/29027)

7 weeks agomacctx: remove unused function
Pauli [Tue, 28 Oct 2025 05:05:59 +0000 (16:05 +1100)] 
macctx: remove unused function

The `ossl_prov_macctx_load_from_params()` function is no longer used.
Since it isn't public, it can be removed.

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

7 weeks agoDrop symbol numbers as we are doing a new major version
Tomas Mraz [Mon, 20 Oct 2025 14:17:38 +0000 (16:17 +0200)] 
Drop symbol numbers as we are doing a new major version

Also recreate the .num files from scratch as that makes the
symbols sorted.

Reviewed-by: Viktor Dukhovni <viktor@openssl.org>
Reviewed-by: Paul Dale <paul.dale@oracle.com>
Reviewed-by: Neil Horman <nhorman@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/28959)

7 weeks agoFix util/find-doc-nits' check_env_vars to look for files with 'git ls-files'
Richard Levitte [Thu, 18 Sep 2025 10:04:41 +0000 (12:04 +0200)] 
Fix util/find-doc-nits' check_env_vars to look for files with 'git ls-files'

If that fails, it will fall back to finding the files with Find::file.

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

7 weeks agoFix util/find-doc-nits' check_env_vars to show where envvars were found
Richard Levitte [Thu, 18 Sep 2025 09:29:10 +0000 (11:29 +0200)] 
Fix util/find-doc-nits' check_env_vars to show where envvars were found

This displays the list of files with line number for each envvar.

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

7 weeks agoFix util/find-doc-nits' environment variable check exceptions
Richard Levitte [Thu, 18 Sep 2025 09:23:26 +0000 (11:23 +0200)] 
Fix util/find-doc-nits' environment variable check exceptions

Some files in @except_env_files are located in the build directory,
not the source directory.

Furthermore, because the files and directories in @except_dirs and
@except_env_files may look different than the elements in what find()
returns, realpath() must be used to ensure that file name comparison
matches when it should.

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

7 weeks agoapps: Make genpkey verbose when verbose option is set
Norbert Pocs [Mon, 13 Oct 2025 12:39:24 +0000 (14:39 +0200)] 
apps: Make genpkey verbose when verbose option is set

Signed-off-by: Norbert Pocs <norbertp@openssl.org>
Reviewed-by: Tim Hudson <tjh@openssl.org>
Reviewed-by: Saša Nedvědický <sashan@openssl.org>
Reviewed-by: Paul Dale <paul.dale@oracle.com>
(Merged from https://github.com/openssl/openssl/pull/28887)

7 weeks agoMove CI jobs with macos large runners
Dmitry Misharov [Mon, 27 Oct 2025 15:21:58 +0000 (16:21 +0100)] 
Move CI jobs with macos large runners

Running CI jobs on MacOS large runner on each pull request
is problematic for forks. These runners are not free and require
billing to setup. Therefore it makes more sense move macos-14-large
and macos-15-large into os-zoo.yml which is scheduled to run nightly.

Reviewed-by: Bernd Edlinger <bernd.edlinger@hotmail.de>
Reviewed-by: Tomas Mraz <tomas@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/29007)

7 weeks agohkdf: use Perl arrays to avoid duplication of params
Pauli [Mon, 27 Oct 2025 02:26:00 +0000 (13:26 +1100)] 
hkdf: use Perl arrays to avoid duplication of params

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

7 weeks agohkdf: remove processing for illegal digest param
Pauli [Mon, 27 Oct 2025 02:25:38 +0000 (13:25 +1100)] 
hkdf: remove processing for illegal digest param

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

7 weeks agoAdd lock contention graph script to openssl
Neil Horman [Wed, 22 Oct 2025 14:54:15 +0000 (10:54 -0400)] 
Add lock contention graph script to openssl

Add a script to use gnuplot to graph lock contention events as reported
by the REPORT_RWLOCK_CONTENTION feature vs time so we can see an
application run time based view of where lock contention occurs.

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

7 weeks agobss_dgram: set *num_processed = 0 in error path
Joshua Rogers [Tue, 14 Oct 2025 00:04:25 +0000 (08:04 +0800)] 
bss_dgram: set *num_processed = 0 in error path

Signed-off-by: Joshua Rogers <MegaManSec@users.noreply.github.com>
Reviewed-by: Saša Nedvědický <sashan@openssl.org>
Reviewed-by: Frederik Wedel-Heinen <fwh.openssl@gmail.com>
Reviewed-by: Todd Short <todd.short@me.com>
(Merged from https://github.com/openssl/openssl/pull/28913)

7 weeks agorc4: Remove the pointless if() operator, its condition is always true
Gleb Popov [Fri, 10 Oct 2025 13:31:47 +0000 (16:31 +0300)] 
rc4: Remove the pointless if() operator, its condition is always true

CLA: trivial

Reviewed-by: Matt Caswell <matt@openssl.org>
Reviewed-by: Frederik Wedel-Heinen <fwh.openssl@gmail.com>
Reviewed-by: Todd Short <todd.short@me.com>
(Merged from https://github.com/openssl/openssl/pull/28827)

7 weeks agoRemove more dead code
Joshua Rogers [Thu, 16 Oct 2025 09:33:50 +0000 (17:33 +0800)] 
Remove more dead code

Signed-off-by: Joshua Rogers <MegaManSec@users.noreply.github.com>
Reviewed-by: Saša Nedvědický <sashan@openssl.org>
Reviewed-by: Tomas Mraz <tomas@openssl.org>
Reviewed-by: Frederik Wedel-Heinen <fwh.openssl@gmail.com>
Reviewed-by: Todd Short <todd.short@me.com>
(Merged from https://github.com/openssl/openssl/pull/28914)

7 weeks agoRemove dead RENEG code
Joshua Rogers [Thu, 16 Oct 2025 07:10:33 +0000 (15:10 +0800)] 
Remove dead RENEG code

Signed-off-by: Joshua Rogers <MegaManSec@users.noreply.github.com>
Reviewed-by: Saša Nedvědický <sashan@openssl.org>
Reviewed-by: Tomas Mraz <tomas@openssl.org>
Reviewed-by: Frederik Wedel-Heinen <fwh.openssl@gmail.com>
Reviewed-by: Todd Short <todd.short@me.com>
(Merged from https://github.com/openssl/openssl/pull/28914)

7 weeks agos_server: Use static int, not static.
Joshua Rogers [Tue, 14 Oct 2025 00:09:28 +0000 (08:09 +0800)] 
s_server: Use static int, not static.

Signed-off-by: Joshua Rogers <MegaManSec@users.noreply.github.com>
Reviewed-by: Saša Nedvědický <sashan@openssl.org>
Reviewed-by: Tomas Mraz <tomas@openssl.org>
Reviewed-by: Frederik Wedel-Heinen <fwh.openssl@gmail.com>
Reviewed-by: Todd Short <todd.short@me.com>
(Merged from https://github.com/openssl/openssl/pull/28914)

7 weeks agoapps/s_time: reset reused SSL with SSL_clear in doConnection
Joshua Rogers [Mon, 13 Oct 2025 23:59:04 +0000 (07:59 +0800)] 
apps/s_time: reset reused SSL with SSL_clear in doConnection

Signed-off-by: Joshua Rogers <MegaManSec@users.noreply.github.com>
Reviewed-by: Saša Nedvědický <sashan@openssl.org>
Reviewed-by: Paul Yang <paulyang.inf@gmail.com>
Reviewed-by: Todd Short <todd.short@me.com>
(Merged from https://github.com/openssl/openssl/pull/28911)

7 weeks agocomp/zstd: make bio_zstd_read return -1 on hard errors
Joshua Rogers [Sun, 12 Oct 2025 13:39:42 +0000 (21:39 +0800)] 
comp/zstd: make bio_zstd_read return -1 on hard errors

Split NULL out param from zero outl. Return -1 on malloc failure and
NULL parameter. Keep 0 only for outl <= 0 and clean EOF. This lets
callers distinguish errors from empty reads without inspecting the
error queue.

Signed-off-by: Joshua Rogers <MegaManSec@users.noreply.github.com>
Reviewed-by: Saša Nedvědický <sashan@openssl.org>
Reviewed-by: Paul Yang <paulyang.inf@gmail.com>
Reviewed-by: Todd Short <todd.short@me.com>
(Merged from https://github.com/openssl/openssl/pull/28908)

7 weeks agoCleanup: Remove include/crypto/bn_conf.h.in
Richard Levitte [Wed, 8 Oct 2025 20:55:45 +0000 (22:55 +0200)] 
Cleanup: Remove include/crypto/bn_conf.h.in

It turns out that this reproduces what's already done conditionally in
include/openssl/configuration.h.in.  Furthermore, include/crypto/bn_conf.h
was only included in crypto/bn/bn_local.h using the same guard as the
definition in include/openssl/configuration.h, which is already included
by crypto/bn/bn_local.h anyway, via include/openssl/opensslconf.h.

Therefore, include/crypto/bn_conf.h.in can be removed, alongside the
construction and inclusion of include/crypto/bn_conf.h.

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

7 weeks agoexclude no-docs from 3.0 build in openssh interop testing
Neil Horman [Sat, 25 Oct 2025 13:11:59 +0000 (09:11 -0400)] 
exclude no-docs from 3.0 build in openssh interop testing

The interop CI job is failing because we attempt to configure openssl
with no-docs in the 3.0 branch, which that stable branch doesn't
support.

Exclude no-docs from 3.0 builds in this CI job.

Fixes openssl/project#1695

Reviewed-by: Tim Hudson <tjh@openssl.org>
Reviewed-by: Tomas Mraz <tomas@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/28993)