Skip to content
Closed
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Next Next commit
deps: upgrade openssl sources to openssl-3.5.3
  • Loading branch information
nodejs-github-bot committed Sep 16, 2025
commit 2b463735c8e2674c81132f54fcdc6cd5048dc3ea
50 changes: 50 additions & 0 deletions deps/openssl/openssl/CHANGES.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,56 @@ OpenSSL Releases
OpenSSL 3.5
-----------

### Changes between 3.5.2 and 3.5.3 [16 Sep 2025]

* Avoided a potential race condition introduced in 3.5.1, where
`OSSL_STORE_CTX` kept open during lookup while potentially being used
by multiple threads simultaneously, that could lead to potential crashes
when multiple concurrent TLS connections are served.

*Matt Caswell*

* The FIPS provider no longer performs a PCT on key import for RSA, DH,
and EC keys (that was introduced in 3.5.2), following the latest update
on that requirement in FIPS 140-3 IG 10.3.A additional comment 1.

*Dr Paul Dale*

* Secure memory allocation calls are no longer used for HMAC keys.

*Dr Paul Dale*

* `openssl req` no longer generates certificates with an empty extension list
when SKID/AKID are set to `none` during generation.

*David Benjamin*

* The man page date is now derived from the release date provided
in `VERSION.dat` and not the current date for the released builds.

*Enji Cooper*

* Hardened the provider implementation of the RSA public key "encrypt"
operation to add a missing check that the caller-indicated output buffer
size is at least as large as the byte count of the RSA modulus. The issue
was reported by Arash Ale Ebrahim from SYSPWN.

This operation is typically invoked via `EVP_PKEY_encrypt(3)`. Callers that
in fact provide a sufficiently large buffer, but fail to correctly indicate
its size may now encounter unexpected errors. In applications that attempt
RSA public encryption into a buffer that is too small, an out-of-bounds
write is now avoided and an error is reported instead.

*Viktor Dukhovni*

* Added FIPS 140-3 PCT on DH key generation.

*Nikola Pajkovsky*

* Fixed the synthesised `OPENSSL_VERSION_NUMBER`.

*Richard Levitte*

### Changes between 3.5.1 and 3.5.2 [5 Aug 2025]

