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

3 weeks agox509store: reduce lock contention in X509_STORE
Nikola Pajkovsky [Thu, 18 Sep 2025 09:13:45 +0000 (11:13 +0200)] 
x509store: reduce lock contention in X509_STORE

X509_STORE was using STACK_OF(X509_OBJECT) which is not ideal structure. The
better solution is to use hashmap. The performance gains come from the fact that
sorting was removed and therefore read lock is just enough for looking up
objects/cert/crls from hashmap.

When X509_STORE_get0_objects() is called, the hashmap converts back to
the STACK_OF(X509_OBJECT), and goes back to the original
implementation with the performance hit on lookup side because stack is not
sorted anymore.

Note, hashmap maps X509_NAME to STACK_OF(X509_OBJECT), and the stack is never
sorted which may lead to performance impact if stack contains a huge of objects.

Before the change

| Threads |   mean/us |  var/us |
|---------+-----------+---------|
|       1 |  2.434803 | .034190 |
|       2 |  3.033588 | .247471 |
|       4 |  6.551132 | .150209 |
|       6 | 12.548113 | .258445 |
|       8 | 17.566257 | .168508 |
|      10 | 22.782846 | .182674 |
|      12 | 27.928990 | .426779 |
|      14 | 32.844572 | .307754 |
|      16 | 37.816247 | .660630 |
|      18 | 42.662465 | .434926 |

After the change

| Threads |  mean/us |  var/us |
|---------+----------+---------|
|       1 | 2.385398 | .015329 |
|       2 | 2.775794 | .172223 |
|       4 | 3.071882 | .126400 |
|       6 | 3.174147 | .139685 |
|       8 | 3.479235 | .297154 |
|      10 | 4.206260 | .149006 |
|      12 | 5.044039 | .194108 |
|      14 | 5.890640 | .185817 |
|      16 | 6.447808 | .256179 |
|      18 | 7.489261 | .149204 |

Resolves: https://github.com/openssl/project/issues/1275
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)

3 weeks agoMove handy test functions to testutil
Nikola Pajkovsky [Thu, 18 Sep 2025 08:42:42 +0000 (10:42 +0200)] 
Move handy test functions to testutil

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)

3 weeks agohttp_client.c: make sure to raise error 404 (also in case of further errors like...
Dr. David von Oheimb [Tue, 14 Oct 2025 08:07:04 +0000 (10:07 +0200)] 
http_client.c: make sure to raise error 404 (also in case of further errors like content type mismatch)

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

3 weeks agoquic: pass is_write to quic_classify_stream in quic_get_stream_error_code
Joshua Rogers [Fri, 10 Oct 2025 12:45:50 +0000 (20:45 +0800)] 
quic: pass is_write to quic_classify_stream in quic_get_stream_error_code

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

3 weeks agoUpdate size check condition for probable primes to align with FIPS 186-5.
leesugil [Sun, 14 Sep 2025 16:10:33 +0000 (12:10 -0400)] 
Update size check condition for probable primes to align with FIPS 186-5.

Fixes #28540

In FIPS 186-4 (Table B.1), the upper bounds for probable primes p and q were
defined using strict inequalities. In FIPS 186-5, Table A.1 replaces the
previous Table B.1 (dropping the nlen=1024 case) and revises the upper bound
condition to use weak inequalities.

CLA: trivial

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

3 weeks agossl: call SSLfatal on realloc failures in extract_keyshares
Joshua Rogers [Sat, 11 Oct 2025 11:53:07 +0000 (19:53 +0800)] 
ssl: call SSLfatal on realloc failures in extract_keyshares

Initial malloc path already does this. Realloc path went to failure
without recording a fatal alert.

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

3 weeks agoAEAD: Raise an error on EVP_DecryptFinal_ex() without the tag being set
Daniel Kubec [Sat, 11 Oct 2025 10:45:42 +0000 (12:45 +0200)] 
AEAD: Raise an error on EVP_DecryptFinal_ex() without the tag being set

In AEAD cipher providers raise an error when EVP_DecryptFinal_ex()
is called without the authentication tag being set.

Fixes #28730

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

3 weeks agoClarify that setpgpid() is optional if not provided by the platform
Joshua Rogers [Fri, 10 Oct 2025 12:56:12 +0000 (20:56 +0800)] 
Clarify that setpgpid() is optional if not provided by the platform

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>
Reviewed-by: Tomas Mraz <tomas@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/28822)

