]> git.ipfire.org Git - thirdparty/openssl.git/log
thirdparty/openssl.git
14 hours agoFixes for NonStop builds on 3.5 to handle OS platform header file changes. master
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)

15 hours 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)

15 hours 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)

15 hours 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)

15 hours 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)

15 hours 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)

15 hours 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)

15 hours 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)

15 hours 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)

15 hours 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)

15 hours 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)

15 hours 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)

15 hours 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)

15 hours 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)

15 hours 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)

15 hours 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)

15 hours 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)

15 hours 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)

15 hours 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)

15 hours 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)

15 hours 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)

15 hours 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)

15 hours 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)

15 hours 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)

15 hours 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)

15 hours 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)

15 hours 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)

15 hours 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)

38 hours 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)

38 hours 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)

39 hours 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)

39 hours 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)

42 hours 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)

43 hours 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)

43 hours 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)

43 hours 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)

43 hours 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)

43 hours 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)

43 hours 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)

43 hours 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)

43 hours 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)

43 hours 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)

43 hours 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)

43 hours 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)

43 hours 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)

43 hours 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)

43 hours 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)

43 hours 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)

43 hours 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)

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

2 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>