* The FIPS provider now performs a PCT on key import for RSA, EC and ECX.
Expand Down
14 changes: 13 additions & 1 deletion deps/openssl/openssl/Configurations/unix-Makefile.tmpl
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@
##
## {- join("\n## ", @autowarntext) -}
{-
use Time::Piece;

use OpenSSL::Util;

our $makedep_scheme = $config{makedep_scheme};
Expand Down Expand Up @@ -74,6 +76,15 @@ FIPSKEY={- $config{FIPSKEY} -}

VERSION={- "$config{full_version}" -}
VERSION_NUMBER={- "$config{version}" -}
RELEASE_DATE={- my $t = localtime;
if ($config{"release_date"}) {
# Provide the user with a more meaningful error message
# than the default internal parsing error from
# `Time::Piece->strptime(..)`.
eval { $t = Time::Piece->strptime($config{"release_date"}, "%d %b %Y"); } ||
die "Parsing \$config{release_date} ('$config{release_date}') failed: $@";
}
$t->strftime("%Y-%m-%d") -}
MAJOR={- $config{major} -}
MINOR={- $config{minor} -}
SHLIB_VERSION_NUMBER={- $config{shlib_version} -}
Expand Down Expand Up @@ -1565,7 +1576,8 @@ EOF
return <<"EOF";
$args{src}: $pod
pod2man --name=$name --section=$section\$(MANSUFFIX) --center=OpenSSL \\
--release=\$(VERSION) $pod >\$\@
--date=\$(RELEASE_DATE) --release=\$(VERSION) \\
$pod >\$\@
EOF
} elsif (platform->isdef($args{src})) {
#
Expand Down
10 changes: 10 additions & 0 deletions deps/openssl/openssl/NEWS.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,16 @@ OpenSSL Releases
OpenSSL 3.5
-----------

### Major changes between OpenSSL 3.5.2 and OpenSSL 3.5.3 [16 Sep 2025]

* Added FIPS 140-3 PCT on DH key generation.

*Nikola Pajkovsky*

* Fixed the synthesised `OPENSSL_VERSION_NUMBER`.

*Richard Levitte*

### Major changes between OpenSSL 3.5.1 and OpenSSL 3.5.2 [5 Aug 2025]

* none
Expand Down
2 changes: 1 addition & 1 deletion deps/openssl/openssl/NOTES-WINDOWS.md
Original file line number Diff line number Diff line change
Expand Up @@ -125,7 +125,7 @@ format:
`\\HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432node\OpenSSL-<version>-<ctx>`

Where `<version>` is the major.minor version of the library being
built, and `<ctx>` is the value specified by `-DOPENSSL_WINCTX`. This allows
built, and `<ctx>` is the value specified by `-DOSSL_WINCTX`. This allows
for multiple openssl builds to be created and installed on a single system, in
which each library can use its own set of registry keys.

Expand Down
4 changes: 2 additions & 2 deletions deps/openssl/openssl/VERSION.dat
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
MAJOR=3
MINOR=5
PATCH=2
PATCH=3
PRE_RELEASE_TAG=
BUILD_METADATA=
RELEASE_DATE="5 Aug 2025"
RELEASE_DATE="16 Sep 2025"
SHLIB_VERSION=3
1 change: 1 addition & 0 deletions deps/openssl/openssl/apps/cms.c
Original file line number Diff line number Diff line change
Expand Up @@ -1280,6 +1280,7 @@ int cms_main(int argc, char **argv)
goto end;
}
if (ret <= 0) {
BIO_printf(bio_err, "Error writing CMS output\n");
ret = 6;
goto end;
}
Expand Down
2 changes: 2 additions & 0 deletions deps/openssl/openssl/apps/enc.c
Original file line number Diff line number Diff line change
Expand Up @@ -260,6 +260,8 @@ int enc_main(int argc, char **argv)
goto opthelp;
if (k)
n *= 1024;
if (n > INT_MAX)
goto opthelp;
bsize = (int)n;
break;
case OPT_K:
Expand Down
1 change: 0 additions & 1 deletion deps/openssl/openssl/apps/include/apps.h
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,6 @@ int wrap_password_callback(char *buf, int bufsiz, int verify, void *cb_data);
/* progress callback for dsaparam, dhparam, req, genpkey, etc. */
int progress_cb(EVP_PKEY_CTX *ctx);

int chopup_args(ARGS *arg, char *buf);
void dump_cert_text(BIO *out, X509 *x);
void print_name(BIO *out, const char *title, const X509_NAME *nm);
void print_bignum_var(BIO *, const BIGNUM *, const char *,
Expand Down
49 changes: 0 additions & 49 deletions deps/openssl/openssl/apps/lib/apps.c
Original file line number Diff line number Diff line change
Expand Up @@ -83,55 +83,6 @@ static int set_multi_opts(unsigned long *flags, const char *arg,
const NAME_EX_TBL *in_tbl);
int app_init(long mesgwin);

int chopup_args(ARGS *arg, char *buf)
{
int quoted;
char c = '\0', *p = NULL;

arg->argc = 0;
if (arg->size == 0) {
arg->size = 20;
arg->argv = app_malloc(sizeof(*arg->argv) * arg->size, "argv space");
}

for (p = buf;;) {
/* Skip whitespace. */
while (*p && isspace(_UC(*p)))
p++;
if (*p == '\0')
break;

/* The start of something good :-) */
if (arg->argc >= arg->size) {
char **tmp;

arg->size += 20;
tmp = OPENSSL_realloc(arg->argv, sizeof(*arg->argv) * arg->size);
if (tmp == NULL)
return 0;
arg->argv = tmp;
}
quoted = *p == '\'' || *p == '"';
if (quoted)
c = *p++;
arg->argv[arg->argc++] = p;

/* now look for the end of this */
if (quoted) {
while (*p && *p != c)
p++;
*p++ = '\0';
} else {
while (*p && !isspace(_UC(*p)))
p++;
if (*p)
*p++ = '\0';
}
}
arg->argv[arg->argc] = NULL;
return 1;
}

#ifndef APP_INIT
int app_init(long mesgwin)
{
Expand Down
21 changes: 12 additions & 9 deletions deps/openssl/openssl/apps/ocsp.c
Original file line number Diff line number Diff line change
Expand Up @@ -662,7 +662,8 @@ int ocsp_main(int argc, char **argv)
resp =
OCSP_response_create(OCSP_RESPONSE_STATUS_MALFORMEDREQUEST,
NULL);
send_ocsp_response(cbio, resp);
if (resp != NULL)
send_ocsp_response(cbio, resp);
}
goto done_resp;
}
Expand Down Expand Up @@ -764,16 +765,18 @@ int ocsp_main(int argc, char **argv)
BIO_free(derbio);
}