3 weeks agos_socket: continue in loop, on bind fail
Joshua Rogers [Fri, 10 Oct 2025 12:06:44 +0000 (20:06 +0800)] 
s_socket: continue in loop, on bind fail

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

3 weeks agobio/dgram: use IPV6_PMTUDISC_* with IPV6_MTU_DISCOVER
Joshua Rogers [Fri, 10 Oct 2025 09:59:19 +0000 (17:59 +0800)] 
bio/dgram: use IPV6_PMTUDISC_* with IPV6_MTU_DISCOVER

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

3 weeks agobio/dgram: fix local addr clear for i-th message
Joshua Rogers [Fri, 10 Oct 2025 09:57:16 +0000 (17:57 +0800)] 
bio/dgram: fix local addr clear for i-th message

Signed-off-by: Joshua Rogers <MegaManSec@users.noreply.github.com>
Fixes #28871

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

3 weeks agoasn1_time_test.c: More asn1 to utc testcases
Bob Beck [Wed, 8 Oct 2025 13:46:33 +0000 (07:46 -0600)] 
asn1_time_test.c: More asn1 to utc testcases

Test out of bounds month, day of month, hour, minute and seconds.
Ensure we check the leap year boundaries.

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

3 weeks agoAdd no-argon2 option to daily build.
slontis [Mon, 6 Oct 2025 00:03:36 +0000 (11:03 +1100)] 
Add no-argon2 option to daily build.

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

3 weeks agoevp_test.c: Switch the logic to skip ARGON2 EVP tests to PREFIX
Tobias Brick [Tue, 15 Apr 2025 18:41:05 +0000 (18:41 +0000)] 
evp_test.c: Switch the logic to skip ARGON2 EVP tests to PREFIX

The names have ARGON2 as PREFIX rather than SUFFIX.
This covers the argon algorithms ARGON2D, ARGON2I, and ARGON2ID.

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

3 weeks agoUpdate CI macos runners
slontis [Fri, 3 Oct 2025 02:00:35 +0000 (12:00 +1000)] 
Update CI macos runners

Github have notified that the macos 13 runner image is deprecated and
will be retired on the 4th December 2025. It will also fail temporarily
intermittently during November on specific days as a warning.

Notes:
 - The macos-14 and macos-15 labels correspond to arm64, and
   macos-14-large and macos-15-large correspond to x86_64 (intel).

 - macos x86_64 intel will no longer be supported after
   the macos 15 runner image is retired in the Fall of 2027.
   For now we should continue to support this.

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

3 weeks agoFix an error check for EVP_PBE_CipherInit_ex()
Theo Buehler [Wed, 1 Oct 2025 22:56:41 +0000 (00:56 +0200)] 
Fix an error check for EVP_PBE_CipherInit_ex()

As pointed out during the review for the recent security issue in this
file, this error check is incorrect: as documented, this function has
the usual Boolean return values.

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

3 weeks agoML-DSA: Validate signature length before decoding
Łukasz 'sil2100' Zemczak [Thu, 24 Jul 2025 08:30:31 +0000 (10:30 +0200)] 
ML-DSA: Validate signature length before decoding

Page 27 of https://nvlpubs.nist.gov/nistpubs/FIPS/NIST.FIPS.204.pdf mentions
the Input: Signature length depending on the parameters, so the signature
length should be checked before we proceed with decode.

