]> git.ipfire.org Git - thirdparty/openssl.git/log
thirdparty/openssl.git
10 days 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)

10 days 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)

10 days 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)

10 days 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)

10 days 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)

10 days 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)

10 days 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)

10 days 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)

10 days 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)

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

12 days agoChange SLH-DSA tests to be deferred
Simo Sorce [Wed, 1 Oct 2025 19:53:07 +0000 (15:53 -0400)] 
Change SLH-DSA tests to be deferred

Signed-off-by: Simo Sorce <simo@redhat.com>
Reviewed-by: Paul Dale <paul.dale@oracle.com>
Reviewed-by: Shane Lontis <shane.lontis@oracle.com>
Reviewed-by: Dmitry Belyavskiy <beldmit@gmail.com>
(Merged from https://github.com/openssl/openssl/pull/28725)

12 days agoRun on-demand self-tests when requested
Simo Sorce [Thu, 2 Oct 2025 21:57:42 +0000 (17:57 -0400)] 
Run on-demand self-tests when requested

The `on_demand_test` flag passed to `SELF_TEST_post` was not being honored by
the Known Answer Test (KAT) runner. Tests marked as 'deferred' were always
skipped.

This change passes the `on_demand_test` flag through to the KAT functions,
ensuring that when an on-demand test is requested, the full suite of self-
tests is executed as intended.

Signed-off-by: Simo Sorce <simo@redhat.com>
Reviewed-by: Paul Dale <paul.dale@oracle.com>
Reviewed-by: Shane Lontis <shane.lontis@oracle.com>
Reviewed-by: Dmitry Belyavskiy <beldmit@gmail.com>
(Merged from https://github.com/openssl/openssl/pull/28725)

12 days agoAllow running individual FIPS self-tests
Simo Sorce [Tue, 30 Sep 2025 20:12:03 +0000 (16:12 -0400)] 
Allow running individual FIPS self-tests

This introduces a new function, `SELF_TEST_kats_single()`, to the FIPS
provider. This allows for deferring running the Known Answer Tests (KATs)
for a specific algorithm. This is useful to avoid running
computationally costly tests upfront and instead run them only if the
algorithm is actually going to be used.

To support this, a `deferred` flag has been added to the test data
structures. The main self-test function, `SELF_TEST_kats()`, is updated to
skip tests marked for deferred execution, preserving its existing startup
behavior for all other tests.

Signed-off-by: Simo Sorce <simo@redhat.com>
Reviewed-by: Paul Dale <paul.dale@oracle.com>
Reviewed-by: Shane Lontis <shane.lontis@oracle.com>
Reviewed-by: Dmitry Belyavskiy <beldmit@gmail.com>
(Merged from https://github.com/openssl/openssl/pull/28725)

13 days agostore: check for NULL uri argument
Pauli [Wed, 22 Oct 2025 22:09:56 +0000 (09:09 +1100)] 
store: check for NULL uri argument

Fixes #28978

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

13 days agoAdd interop CI testing with openssh
Norbert Pocs [Wed, 15 Oct 2025 15:52:27 +0000 (17:52 +0200)] 
Add interop CI testing with openssh

Testing OpenSSH with their scripts for running tests on
all active openssl branches.

Resolves: https://github.com/openssl/project/issues/1632

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

13 days agoWe no longer need to have an exception n the tests for Windows gmtime_s
Bob Beck [Wed, 22 Oct 2025 01:50:17 +0000 (19:50 -0600)] 
We no longer need to have an exception n the tests for Windows gmtime_s
being limited to dates only from the unix epoch to the year 3000.

We no longer use it on Windows.

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

13 days agoRemove the hack to accept tests failing for out of range input
Bob Beck [Tue, 21 Oct 2025 17:20:35 +0000 (11:20 -0600)] 
Remove the hack to accept tests failing for out of range input

Now that OPENSSL_gmtime is backed by tm_to_posix and posix_to_tm
it validates the input from struct tm, so it is no longer necessary
to have hacks in place to allow for out of bound input tests to
fail.

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

13 days agoAdd some tests for the OPENSSL_gmtime family of public API.
Bob Beck [Wed, 8 Oct 2025 21:11:13 +0000 (15:11 -0600)] 
Add some tests for the OPENSSL_gmtime family of public API.

As well as some basic sanity testing for the internal asn1_time
conversion functions.

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

2 weeks agoFIPS: Fix RSA X.931 padding check
Simo Sorce [Fri, 3 Oct 2025 15:49:24 +0000 (11:49 -0400)] 
FIPS: Fix RSA X.931 padding check

The padding check was not complete and would miss the Message
Signature API case, which also needs to be rejected.

Signed-off-by: Simo Sorce <simo@redhat.com>
Reviewed-by: Paul Dale <paul.dale@oracle.com>
Reviewed-by: Shane Lontis <shane.lontis@oracle.com>
Reviewed-by: Dmitry Belyavskiy <beldmit@gmail.com>
(Merged from https://github.com/openssl/openssl/pull/28741)

2 weeks agothreads: Replace CRYPTO_THREAD_clean_local_for_fips() with CRYPTO_THREAD_clean_local()
Ondřej Surý [Mon, 20 Oct 2025 19:11:00 +0000 (21:11 +0200)] 
threads: Replace CRYPTO_THREAD_clean_local_for_fips() with CRYPTO_THREAD_clean_local()

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

2 weeks agothreads: Cleanup master key sparse array in OPENSSL_thread_stop()
Ondřej Surý [Wed, 8 Oct 2025 09:06:00 +0000 (11:06 +0200)] 
threads: Cleanup master key sparse array in OPENSSL_thread_stop()

Fixes #28770

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

2 weeks agoFix memory leak in x509_pubkey_ex_d2i_ex()
Andrey Tsygunka [Thu, 10 Apr 2025 06:57:41 +0000 (09:57 +0300)] 
Fix memory leak in x509_pubkey_ex_d2i_ex()

If the call to ASN1_item_ex_d2i() from x509_pubkey_ex_d2i_ex() fails
*pval is freed by asn1_item_ex_d2i_intern()->ASN1_item_ex_free()->ossl_asn1_item_embed_free()
inside the ASN1_item_ex_d2i() function without freeing the
string buffer X509_PUBKEY::propq that was previously allocated
in x509_pubkey_ex_new_ex() and we lose the pointer to this buffer.

The function we are fixing here is one of the functions used
to define X509_PUBKEY - so any operations that work directly
on X509_PUBKEY_INTERNAL should be prevented from freeing
the structure because they don't know how to handle it.

Signed-off-by: Andrey Tsygunka <aitsygunka@yandex.ru>
Reviewed-by: Matt Caswell <matt@openssl.org>
Reviewed-by: Dmitry Belyavskiy <beldmit@gmail.com>
Reviewed-by: Neil Horman <nhorman@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/27333)

2 weeks agoCopy impls stack when calling ossl_method_store_do_all
Neil Horman [Wed, 8 Oct 2025 12:20:36 +0000 (08:20 -0400)] 
Copy impls stack when calling ossl_method_store_do_all

PR https://github.com/openssl/openssl/pull/24782 introduced a copying of
the algs stack in ossl_method_store_do all, so that the subsequent
iteration of elements through alg_do_one could be done without a lock,
and without triggering a tsan error as reported in:
https://github.com/openssl/openssl/issues/24672

However, the problem wasn't completely fixed.  Issue:
https://github.com/openssl/openssl/issues/27726

Noted that, sometimes we still get a crash when iterating over each algs
impls stack.  This occurs because, even though we've cloned the algs to
a private data area, the impls stack for each alg still points to shared
data, which we are accessing without the benefit of a lock.  Because of
that, if some other thread calls a function that mutates the impl stack
(say ossl_method_store_remove()), we may encounter a NULL or garbage
value in one of the impl stack values, leading to an unexpected NULL
pointer or simmilar, which in turn leads to a crash.

Unfortunately we can't use a lock to create exclusive access here, as
there are several paths that lead to a recursive mutation of the stack,
which would deadlock.

So the only way that I see to prevent this (which is admittedly ugly),
is to not only clone the alg stack, but to duplicate each algs impl
stack with the read lock held, prior to doing the iteration.

Further, we've been unable to test this, as the problem is rare, and we
don't have a solid reproducer for the issue, but visual inspection
suggests this should fix that.  Hopefully:

Fixes #27726

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

2 weeks agoDisable also argon2, scrypt and slh-dsa with no-bulk
Tomas Mraz [Wed, 22 Oct 2025 13:07:10 +0000 (15:07 +0200)] 
Disable also argon2, scrypt and slh-dsa with no-bulk

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

2 weeks agoscrypt.c: Do not include the param with OPENSSL_NO_SCRYPT
Tomas Mraz [Wed, 22 Oct 2025 13:03:24 +0000 (15:03 +0200)] 
scrypt.c: Do not include the param with OPENSSL_NO_SCRYPT

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

2 weeks agoClear keymgmt params containing sensitive data
Simo Sorce [Mon, 28 Jul 2025 19:32:06 +0000 (15:32 -0400)] 
Clear keymgmt params containing sensitive data

Signed-off-by: Simo Sorce <simo@redhat.com>
Reviewed-by: Tomas Mraz <tomas@openssl.org>
Reviewed-by: Dmitry Belyavskiy <beldmit@gmail.com>
(Merged from https://github.com/openssl/openssl/pull/28108)

2 weeks agoTest OSSL_PARAM_clear_free()
Simo Sorce [Mon, 28 Jul 2025 14:59:54 +0000 (10:59 -0400)] 
Test OSSL_PARAM_clear_free()

Signed-off-by: Simo Sorce <simo@redhat.com>
Reviewed-by: Tomas Mraz <tomas@openssl.org>
Reviewed-by: Dmitry Belyavskiy <beldmit@gmail.com>
(Merged from https://github.com/openssl/openssl/pull/28108)

2 weeks agoAdd a way to cleanse params arrays
Simo Sorce [Mon, 28 Jul 2025 12:32:54 +0000 (08:32 -0400)] 
Add a way to cleanse params arrays

This uses the return_size field of the last terminating parameter
similaraly to how secure memory uses the data and data_size fields,
to hold the total size of memory allocated for params.
This is then used to be able to call OPENSSL_cleanse on the params
fields via the new OSSL_PARAM_clear_free() call.

Signed-off-by: Simo Sorce <simo@redhat.com>
Reviewed-by: Tomas Mraz <tomas@openssl.org>
Reviewed-by: Dmitry Belyavskiy <beldmit@gmail.com>
(Merged from https://github.com/openssl/openssl/pull/28108)

2 weeks agox509-store: reduce number of pre-allocated hashtable buckets
Nikola Pajkovsky [Tue, 21 Oct 2025 16:49:27 +0000 (18:49 +0200)] 
x509-store: reduce number of pre-allocated hashtable buckets

pre-allocating too much hashtable objects to avoid the hashtable
regrowing is mistake, and had immediate impact on memory footprint.

Resolves: https://github.com/openssl/project/issues/1679
Link: https://openssl-library.org/performance/
Fixes: 04589b59ef50 ("x509store: reduce lock contention in X509_STORE")
Signed-off-by: Nikola Pajkovsky <nikolap@openssl.org>
Reviewed-by: Neil Horman <nhorman@openssl.org>
Reviewed-by: Tomas Mraz <tomas@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/28965)

2 weeks agox509_store: fix unreliable value of objs inside the second locked section
Nikola Pajkovsky [Fri, 17 Oct 2025 15:29:21 +0000 (17:29 +0200)] 
x509_store: fix unreliable value of objs inside the second locked section

objs has been incorrectly passed from one critical section to another
one.

Resolves: https://scan5.scan.coverity.com/#/project-view/65138/10222?selectedIssue=1667132
Fixes: 04589b59ef50 ("x509store: reduce lock contention in X509_STORE")
Signed-off-by: Nikola Pajkovsky <nikolap@openssl.org>
Reviewed-by: Saša Nedvědický <sashan@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/28947)

2 weeks agoFix heap-buffer-overflow in CI fuzzing tests
Bernd Edlinger [Tue, 21 Oct 2025 11:42:00 +0000 (13:42 +0200)] 
Fix heap-buffer-overflow in CI fuzzing tests

The ASN1_STRING is not supposed to be used as a
zero-terminated string.  Therefore we need to check
the string length explicitly and use memcmp instead of
strcmp in ossl_x509_check_cert_time.

Fixes a regression introduced by #28623

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

2 weeks agoAdd tests for the posix time functions.
Bob Beck [Sat, 4 Oct 2025 17:21:07 +0000 (11:21 -0600)] 
Add tests for the posix time functions.

These test both the posix time conversion funcitons, and the
underlying ASN1_TIME_adj and ASN1_TIME_to_tm that they underpin.

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

2 weeks agoAdapt the tests to not care about failures from platform gmtime()
Bob Beck [Sat, 4 Oct 2025 13:34:11 +0000 (07:34 -0600)] 
Adapt the tests to not care about failures from platform gmtime()

Now that we don't use gmtime, timegm and friends from the platform
we should be able to handle all values the same on any platform
with no concerns other than what the platform has decided to use
for time_t.

The hpux #ifdef is removed, as looking at f5e3115361f shows this
was added due to a gmtime() failure on the platform.

This then clears out all the platform specific chaos in helper.c
as an example of why the public API being added is actually
generally useful, as it has been noticed that users of OpenSSL
frequently end up dealing with the same issues in the same really
awful ways in their own software as were were doing in that file
in the tests.

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

2 weeks agoBring in posix time conversion functions, originally from BoringSSL
Bob Beck [Fri, 3 Oct 2025 12:16:33 +0000 (06:16 -0600)] 
Bring in posix time conversion functions, originally from BoringSSL

This is effectively a Julien date computation, but done as seconds since
the POSIX epoch, all checked for overflow and limited to dates from year
0000 to 9999.

This is advantageous as it removed the need to use the operating system provided
timegm() and gmtime() functions which are only semi-standardized in any case and
when they aren't there or don't work other nastiness needs to be tried to do
the same thing. Even when they are there, you need to worry about the size of
time_t and if the bad idea bears of unsigned time_t have visited this platform.

By simply doing the conversion ourselves, to and from and int64, this can be
done the same everywhere, and bounds checked when being put into a time_t.

This adds public API that is already added in libre and boring in
<openssl/posix_time.h>:

These are added in the forks due to noticing a fair bit of software needing
to perform similar error-prone conversions themselves when dealing with
ASN1 times (such as what we have to do in the tests). While I intend to
use some of this API for further simplification in a follow on changes in
several places (such as ocsp and X509) For now we only use it to simplify
the test helpers and clean that up a bunch

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

2 weeks agoprovider: reduce lock contention in ossl_provider_find
Nikola Pajkovsky [Thu, 16 Oct 2025 06:25:06 +0000 (08:25 +0200)] 
provider: reduce lock contention in ossl_provider_find

There's really no point to always take write lock, and sort the
store->providers every time. Instead, check if store->providers is
sorted, and if not, then upgrade to the write lock, otherwise use read
lock.

Signed-off-by: Nikola Pajkovsky <nikolap@openssl.org>
Reviewed-by: Saša Nedvědický <sashan@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/28927)

2 weeks agoclang deprecates sprintf on macos
Nikola Pajkovsky [Wed, 15 Oct 2025 10:48:06 +0000 (12:48 +0200)] 
clang deprecates sprintf on macos

test/threadstest.c:1376:9: error: 'sprintf' is deprecated.

The same issues is in the ossl-nghttp3-demo.

Signed-off-by: Nikola Pajkovsky <nikolap@openssl.org>
Reviewed-by: Saša Nedvědický <sashan@openssl.org>
Reviewed-by: Richard Levitte <levitte@openssl.org>
Reviewed-by: Tomas Mraz <tomas@openssl.org>
Reviewed-by: Neil Horman <nhorman@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/28903)

2 weeks agoScope aes_cfb128_vaes_encdec_wrapper to x64
Kai Pastor [Wed, 8 Oct 2025 16:50:33 +0000 (18:50 +0200)] 
Scope aes_cfb128_vaes_encdec_wrapper to x64

This function is only used on x64 and relies on other functions which
are only implemented for x64.
Fixes #28745.

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

2 weeks agosignature: Use include file for generated code
Simo Sorce [Thu, 16 Oct 2025 19:48:09 +0000 (15:48 -0400)] 
signature: Use include file for generated code

Signed-off-by: Simo Sorce <simo@redhat.com>
Reviewed-by: Matt Caswell <matt@openssl.org>
Reviewed-by: Tomas Mraz <tomas@openssl.org>
Reviewed-by: Dmitry Belyavskiy <beldmit@gmail.com>
(Merged from https://github.com/openssl/openssl/pull/28838)

2 weeks agorands: Use include file for generated code
Simo Sorce [Thu, 16 Oct 2025 19:48:09 +0000 (15:48 -0400)] 
rands: Use include file for generated code

Signed-off-by: Simo Sorce <simo@redhat.com>
Reviewed-by: Matt Caswell <matt@openssl.org>
Reviewed-by: Tomas Mraz <tomas@openssl.org>
Reviewed-by: Dmitry Belyavskiy <beldmit@gmail.com>
(Merged from https://github.com/openssl/openssl/pull/28838)

2 weeks agomacs: Use include file for generated code
Simo Sorce [Thu, 16 Oct 2025 19:48:08 +0000 (15:48 -0400)] 
macs: Use include file for generated code

Signed-off-by: Simo Sorce <simo@redhat.com>
Reviewed-by: Matt Caswell <matt@openssl.org>
Reviewed-by: Tomas Mraz <tomas@openssl.org>
Reviewed-by: Dmitry Belyavskiy <beldmit@gmail.com>
(Merged from https://github.com/openssl/openssl/pull/28838)

2 weeks agokeymgmt: Use include file for generated code
Simo Sorce [Thu, 16 Oct 2025 19:48:08 +0000 (15:48 -0400)] 
keymgmt: Use include file for generated code

Signed-off-by: Simo Sorce <simo@redhat.com>
Reviewed-by: Matt Caswell <matt@openssl.org>
Reviewed-by: Tomas Mraz <tomas@openssl.org>
Reviewed-by: Dmitry Belyavskiy <beldmit@gmail.com>
(Merged from https://github.com/openssl/openssl/pull/28838)

2 weeks agoFix handling of include files in libtemplate
Simo Sorce [Fri, 17 Oct 2025 02:57:36 +0000 (22:57 -0400)] 
Fix handling of include files in libtemplate

Signed-off-by: Simo Sorce <simo@redhat.com>
Reviewed-by: Matt Caswell <matt@openssl.org>
Reviewed-by: Tomas Mraz <tomas@openssl.org>
Reviewed-by: Dmitry Belyavskiy <beldmit@gmail.com>
(Merged from https://github.com/openssl/openssl/pull/28838)

2 weeks agokem: Use include file for generated code
Simo Sorce [Thu, 16 Oct 2025 19:48:08 +0000 (15:48 -0400)] 
kem: Use include file for generated code

Signed-off-by: Simo Sorce <simo@redhat.com>
Reviewed-by: Matt Caswell <matt@openssl.org>
Reviewed-by: Tomas Mraz <tomas@openssl.org>
Reviewed-by: Dmitry Belyavskiy <beldmit@gmail.com>
(Merged from https://github.com/openssl/openssl/pull/28838)

2 weeks agokdfs: Use include file for generated code
Simo Sorce [Thu, 16 Oct 2025 19:48:07 +0000 (15:48 -0400)] 
kdfs: Use include file for generated code

Signed-off-by: Simo Sorce <simo@redhat.com>
Reviewed-by: Matt Caswell <matt@openssl.org>
Reviewed-by: Tomas Mraz <tomas@openssl.org>
Reviewed-by: Dmitry Belyavskiy <beldmit@gmail.com>
(Merged from https://github.com/openssl/openssl/pull/28838)

2 weeks agoexchange: Use include file for generated code
Simo Sorce [Thu, 16 Oct 2025 19:48:07 +0000 (15:48 -0400)] 
exchange: Use include file for generated code

Signed-off-by: Simo Sorce <simo@redhat.com>
Reviewed-by: Matt Caswell <matt@openssl.org>
Reviewed-by: Tomas Mraz <tomas@openssl.org>
Reviewed-by: Dmitry Belyavskiy <beldmit@gmail.com>
(Merged from https://github.com/openssl/openssl/pull/28838)

2 weeks agoencode_decode: Use include file for generated code
Simo Sorce [Thu, 16 Oct 2025 19:48:07 +0000 (15:48 -0400)] 
encode_decode: Use include file for generated code

Signed-off-by: Simo Sorce <simo@redhat.com>
Reviewed-by: Matt Caswell <matt@openssl.org>
Reviewed-by: Tomas Mraz <tomas@openssl.org>
Reviewed-by: Dmitry Belyavskiy <beldmit@gmail.com>
(Merged from https://github.com/openssl/openssl/pull/28838)

2 weeks agodigests: Use include file for generated code
Simo Sorce [Thu, 16 Oct 2025 19:48:07 +0000 (15:48 -0400)] 
digests: Use include file for generated code

Signed-off-by: Simo Sorce <simo@redhat.com>
Reviewed-by: Matt Caswell <matt@openssl.org>
Reviewed-by: Tomas Mraz <tomas@openssl.org>
Reviewed-by: Dmitry Belyavskiy <beldmit@gmail.com>
(Merged from https://github.com/openssl/openssl/pull/28838)

2 weeks agociphers: Use include file for generated code
Simo Sorce [Thu, 16 Oct 2025 19:48:06 +0000 (15:48 -0400)] 
ciphers: Use include file for generated code

Signed-off-by: Simo Sorce <simo@redhat.com>
Reviewed-by: Matt Caswell <matt@openssl.org>
Reviewed-by: Tomas Mraz <tomas@openssl.org>
Reviewed-by: Dmitry Belyavskiy <beldmit@gmail.com>
(Merged from https://github.com/openssl/openssl/pull/28838)

2 weeks agoFix handling of include files in libcommon
Simo Sorce [Fri, 17 Oct 2025 02:26:33 +0000 (22:26 -0400)] 
Fix handling of include files in libcommon

Signed-off-by: Simo Sorce <simo@redhat.com>
Reviewed-by: Matt Caswell <matt@openssl.org>
Reviewed-by: Tomas Mraz <tomas@openssl.org>
Reviewed-by: Dmitry Belyavskiy <beldmit@gmail.com>
(Merged from https://github.com/openssl/openssl/pull/28838)

2 weeks agoasymciphers: Use include file for generated code
Simo Sorce [Thu, 16 Oct 2025 19:48:06 +0000 (15:48 -0400)] 
asymciphers: Use include file for generated code

Signed-off-by: Simo Sorce <simo@redhat.com>
Reviewed-by: Matt Caswell <matt@openssl.org>
Reviewed-by: Tomas Mraz <tomas@openssl.org>
Reviewed-by: Dmitry Belyavskiy <beldmit@gmail.com>
(Merged from https://github.com/openssl/openssl/pull/28838)

2 weeks agostoremgmt: Use include file for generated code
Simo Sorce [Mon, 13 Oct 2025 21:48:54 +0000 (17:48 -0400)] 
storemgmt: Use include file for generated code

Signed-off-by: Simo Sorce <simo@redhat.com>
Reviewed-by: Matt Caswell <matt@openssl.org>
Reviewed-by: Tomas Mraz <tomas@openssl.org>
Reviewed-by: Dmitry Belyavskiy <beldmit@gmail.com>
(Merged from https://github.com/openssl/openssl/pull/28838)

2 weeks agoMove generic skeymgmt param decoder to .inc file
Simo Sorce [Fri, 10 Oct 2025 20:32:27 +0000 (16:32 -0400)] 
Move generic skeymgmt param decoder to .inc file

The Perl-generated code for the generic symmetric key import parameter decoder
is extracted from `generic.c.in` into a new `generic.inc.in` template.

The main `generic.c` file now includes the generated `generic.inc` file. This
change separates the auto-generated code from the handwritten C code,
improving modularity and readability.

Signed-off-by: Simo Sorce <simo@redhat.com>
Reviewed-by: Matt Caswell <matt@openssl.org>
Reviewed-by: Tomas Mraz <tomas@openssl.org>
Reviewed-by: Dmitry Belyavskiy <beldmit@gmail.com>
(Merged from https://github.com/openssl/openssl/pull/28838)

2 weeks agoCMP client: fix three memory leaks in error handling of the polling mechanism added...
Joshua Rogers [Fri, 10 Oct 2025 22:57:01 +0000 (06:57 +0800)] 
CMP client: fix three memory leaks in error handling of the polling mechanism added in 3.3

These are in poll_for_response(), OSSL_CMP_try_certreq(), and OSSL_CMP_exec_certreq().

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

2 weeks agoFixes for NonStop builds on 3.5 to handle OS platform header file changes.
Randall S. Becker [Mon, 6 Oct 2025 23:02:42 +0000 (00:02 +0100)] 
Fixes for NonStop builds on 3.5 to handle OS platform header file changes.

This changes handles the introduction of _POSIX_VERSION into the NonStop x86
header files that tricks OpenSSL into thinking that ucontext.h is available.

Fixes #28498

Signed-off-by: Randall S. Becker <randall.becker@nexbridge.ca>
Reviewed-by: Neil Horman <nhorman@openssl.org>
Reviewed-by: Saša Nedvědický <sashan@openssl.org>
Reviewed-by: Tomas Mraz <tomas@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/28769)

(cherry picked from commit fb2f239ca1bd05f609e9e1e06b4b84f7f628d21b)

2 weeks agoSerial submission policy
Jon Ericson [Tue, 14 Oct 2025 02:18:11 +0000 (19:18 -0700)] 
Serial submission policy

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

2 weeks agobss_dgram.c: Fix potential buffer overread and remove asserts
Tomas Mraz [Tue, 14 Oct 2025 11:28:30 +0000 (13:28 +0200)] 
bss_dgram.c: Fix potential buffer overread and remove asserts

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

2 weeks agoasn1: fix ret type in ASN1_item_d2i_fp_ex
Joshua Rogers [Sat, 11 Oct 2025 12:47:28 +0000 (20:47 +0800)] 
asn1: fix ret type in ASN1_item_d2i_fp_ex

Signed-off-by: Joshua Rogers <MegaManSec@users.noreply.github.com>
Reviewed-by: Tom Cosgrove <tom.cosgrove@arm.com>
Reviewed-by: Saša Nedvědický <sashan@openssl.org>
Reviewed-by: Kurt Roeckx <kurt@roeckx.be>
(Merged from https://github.com/openssl/openssl/pull/28884)

2 weeks agoSMIME_text() and SMIME_crlf_copy() small refactoring
Joshua Rogers [Sat, 11 Oct 2025 12:10:48 +0000 (20:10 +0800)] 
SMIME_text() and SMIME_crlf_copy() small refactoring

When out is NULL, SMIME_text() now skips BIO_write entirely and continues
to return success based on the read loop result. This matches existing
and expected semantics while avoiding a pointless write and any error masking.

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

2 weeks agossl: set tmp.pkey only after successful derive
Joshua Rogers [Sat, 11 Oct 2025 12:05:38 +0000 (20:05 +0800)] 
ssl: set tmp.pkey only after successful derive

Assign s->s3.tmp.pkey after ssl_derive succeeds and free skey on failure
to avoid a dangling state.

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

2 weeks agossl: use BAD_KEY_SHARE for invalid key share encoding
Joshua Rogers [Sat, 11 Oct 2025 12:01:18 +0000 (20:01 +0800)] 
ssl: use BAD_KEY_SHARE for invalid key share encoding

Replace BAD_ECPOINT with BAD_KEY_SHARE in tls_accept_ksgroup so alerts
are correct for non EC groups too.

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

2 weeks agobio_sock: fix inverted BIO_lookup return value check
Joshua Rogers [Sat, 11 Oct 2025 06:43:39 +0000 (14:43 +0800)] 
bio_sock: fix inverted BIO_lookup return value check

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

2 weeks agofreebsd ktls: avoid unaligned 16 bit length store in ktls_read_record
Joshua Rogers [Sat, 11 Oct 2025 06:11:07 +0000 (14:11 +0800)] 
freebsd ktls: avoid unaligned 16 bit length store in ktls_read_record

This prevents SIGBUS on strict alignment architectures when p+3 is not aligned
for 16 bit access. Behavior is unchanged on x86 and matches the Linux path.

Signed-off-by: Joshua Rogers <MegaManSec@users.noreply.github.com>
Reviewed-by: Matt Caswell <matt@openssl.org>
Reviewed-by: Tomas Mraz <tomas@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/28860)

2 weeks agoquic: use PACKET_buf_init instead of writing to PACKET internals
Joshua Rogers [Sat, 11 Oct 2025 02:39:44 +0000 (10:39 +0800)] 
quic: use PACKET_buf_init instead of writing to PACKET internals

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

2 weeks agoquic: avoid partial update in ossl_quic_bind_channel
Joshua Rogers [Sat, 11 Oct 2025 00:09:43 +0000 (08:09 +0800)] 
quic: avoid partial update in ossl_quic_bind_channel

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

2 weeks agocmp: guard NULL header sender when expected_sender is set
Joshua Rogers [Fri, 10 Oct 2025 23:40:54 +0000 (07:40 +0800)] 
cmp: guard NULL header sender when expected_sender is set

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

2 weeks agoDo not allow zstd 0.9
Joshua Rogers [Fri, 10 Oct 2025 23:07:52 +0000 (07:07 +0800)] 
Do not allow zstd 0.9

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

2 weeks agoCorrect error code in raise in bio_zstd/brotli_flush()
Joshua Rogers [Fri, 10 Oct 2025 16:58:22 +0000 (00:58 +0800)] 
Correct error code in raise in bio_zstd/brotli_flush()

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

2 weeks agossl/statem: write 16-bit ECDHE group id in SKE
Joshua Rogers [Fri, 10 Oct 2025 16:48:52 +0000 (00:48 +0800)] 
ssl/statem: write 16-bit ECDHE group id in SKE

tls_construct_server_key_exchange wrote the named group as two u8 bytes with the high byte set to 0. TLS requires a 16-bit NamedGroup. Use WPACKET_put_bytes_u16(curve_id) so ids >= 256 are encoded correctly. No change for groups < 256.

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

2 weeks agoquic: small cleanup, write is_retry with u8
Joshua Rogers [Fri, 10 Oct 2025 15:13:17 +0000 (23:13 +0800)] 
quic: small cleanup, write is_retry with u8

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

2 weeks agokeep_alive(): Do not shadow own function name
Joshua Rogers [Fri, 10 Oct 2025 13:11:43 +0000 (21:11 +0800)] 
keep_alive(): Do not shadow own function name

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

2 weeks agoResetting the cookie_len should set the cookie_len to 0.
Joshua Rogers [Fri, 10 Oct 2025 12:36:31 +0000 (20:36 +0800)] 
Resetting the cookie_len should set the cookie_len to 0.

Signed-off-by: Joshua Rogers <MegaManSec@users.noreply.github.com>
Reviewed-by: Matt Caswell <matt@openssl.org>
Reviewed-by: Tomas Mraz <tomas@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/28817)

2 weeks agoFix wrong buffer and version in outgoing msg callback
Joshua Rogers [Fri, 10 Oct 2025 12:33:29 +0000 (20:33 +0800)] 
Fix wrong buffer and version in outgoing msg callback

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

2 weeks agoapps/s_socket: fix double close of listening socket when naccept==0
Joshua Rogers [Mon, 13 Oct 2025 14:35:43 +0000 (22:35 +0800)] 
apps/s_socket: fix double close of listening socket when naccept==0

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

2 weeks agoFix off-by-one overflow in the AST resubmit
Joshua Rogers [Fri, 10 Oct 2025 11:55:31 +0000 (19:55 +0800)] 
Fix off-by-one overflow in the AST resubmit

Signed-off-by: Joshua Rogers <MegaManSec@users.noreply.github.com>
Reviewed-by: Richard Levitte <levitte@openssl.org>
Reviewed-by: Matt Caswell <matt@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/28811)

2 weeks agos_server: print program not, not port
Joshua Rogers [Fri, 10 Oct 2025 09:38:50 +0000 (17:38 +0800)] 
s_server: print program not, not port

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

2 weeks agoDisallow Message sequence number 2 in DTLSv1_listen
Joshua Rogers [Wed, 8 Oct 2025 07:31:18 +0000 (15:31 +0800)] 
Disallow Message sequence number 2 in DTLSv1_listen

Signed-off-by: Joshua Rogers <MegaManSec@users.noreply.github.com>
Reviewed-by: Frederik Wedel-Heinen <fwh.openssl@gmail.com>
Reviewed-by: Matt Caswell <matt@openssl.org>
Reviewed-by: Tomas Mraz <tomas@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/28788)

2 weeks agossl: fix OOB write in SSL_get_shared_ciphers when no shared ciphers
Joshua Rogers [Wed, 8 Oct 2025 22:14:15 +0000 (06:14 +0800)] 
ssl: fix OOB write in SSL_get_shared_ciphers when no shared ciphers

When no cipher names are appended, p remains at buf and the unconditional
p[-1] = '\0' underflows. Only NUL-terminate if at least one cipher was written;
otherwise return an empty string safely.

Signed-off-by: Joshua Rogers <MegaManSec@users.noreply.github.com>
Reviewed-by: Matt Caswell <matt@openssl.org>
Reviewed-by: Tomas Mraz <tomas@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/28785)

2 weeks agoCHANGES.md, NEWS.md: update for 3.6.0
Eugene Syromiatnikov [Wed, 1 Oct 2025 02:43:55 +0000 (04:43 +0200)] 
CHANGES.md, NEWS.md: update for 3.6.0

 * Add the release date for 3.5.4
 * Various touch-ups aimed at improving consistency of the news
 * ffixes, wfixes

Release: Yes
Signed-off-by: Eugene Syromiatnikov <esyr@openssl.org>
Reviewed-by: Neil Horman <nhorman@openssl.org>
Reviewed-by: Tomas Mraz <tomas@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/28734)

2 weeks agoCHANGES.md, NEWS.md: various ffixes
Eugene Syromiatnikov [Wed, 17 Sep 2025 15:46:07 +0000 (17:46 +0200)] 
CHANGES.md, NEWS.md: various ffixes

 * Adding missing periods.
 * Consistently using "OpenSSL" as the project's name.
 * Fixing the "`EVP_SKEY`" formatting reverted by a merge resolution
   in f815ee19e066 "Harden RSA public encrypt".
 * Fitting the lines in 80 characters, do a bit more semantic line breaks.

Signed-off-by: Eugene Syromiatnikov <esyr@openssl.org>
Reviewed-by: Neil Horman <nhorman@openssl.org>
Reviewed-by: Paul Dale <ppzgs1@gmail.com>
Reviewed-by: Tomas Mraz <tomas@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/28734)

2 weeks agoCHANGES.md, NEWS.md: update for 3.5.4
Eugene Syromiatnikov [Tue, 30 Sep 2025 09:06:25 +0000 (11:06 +0200)] 
CHANGES.md, NEWS.md: update for 3.5.4

3.5.4 CHANGES.md includes the following:
 * https://github.com/openssl/openssl/pull/28415
 * https://github.com/openssl/openssl/pull/28573
 * https://github.com/openssl/openssl/pull/28603

3.5.4 NEWS.md includes the following:
 * https://github.com/openssl/openssl/pull/28603

Release: Yes
Signed-off-by: Eugene Syromiatnikov <esyr@openssl.org>
Reviewed-by: Neil Horman <nhorman@openssl.org>
Reviewed-by: Tomas Mraz <tomas@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/28734)

2 weeks agoCMS: Produce error when AEAD algorithms are used in enveloped data
Jakub Zelenka [Thu, 22 May 2025 16:40:30 +0000 (18:40 +0200)] 
CMS: Produce error when AEAD algorithms are used in enveloped data

Fixes GH-21414

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

3 weeks agoAPPS/cmp: fix wrong CLI option reference for -ref_cert
Joshua Rogers [Wed, 8 Oct 2025 07:37:35 +0000 (15:37 +0800)] 
APPS/cmp: fix wrong CLI option reference for -ref_cert

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

3 weeks agoAPPS/ocsp: avoid memory leaks on error
Joshua Rogers [Fri, 10 Oct 2025 12:58:46 +0000 (20:58 +0800)] 
APPS/ocsp: avoid memory leaks on error

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

3 weeks agoapps/cmp.c: must not try acting as server if -reqout_only option is given
Dr. David von Oheimb [Fri, 10 Oct 2025 17:42:23 +0000 (19:42 +0200)] 
apps/cmp.c: must not try acting as server if -reqout_only option is given

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

3 weeks agoapps/cmp.c and doc/man3: add clarifying comments and doc line on CMP context used...
Dr. David von Oheimb [Fri, 10 Oct 2025 18:36:49 +0000 (20:36 +0200)] 
apps/cmp.c and doc/man3: add clarifying comments and doc line on CMP context used in two function calls; move one of these calls

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

3 weeks agoCorrect assembler version checking in perlasm scripts
Igor Ustinov [Tue, 14 Oct 2025 18:30:49 +0000 (20:30 +0200)] 
Correct assembler version checking in perlasm scripts

Fixes #20520

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

3 weeks agoAdd file and line number to test failure messages
Bob Beck [Wed, 8 Oct 2025 10:09:41 +0000 (04:09 -0600)] 
Add file and line number to test failure messages

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

3 weeks agoAllow us to pass NULL to have the current time, since CMP appears to be determined...
Bob Beck [Tue, 7 Oct 2025 10:40:20 +0000 (04:40 -0600)] 
Allow us to pass NULL to have the current time, since CMP appears to be determined to do so

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

3 weeks agoCatch the failing conversions due to limited time_t on NotBefore and NotAfter as...
Bob Beck [Tue, 7 Oct 2025 08:51:13 +0000 (02:51 -0600)] 
Catch the failing conversions due to limited time_t on NotBefore and NotAfter as well

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

3 weeks agoWindows is having issues, print the time it doesn't like when it fails
Bob Beck [Tue, 7 Oct 2025 08:07:13 +0000 (02:07 -0600)] 
Windows is having issues, print the time it doesn't like when it fails

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

3 weeks agoAdd unit test for X509 temporal validity functions.
Bob Beck [Mon, 6 Oct 2025 17:01:39 +0000 (11:01 -0600)] 
Add unit test for X509 temporal validity functions.

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

3 weeks agoAlso be pedantically RFC5280 compliant in ossl_x509_check_certificate_times.
Bob Beck [Mon, 6 Oct 2025 16:50:31 +0000 (10:50 -0600)] 
Also be pedantically RFC5280 compliant in ossl_x509_check_certificate_times.

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

3 weeks agoBring in boundary test from #28584
Bob Beck [Mon, 6 Oct 2025 11:03:41 +0000 (05:03 -0600)] 
Bring in boundary test from #28584

Will add further unit tests for the cert validity check routine

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

3 weeks agoBe fully RFC 5280 pedantic about notAfter
Bob Beck [Sun, 5 Oct 2025 01:25:40 +0000 (19:25 -0600)] 
Be fully RFC 5280 pedantic about notAfter

May as well catch this case too. Any such certificate which
is valid for the notBefore at the time in quesion should be
considered valid no mater what the time is even if the system
time has been set to something beyond the range of ASN1_TIME values.

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

3 weeks agoPut an appropriate warning in the apps code for now
Bob Beck [Sat, 20 Sep 2025 03:58:44 +0000 (21:58 -0600)] 
Put an appropriate warning in the apps code for now

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

3 weeks agoStop using X509_cmp_timeframe in cert_acceptible
Bob Beck [Sat, 20 Sep 2025 02:33:09 +0000 (20:33 -0600)] 
Stop using X509_cmp_timeframe in cert_acceptible

Again, so we don't accept invalid times as valid forever.

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

3 weeks agoStop using X509_cmp_timeframe in ossl_X509_check
Bob Beck [Sat, 20 Sep 2025 01:35:36 +0000 (19:35 -0600)] 
Stop using X509_cmp_timeframe in ossl_X509_check

To no longer accept invalid certificate times as valid forver.

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

3 weeks agoseparate time validation and comparison
Bob Beck [Fri, 19 Sep 2025 21:42:09 +0000 (15:42 -0600)] 
separate time validation and comparison

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

3 weeks agoFix the documentation for X509_cmp_timeframe
Bob Beck [Fri, 19 Sep 2025 23:36:50 +0000 (17:36 -0600)] 
Fix the documentation for X509_cmp_timeframe

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

3 weeks agoDeprecate X509_STORE_get0_objects()
Nikola Pajkovsky [Thu, 18 Sep 2025 09:36:15 +0000 (11:36 +0200)] 
Deprecate X509_STORE_get0_objects()

Resolves https://github.com/openssl/project/issues/1369
Signed-off-by: Nikola Pajkovsky <nikolap@openssl.org>
Reviewed-by: Neil Horman <nhorman@openssl.org>
Reviewed-by: Saša Nedvědický <sashan@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/28599)