i = OCSP_response_status(resp);
if (i != OCSP_RESPONSE_STATUS_SUCCESSFUL) {
BIO_printf(out, "Responder Error: %s (%d)\n",
OCSP_response_status_str(i), i);
if (!ignore_err)
if (resp != NULL) {
i = OCSP_response_status(resp);
if (i != OCSP_RESPONSE_STATUS_SUCCESSFUL) {
BIO_printf(out, "Responder Error: %s (%d)\n",
OCSP_response_status_str(i), i);
if (!ignore_err)
goto end;
}
}

if (resp_text)
OCSP_RESPONSE_print(out, resp, 0);
if (resp_text)
OCSP_RESPONSE_print(out, resp, 0);
}

/* If running as responder don't verify our own response */
if (cbio != NULL) {
Expand Down
5 changes: 4 additions & 1 deletion deps/openssl/openssl/crypto/aes/asm/aes-s390x.pl
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#! /usr/bin/env perl
# Copyright 2007-2020 The OpenSSL Project Authors. All Rights Reserved.
# Copyright 2007-2025 The OpenSSL Project Authors. All Rights Reserved.
#
# Licensed under the Apache License 2.0 (the "License"). You may not use
# this file except in compliance with the License. You can obtain a copy
Expand Down Expand Up @@ -1431,6 +1431,9 @@ ()
st${g} $s3,0($sp) # backchain
la %r1,$stdframe($sp)

xc $stdframe+0(64,$sp),$stdframe+0($sp) # clear reserved/unused
# in parameter block

lmg $s2,$s3,0($key) # copy key
stg $s2,$stdframe+80($sp)
stg $s3,$stdframe+88($sp)
Expand Down
22 changes: 18 additions & 4 deletions deps/openssl/openssl/crypto/asn1/asn_mime.c
Original file line number Diff line number Diff line change
Expand Up @@ -168,6 +168,19 @@ static int asn1_write_micalg(BIO *out, STACK_OF(X509_ALGOR) *mdalgs)
BIO_write(out, ",", 1);
write_comma = 1;
md_nid = OBJ_obj2nid(sk_X509_ALGOR_value(mdalgs, i)->algorithm);

/* RFC 8702 does not define a micalg for SHAKE, assuming "shake-<bitlen>" */
if (md_nid == NID_shake128) {
if (BIO_puts(out, "shake-128") < 0)
goto err;
continue;
}
if (md_nid == NID_shake256) {
if (BIO_puts(out, "shake-256") < 0)
goto err;
continue;
}

md = EVP_get_digestbynid(md_nid);
if (md && md->md_ctrl) {
int rv;
Expand Down Expand Up @@ -204,15 +217,15 @@ static int asn1_write_micalg(BIO *out, STACK_OF(X509_ALGOR) *mdalgs)

case NID_id_GostR3411_94:
BIO_puts(out, "gostr3411-94");
goto err;
break;

case NID_id_GostR3411_2012_256:
BIO_puts(out, "gostr3411-2012-256");
goto err;
break;

case NID_id_GostR3411_2012_512:
BIO_puts(out, "gostr3411-2012-512");
goto err;
break;

default:
if (have_unknown) {
Expand Down Expand Up @@ -272,7 +285,8 @@ int SMIME_write_ASN1_ex(BIO *bio, ASN1_VALUE *val, BIO *data, int flags,
BIO_printf(bio, "Content-Type: multipart/signed;");
BIO_printf(bio, " protocol=\"%ssignature\";", mime_prefix);
BIO_puts(bio, " micalg=\"");
asn1_write_micalg(bio, mdalgs);
if (!asn1_write_micalg(bio, mdalgs))
return 0;
BIO_printf(bio, "\"; boundary=\"----%s\"%s%s",
bound, mime_eol, mime_eol);
BIO_printf(bio, "This is an S/MIME signed message%s%s",
Expand Down
25 changes: 9 additions & 16 deletions deps/openssl/openssl/crypto/bio/bss_dgram.c
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright 2005-2024 The OpenSSL Project Authors. All Rights Reserved.
* Copyright 2005-2025 The OpenSSL Project Authors. All Rights Reserved.
*
* Licensed under the Apache License 2.0 (the "License"). You may not use
* this file except in compliance with the License. You can obtain a copy
Expand Down Expand Up @@ -464,11 +464,11 @@ static int dgram_write(BIO *b, const char *in, int inl)
return ret;
}

static long dgram_get_mtu_overhead(bio_dgram_data *data)
static long dgram_get_mtu_overhead(BIO_ADDR *addr)
{
long ret;

switch (BIO_ADDR_family(&data->peer)) {
switch (BIO_ADDR_family(addr)) {
case AF_INET:
/*
* Assume this is UDP - 20 bytes for IP, 8 bytes for UDP
Expand All @@ -480,7 +480,8 @@ static long dgram_get_mtu_overhead(bio_dgram_data *data)
{
# ifdef IN6_IS_ADDR_V4MAPPED
struct in6_addr tmp_addr;
if (BIO_ADDR_rawaddress(&data->peer, &tmp_addr, NULL)

if (BIO_ADDR_rawaddress(addr, &tmp_addr, NULL)
&& IN6_IS_ADDR_V4MAPPED(&tmp_addr))
/*
* Assume this is UDP - 20 bytes for IP, 8 bytes for UDP
Expand Down Expand Up @@ -666,11 +667,7 @@ static long dgram_ctrl(BIO *b, int cmd, long num, void *ptr)
&sockopt_len)) < 0 || sockopt_val < 0) {
ret = 0;
} else {
/*
* we assume that the transport protocol is UDP and no IP
* options are used.
*/
data->mtu = sockopt_val - 8 - 20;
data->mtu = sockopt_val - dgram_get_mtu_overhead(&addr);
ret = data->mtu;
}
break;
Expand All @@ -682,11 +679,7 @@ static long dgram_ctrl(BIO *b, int cmd, long num, void *ptr)
|| sockopt_val < 0) {
ret = 0;
} else {
/*
* we assume that the transport protocol is UDP and no IPV6
* options are used.
*/
data->mtu = sockopt_val - 8 - 40;
data->mtu = sockopt_val - dgram_get_mtu_overhead(&addr);
ret = data->mtu;
}
break;
Expand All @@ -700,7 +693,7 @@ static long dgram_ctrl(BIO *b, int cmd, long num, void *ptr)
# endif
break;
case BIO_CTRL_DGRAM_GET_FALLBACK_MTU:
ret = -dgram_get_mtu_overhead(data);
ret = -dgram_get_mtu_overhead(&data->peer);
switch (BIO_ADDR_family(&data->peer)) {
case AF_INET:
ret += 576;
Expand Down Expand Up @@ -956,7 +949,7 @@ static long dgram_ctrl(BIO *b, int cmd, long num, void *ptr)
}
break;
case BIO_CTRL_DGRAM_GET_MTU_OVERHEAD:
ret = dgram_get_mtu_overhead(data);
ret = dgram_get_mtu_overhead(&data->peer);
break;

/*
Expand Down
Loading
Loading