Reviewed-by: Viktor Dukhovni <viktor@openssl.org>
Reviewed-by: Shane Lontis <shane.lontis@oracle.com>
(Merged from https://github.com/openssl/openssl/pull/28093)

3 weeks agoktls: move ktls_enable() within ktls_start()
Ulrich Weber [Thu, 26 Jun 2025 14:16:06 +0000 (16:16 +0200)] 
ktls: move ktls_enable() within ktls_start()

On linux ktls can only be enabled on established TCP sockets.
When SSL_set_fd() is called before the connection is established
ktls_enable() fails and ktls is not setup.

This moves ktls_enable() call within then ktls_start() function.
Multiple calls to ktls_start() will trigger additional ktls_enable()
calls which fail with EEXIST, but do not affect the ktls socket.

CLA: trivial

Signed-off-by: Ulrich Weber <ulrich.weber@gmail.com>
Reviewed-by: Paul Yang <paulyang.inf@gmail.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/27908)

3 weeks agoMake eyeballs happy again for ossl-nghttp3-demo
Alexandr Nedvedicky [Thu, 9 Oct 2025 14:05:59 +0000 (16:05 +0200)] 
Make eyeballs happy again for ossl-nghttp3-demo

Adjust the http3 demo client so it works better on dual stack hosts.  This
fixes the case when DNS returns both IPv4 and IPv6 addresses for host we try to
reach. The current code just uses the first address found in DNS answer. If
things are unfortunate and the service (port number) demo client tries to reach
does not listen on the address then demo  gives up and exits.

Demo can do better. The RFC 6555 suggests application should try to reach the
service on the next address returned by DNS, when the first attempt fails for
the first address returned by DNS. This change helps with situation when DNS
prefers, let' say, IPv6 address, but the service is reachable via IPv4 only.
In that case application sees the failure on the first attempt to connect to
remote server over IPv6, but the second attempt that uses IPv4 is  going to
succeed.

This extra handling is required for QUIC which uses UDP protocol. For TLS
client which uses TCP all this happens inside BIO layer which tries to
establish TCP connection. There is no TCP-handshake on UDP protocol so
BIO can not see the service is not reachable on requested address.

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

4 weeks agobioprinttest.c: return 1 on test skip
Lars Erik Wik [Tue, 7 Oct 2025 09:45:07 +0000 (11:45 +0200)] 
bioprinttest.c: return 1 on test skip

Signed-off-by: Lars Erik Wik <lars.erik.wik@northern.tech>
CLA: trivial

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

4 weeks ago- remove CYGWWIN (requested by Brandt)
sashan [Mon, 6 Oct 2025 19:58:08 +0000 (21:58 +0200)] 
- remove CYGWWIN (requested by Brandt)

Reviewed-by: Bernd Edlinger <bernd.edlinger@hotmail.de>
Reviewed-by: Tom Cosgrove <tom.cosgrove@arm.com>
Reviewed-by: Neil Horman <nhorman@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/28759)

4 weeks ago- fix suggested by Bernd
sashan [Mon, 6 Oct 2025 13:27:18 +0000 (15:27 +0200)] 
- fix suggested by Bernd

Reviewed-by: Bernd Edlinger <bernd.edlinger@hotmail.de>
Reviewed-by: Tom Cosgrove <tom.cosgrove@arm.com>
Reviewed-by: Neil Horman <nhorman@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/28759)

4 weeks agoOPENSSL_SYS_WINDOWS is also enabled for mingw build
Alexandr Nedvedicky [Mon, 6 Oct 2025 07:33:09 +0000 (09:33 +0200)] 
OPENSSL_SYS_WINDOWS is also enabled for mingw build

the test_n() in bioprinttest.c must differentiate between
MSVC runtime libc and ming runtime libc. The function
_set_printf_count_output() must be called when openssl
is linked with MSVC libc only.

Fixes #28679

Reviewed-by: Bernd Edlinger <bernd.edlinger@hotmail.de>
Reviewed-by: Tom Cosgrove <tom.cosgrove@arm.com>
Reviewed-by: Neil Horman <nhorman@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/28759)

4 weeks agoCheck return code of BIO_ADDR_rawaddress
Norbert Pocs [Sun, 5 Oct 2025 07:39:22 +0000 (09:39 +0200)] 
Check return code of BIO_ADDR_rawaddress

Fixes coverity issue: https://scan5.scan.coverity.com/#/project-view/64471/10222?selectedIssue=1666584
Thank you for the report!

Signed-off-by: Norbert Pocs <norbertp@openssl.org>
Reviewed-by: Neil Horman <nhorman@openssl.org>
Reviewed-by: Tom Cosgrove <tom.cosgrove@arm.com>
(Merged from https://github.com/openssl/openssl/pull/28751)

4 weeks ago[aarch64] move constants to rodata
Theo Buehler [Wed, 1 Oct 2025 22:14:40 +0000 (00:14 +0200)] 
[aarch64] move constants to rodata

The 3.6.0 has new assembly which again has constants in .text. This
breaks on platforms enforcing execute-only memory.

See, e.g., #24137 and PRs linked therein, among others.

Reviewed-by: Paul Dale <paul.dale@oracle.com>
Reviewed-by: Saša Nedvědický <sashan@openssl.org>
Reviewed-by: Tomas Mraz <tomas@openssl.org>
Reviewed-by: Tim Hudson <tjh@openssl.org>
Reviewed-by: Tom Cosgrove <tom.cosgrove@arm.com>
(Merged from https://github.com/openssl/openssl/pull/28726)

4 weeks agoFix riscv64 carry bug in SM2 modulo reduction
Bernd Edlinger [Sat, 4 Oct 2025 14:20:31 +0000 (16:20 +0200)] 
Fix riscv64 carry bug in SM2 modulo reduction

Fixes #28731

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

4 weeks agoReduce Max number of commands handled per fuzzer pass in quic-lcidm.
Neil Horman [Wed, 1 Oct 2025 21:34:38 +0000 (17:34 -0400)] 
Reduce Max number of commands handled per fuzzer pass in quic-lcidm.

We've gotten a few recent reports of a hang in the quic-lcidm fuzzer:

https://issues.oss-fuzz.com/issues/448510502

It looks pretty straightforward (I think).  The fuzzer input buffer is
used in this particular case to randomly issue commands to the lcidm
hash table (add/delete/query/flush/etc).

The loop for the command processing (based on the input buffer), is
limited to 10k commands.  However the fuzzer will on occasion provide
very large buffers (500k) which easily saturate that limit.  If the
input buffer happens to do something like get biased toward mostly
additions, we wind up with a huge hashtable that has to constantly grow
and rehash, which we've seen leads to timeouts in the past.

Most direct fix I think here, given that this is something of an
artificial failure in the fuzzer, is to simply clamp the command limit
more.

Fixes openssl/project#1664

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

4 weeks agoAdd SSL_get_peer_addr() function to query peer address for QUIC
Gustaf Neumann [Sun, 28 Sep 2025 13:03:32 +0000 (15:03 +0200)] 
Add SSL_get_peer_addr() function to query peer address for QUIC

This change introduces a new public API symbol: SSL_get_peer_addr().
The change is QUIC-only, there are no changes for TLS connections

- API: add peer address query for QUIC connections
  * Internal: declare/implement ossl_quic_get_peer_addr(SSL*, BIO_ADDR*)
  * Public: declare/implement SSL_get_peer_addr(SSL*, BIO_ADDR*)

Rationale:
- Allow applications to retrieve the remote UDP tuple for QUIC sessions
  (e.g., logging, access control, diagnostics)

Provided documentation and test cases for SSL_get_peer_addr().

Set peer via channel API on new-conn.

- In ch_on_new_conn_common(), BIO_ADDR_copy(&ch->cur_peer_addr, peer)
  was replaced with ossl_quic_channel_set_peer_addr(ch, peer) so
  addressed_mode is enabled at connection bring-up.

Dropped redundant peer detection in create_qc_from_incoming_conn()

The peer address is now propagated in ch_on_new_conn_common() via
ossl_quic_channel_set_peer_addr(), so the channel is already in
"addressed" mode. This also avoids querying the (unconnected) server
UDP BIO, reduces duplication, and simplifies the accept path. All
regression tests pass.

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

4 weeks agotests: temporarily skip MLDSA pkcs11-provider test
Ondrej Moris [Wed, 1 Oct 2025 05:03:27 +0000 (07:03 +0200)] 
tests: temporarily skip MLDSA pkcs11-provider test

External pkcs11-provider test requires at least kryoptic 1.2 for
MLDSA tests. But the current fedora:latest (42) still contains
kryoptic 1.1 and hence we need to temporarily disable MLDSA tests
until Fedora 43 is released.

Signed-off-by: Ondrej Moris <omoris@redhat.com>
Reviewed-by: Tomas Mraz <tomas@openssl.org>
Reviewed-by: Dmitry Belyavskiy <beldmit@gmail.com>
Reviewed-by: Neil Horman <nhorman@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/28716)

4 weeks agoUpdate pkcs11-provider submodule (663dea3)
Ondrej Moris [Wed, 1 Oct 2025 03:29:41 +0000 (05:29 +0200)] 
Update pkcs11-provider submodule (663dea3)

Signed-off-by: Ondrej Moris <omoris@redhat.com>
Reviewed-by: Tomas Mraz <tomas@openssl.org>
Reviewed-by: Dmitry Belyavskiy <beldmit@gmail.com>
Reviewed-by: Neil Horman <nhorman@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/28716)

4 weeks agoadd codespell pre-commit check and fix found misspellings
Dmitry Misharov [Tue, 30 Sep 2025 08:44:55 +0000 (10:44 +0200)] 
add codespell pre-commit check and fix found misspellings

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

4 weeks agoadd config file for pre-commit hooks framework
Dmitry Misharov [Thu, 4 Sep 2025 09:08:13 +0000 (11:08 +0200)] 
add config file for pre-commit hooks framework

pre-commit helps managing and maintaining multi-language pre-commit hooks.
This commit adds a pre-commit configuration to run a certian version of
clang-format utility. Later we can add sections for other languages as
well. pre-commit developers also provide the CI system which uses the
same config file.

https://pre-commit.com/
https://pre-commit.ci/

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

5 weeks agohashtable: add option to disable RCU locks
Nikola Pajkovsky [Thu, 25 Sep 2025 16:32:17 +0000 (18:32 +0200)] 
hashtable: add option to disable RCU locks

a new config option _no_rcu_ is added into HT_CONFIG. When _no_rcu_ is
set then hashtable can be guarded with any other locking primitives,
and behives as ordinary hashtable. Also, all the impact of the
atomics used internally to the hash table was mitigated.

RCU performance

   # INFO:  @ test/lhash_test.c:747
   # multithread stress runs 40000 ops in 40.779656 seconds

No RCU, guarded with RWLOCK

   # INFO:  @ test/lhash_test.c:747
   # multithread stress runs 40000 ops in 36.976926 seconds

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

5 weeks agohashtable: pass HT into hash function
Nikola Pajkovsky [Wed, 24 Sep 2025 15:12:39 +0000 (17:12 +0200)] 
hashtable: pass HT into hash function

When defining a custom hash function for a hashtable key, you typically start with:

  HT_START_KEY_DEFN(key)
  HT_DEF_KEY_FIELD(k, unsigned char *)
  HT_END_KEY_DEFN(KEY)

In this setup, the hash function signature requires keybuf and len as
parameters rather than the hashtable key itself. As a result,
accessing members of the hashtable structure becomes awkward, since
you must do something like:

  #define FROM_KEYBUF_TO_HT_KEY(keybuf, type) (type)((keybuf) - sizeof(HT_KEY))

  static uint64_t ht_hash(uint8_t *keybuf, size_t keylen)
  {
      KEY *k = FROM_KEYBUF_TO_HT_KEY(keybuf, KEY *);
      ...
  }

This kind of pointer arithmetic is both unnecessary and error-prone.
A cleaner approach is to pass the HT pointer directly into the hash
function. From there, you can safely cast it to the required type
without the pointer gymnastics.

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

5 weeks agoFix EVP_DecryptFinal_ex() for ChaCha20-Poly1305.
Daniel Kubec [Sat, 27 Sep 2025 22:24:18 +0000 (00:24 +0200)] 
Fix EVP_DecryptFinal_ex() for ChaCha20-Poly1305.

When using the ChaCha20-Poly1305 algorithm, the final interface
returns success without setting the authentication tag, whereas
the AES-GCM algorithm correctly returns failure in such cases.

Fixes #28137

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

5 weeks agoghash-riscv64-zvkg.pl: Code Comment Correction
zhoulu [Mon, 29 Sep 2025 08:14:28 +0000 (16:14 +0800)] 
ghash-riscv64-zvkg.pl: Code Comment Correction

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

5 weeks agots_conf: fix memory leak in TS_CONF_set_policies
DONGGEUN YOO [Mon, 29 Sep 2025 00:45:11 +0000 (00:45 +0000)] 
ts_conf: fix memory leak in TS_CONF_set_policies

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

5 weeks agoFix riscv64 chacha crash due to unaligned data
Bernd Edlinger [Sat, 27 Sep 2025 20:14:04 +0000 (22:14 +0200)] 
Fix riscv64 chacha crash due to unaligned data

The linux-riscv64 test machine crashes due to unaligned data,
when the V extension is enabled, while QEMU seems to have no
problems with unaligned data.

So check for aligned data and fall back to C code in case the
input or output values are unaligned.

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

5 weeks agoEnable the V extension in the OS-Zoo CI job
Bernd Edlinger [Sun, 28 Sep 2025 06:32:34 +0000 (08:32 +0200)] 
Enable the V extension in the OS-Zoo CI job

and also fix the unintentional omission of the ZBA extension,
since the first word in the OPENSSL_riscvcap environment variable
is ignored, because it is assumed to be the processor base
architecture, e.g. something like RV64GC.

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

5 weeks agoFix Memory leak in CMS_EncryptedData_set1_key
Ryan Hooper [Thu, 25 Sep 2025 16:42:24 +0000 (12:42 -0400)] 
Fix Memory leak in CMS_EncryptedData_set1_key

When CMS_EncryptedData_set1_key is called repeatedly it will
leak data on the second call. This was because
cms->d.encryptedData was already set and needed to be cleared
before the call to M_ASN1_new_of.

Fixes: #28606
Reviewed-by: Shane Lontis <shane.lontis@oracle.com>
Reviewed-by: Matt Caswell <matt@openssl.org>
Reviewed-by: Tomas Mraz <tomas@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/28668)

5 weeks agoaes: convert AES ciphers to use generated parameter decoders
Pauli [Fri, 19 Sep 2025 04:28:22 +0000 (14:28 +1000)] 
aes: convert AES ciphers to use generated parameter decoders

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

5 weeks agoaes: rename files in anticipation of gerenated param decoding
Pauli [Fri, 19 Sep 2025 01:30:29 +0000 (11:30 +1000)] 
aes: rename files in anticipation of gerenated param decoding

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

5 weeks agochacha20: convert to using genreated param name decoders
Pauli [Fri, 19 Sep 2025 01:25:19 +0000 (11:25 +1000)] 
chacha20: convert to using genreated param name decoders

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

5 weeks agochacha20: rename files in anticipation of generated param decoding
Pauli [Fri, 19 Sep 2025 01:16:45 +0000 (11:16 +1000)] 
chacha20: rename files in anticipation of generated param decoding

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

5 weeks agoxts: convert to generated param name decodering
Pauli [Fri, 19 Sep 2025 01:12:18 +0000 (11:12 +1000)] 
xts: convert to generated param name decodering

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

5 weeks agoctx: rename files for conversion to generated param decoders
Pauli [Fri, 19 Sep 2025 01:12:00 +0000 (11:12 +1000)] 
ctx: rename files for conversion to generated param decoders

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

5 weeks agolegacy ciphers: use generated param name decoders
Pauli [Fri, 19 Sep 2025 00:57:41 +0000 (10:57 +1000)] 
legacy ciphers: use generated param name decoders

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

5 weeks agolegacy ciphers: rename files in anticipation of using generated param decoders
Pauli [Fri, 19 Sep 2025 00:29:16 +0000 (10:29 +1000)] 
legacy ciphers: rename files in anticipation of using generated param decoders

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

5 weeks agoaes_cbc_hmac_sha: convert to generated param decoding
Pauli [Thu, 18 Sep 2025 06:32:13 +0000 (16:32 +1000)] 
aes_cbc_hmac_sha: convert to generated param decoding

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

5 weeks agoaes_cbc_hmac: rename files in anticipation of generated param decoding
Pauli [Thu, 18 Sep 2025 05:58:23 +0000 (15:58 +1000)] 
aes_cbc_hmac: rename files in anticipation of generated param decoding

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

5 weeks agomdc2: use a generated param decoder
Pauli [Thu, 18 Sep 2025 05:50:54 +0000 (15:50 +1000)] 
mdc2: use a generated param decoder

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

5 weeks agomdc2: rename files in anticipation of generated param decoding
Pauli [Thu, 18 Sep 2025 05:50:41 +0000 (15:50 +1000)] 
mdc2: rename files in anticipation of generated param decoding

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

5 weeks agoAdd CHANGES.md and NEWS.md updates
Tomas Mraz [Mon, 29 Sep 2025 12:23:12 +0000 (14:23 +0200)] 
Add CHANGES.md and NEWS.md updates

Including a few corrections of the previous entries.

Reviewed-by: Neil Horman <nhorman@openssl.org>
Reviewed-by: Matt Caswell <matt@openssl.org>
5 weeks agouse_proxy(): Add missing terminating NUL byte
Tomas Mraz [Thu, 11 Sep 2025 16:43:55 +0000 (18:43 +0200)] 
use_proxy(): Add missing terminating NUL byte

Fixes CVE-2025-9232

There is a missing terminating NUL byte after strncpy() call.
Issue and a proposed fix reported by Stanislav Fort (Aisle Research).

Reviewed-by: Neil Horman <nhorman@openssl.org>
Reviewed-by: Matt Caswell <matt@openssl.org>
5 weeks agoecp_sm2p256.c: Remove unused code
Tomas Mraz [Tue, 16 Sep 2025 12:48:31 +0000 (14:48 +0200)] 
ecp_sm2p256.c: Remove unused code

Reviewed-by: Neil Horman <nhorman@openssl.org>
Reviewed-by: Matt Caswell <matt@openssl.org>
5 weeks agoSM2: Use constant time modular inversion
Tomas Mraz [Thu, 11 Sep 2025 16:40:34 +0000 (18:40 +0200)] 
SM2: Use constant time modular inversion

Fixes CVE-2025-9231

Issue and a proposed fix reported by Stanislav Fort (Aisle Research).

Reviewed-by: Neil Horman <nhorman@openssl.org>
Reviewed-by: Matt Caswell <matt@openssl.org>
5 weeks agokek_unwrap_key(): Fix incorrect check of unwrapped key size
Viktor Dukhovni [Thu, 11 Sep 2025 16:10:12 +0000 (18:10 +0200)] 
kek_unwrap_key(): Fix incorrect check of unwrapped key size

Fixes CVE-2025-9230

The check is off by 8 bytes so it is possible to overread by
up to 8 bytes and overwrite up to 4 bytes.

Reviewed-by: Neil Horman <nhorman@openssl.org>
Reviewed-by: Matt Caswell <matt@openssl.org>
Reviewed-by: Tomas Mraz <tomas@openssl.org>
5 weeks agoRevert "fips: remove redundant RSA encrypt/decrypt KAT"
Neil Horman [Thu, 25 Sep 2025 20:08:37 +0000 (16:08 -0400)] 
Revert "fips: remove redundant RSA encrypt/decrypt KAT"

This reverts commit 635bf4946a7e948f26a348ddc3b5a8d282354f64.

During code review for FIPS-140-3 certification, our lab noticed that
the known answer test for RSA was removed.  This was done in the above
commit, as part of
https://github.com/openssl/openssl/pull/25988

Under the assertion that FIPS 140-3 Implementation Guidance section D.G
had relaxed the requirements for testing, obviating the need for this
test.

However, for the 3.5 FIPS-140-3 certification we are adding assertions
for support of KAS-IFC-SSC, which follows FIPS-140-3 I.G section D.F,
which does not contain the same relaxed constraints.  As such we need to
reintroduce the test.

While the specifics of the I.G requirements are slightly different in
D.F (allowing for other, potentially less time-consuming tests), the
most expedient path forward here is to simply re-introduce the test as
it existed previously, hence the reversion of the above commit.

Fixes openssl/private#832

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

5 weeks agokrb5kdf.c.in: Check the key size before applying the key
Tomas Mraz [Thu, 25 Sep 2025 12:19:22 +0000 (14:19 +0200)] 
krb5kdf.c.in: Check the key size before applying the key

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

5 weeks agoAdd test for using KRB5KDF with erroneous key size
Tomas Mraz [Thu, 25 Sep 2025 10:21:21 +0000 (12:21 +0200)] 
Add test for using KRB5KDF with erroneous key size

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

5 weeks agoUpdate doc/designs/rfc4514.md
Bob Beck [Wed, 24 Sep 2025 16:16:11 +0000 (10:16 -0600)] 
Update doc/designs/rfc4514.md

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

5 weeks agoAdd git pre-commit hook example to the script
Bob Beck [Mon, 22 Sep 2025 20:59:36 +0000 (14:59 -0600)] 
Add git pre-commit hook example to the script

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

5 weeks agounbreak url for legacy gost
Bob Beck [Mon, 22 Sep 2025 20:44:14 +0000 (14:44 -0600)] 
unbreak url for legacy gost

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

5 weeks agomake it not write changes by default
Bob Beck [Mon, 22 Sep 2025 20:21:06 +0000 (14:21 -0600)] 
make it not write changes by default

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

5 weeks agoAdd util/codespell-check.sh and run it
Bob Beck [Mon, 22 Sep 2025 19:51:32 +0000 (13:51 -0600)] 
Add util/codespell-check.sh and run it

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

6 weeks agoMake tests run faster on typical platforms.
Bob Beck [Tue, 2 Sep 2025 20:46:06 +0000 (14:46 -0600)] 
Make tests run faster on typical platforms.

Sadly not doable in make as it is notoriously bad at telling
you the parallelism being used by make -j.

If the HARNESS_JOBS environment variable has not been
set, this makes the perl script attempt to figure out how
many cpu's are available on anything windows/linux/macos/bsd like,
and if it can be successfully detected, we use that value.
if not, we use 1 as before.

Reviewed-by: Richard Levitte <levitte@openssl.org>
Reviewed-by: Tom Cosgrove <tom.cosgrove@arm.com>
(Merged from https://github.com/openssl/openssl/pull/28426)

6 weeks agoChange test/recipes/95-test_external_oqsprovider.t to allow out-of-source builds
Richard Levitte [Mon, 22 Sep 2025 16:26:50 +0000 (18:26 +0200)] 
Change test/recipes/95-test_external_oqsprovider.t to allow out-of-source builds

Unfortunately, CMake's FindOpenSSL.cmake module doesn't handle OpenSSL's
build tree very well when it's out-of-source.  This is resolved by create
a local OpenSSL "installation" with a minimum amount of symbolic links,
and using that.

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

6 weeks agoFix EVP_PKEY_can_sign() handling of NULL from query_operation_name()
Daniel Kubec [Fri, 19 Sep 2025 13:48:41 +0000 (15:48 +0200)] 
Fix EVP_PKEY_can_sign() handling of NULL from query_operation_name()

EVP_PKEY_can_sign() assumed query_operation_name(OSSL_OP_SIGNATURE)
always returns a non-NULL string. According to the documentation,
query_operation_name() may return NULL, in which case
EVP_KEYMGMT_get0_name() should be used as a fallback.

Fixes #27790

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

6 weeks agoCheck for OBJ_create() conflicts after write lock.
Viktor Dukhovni [Wed, 17 Sep 2025 09:07:07 +0000 (19:07 +1000)] 
Check for OBJ_create() conflicts after write lock.

For now subsequent calls to OBJ_create() with identical inputs return
NID_undef.  It may be better to return the previous NID in the future.

The real work actually happens in OBJ_add_object().  Duplicate compares
*all* the input object's fields with any of the objects found by lookup.

If these are identical, then necessarily all the lookups found the same
data, and we can return the existing nid in low-level calls via
OBJ_add_object() that specify the nid also.  If any of the fields are
different the new object is not installed and NID_undef is returned.

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