]> git.ipfire.org Git - thirdparty/openssl.git/log
thirdparty/openssl.git
6 weeks agoConstify X509_find_by_subject
Neil Horman [Thu, 19 Feb 2026 20:17:10 +0000 (15:17 -0500)] 
Constify X509_find_by_subject

Transitively, this also requires the constification of OCSP_resp_get0_signer

Reviewed-by: David von Oheimb <david.von.oheimb@siemens.com>
Reviewed-by: Paul Dale <paul.dale@oracle.com>
Reviewed-by: Norbert Pocs <norbertp@openssl.org>
MergeDate: Tue Feb 24 12:45:57 2026
(Merged from https://github.com/openssl/openssl/pull/30096)

6 weeks agoAdded Nvidia/Olympus CPU dispatch to enable optimal SHA3/EOR3 on Vera CPU
Alexander Komarov [Tue, 10 Feb 2026 09:25:23 +0000 (01:25 -0800)] 
Added Nvidia/Olympus CPU dispatch to enable optimal SHA3/EOR3 on Vera CPU

CLA: Trivial

Reviewed-by: Matt Caswell <matt@openssl.org>
Reviewed-by: Dmitry Belyavskiy <beldmit@gmail.com>
(Merged from https://github.com/openssl/openssl/pull/30129)

6 weeks agoUpdate documentation with guidelines for commit and PR messages
Pauli [Thu, 19 Feb 2026 00:29:23 +0000 (11:29 +1100)] 
Update documentation with guidelines for commit and PR messages

The CONTRIBUTING.md and PULL_REQUEST_TEMPLATE.md files have been updated
to include guidelines on what makes a desirable commit message and
PR description.

Reviewed-by: Matt Caswell <matt@openssl.org>
Reviewed-by: Nikola Pajkovsky <nikolap@openssl.org>
Reviewed-by: Tom Cosgrove <tom.cosgrove@arm.com>
(Merged from https://github.com/openssl/openssl/pull/30075)

6 weeks agoConstify X509_STORE_add_cert()
Bob Beck [Wed, 18 Feb 2026 23:43:33 +0000 (16:43 -0700)] 
Constify X509_STORE_add_cert()

For #30050

Reviewed-by: Neil Horman <nhorman@openssl.org>
Reviewed-by: Tomas Mraz <tomas@openssl.org>
Reviewed-by: Nikola Pajkovsky <nikolap@openssl.org>
MergeDate: Mon Feb 23 22:45:42 2026
(Merged from https://github.com/openssl/openssl/pull/30074)

6 weeks agoConstify various functions that were non const due to extension cache
Bob Beck [Tue, 17 Feb 2026 21:28:01 +0000 (14:28 -0700)] 
Constify various functions that were non const due to extension cache

for https://github.com/openssl/openssl/issues/30052

This is a blatent cheat. While I can get pretty close to getting
around cheating by cacheing extensions as X509 objects are created it's
too fragile at the moment. In a future with a better not-copying all
the things X509, we would endeavour to not need this.

In the meantime, in the interest of getting the public API ready to
do that, we instead make a blatent cheat in the internal function of

int ossl_x509v3_cache_extensions(const X509 *x);

Which in a future world we can work to make go away.

And then the public API all changes to const.

long X509_get_pathlen(const X509 *x);
int X509_check_ca(const X509 *x);
int X509_check_purpose(const X509 *x, int id, int ca);
long X509_get_proxy_pathlen(const X509 *x);
uint32_t X509_get_extension_flags(const X509 *x);
uint32_t X509_get_key_usage(const X509 *x);
uint32_t X509_get_extended_key_usage(const X509 *x);
onst ASN1_OCTET_STRING *X509_get0_subject_key_id(const X509 *x);
const ASN1_OCTET_STRING *X509_get0_authority_key_id(const X509 *x);
const GENERAL_NAMES *X509_get0_authority_issuer(const X509 *x);
const ASN1_INTEGER *X509_get0_authority_serial(const X509 *x);

Reviewed-by: Eugene Syromiatnikov <esyr@openssl.org>
Reviewed-by: Tomas Mraz <tomas@openssl.org>
Reviewed-by: Norbert Pocs <norbertp@openssl.org>
Reviewed-by: Nikola Pajkovsky <nikolap@openssl.org>
Reviewed-by: Neil Horman <nhorman@openssl.org>
MergeDate: Mon Feb 23 16:34:29 2026
(Merged from https://github.com/openssl/openssl/pull/30055)

6 weeks agoFix the uses of X509_check_certificate_times
Richard Levitte [Thu, 19 Feb 2026 15:30:45 +0000 (16:30 +0100)] 
Fix the uses of X509_check_certificate_times

The "error" parameter to 'X509_check_certificate_times' gets an X509 error
value, which isn't a OpenSSL ERR reason code.  Unfortunately, this was
conflated.

This restores the behaviour in the places of conflation to something
similar enough to what was done before 'X509_check_certificate_times'
was implemented.

Reviewed-by: David von Oheimb <david.von.oheimb@siemens.com>
Reviewed-by: Tomas Mraz <tomas@openssl.org>
Reviewed-by: Neil Horman <nhorman@openssl.org>
MergeDate: Mon Feb 23 15:43:21 2026
(Merged from https://github.com/openssl/openssl/pull/30088)

6 weeks agopreserve data constness when getting issuer name's and subject's hash
Denis Pronin [Tue, 19 Nov 2024 04:57:07 +0000 (07:57 +0300)] 
preserve data constness when getting issuer name's and subject's hash

CLA:trivial

Signed-off-by: Denis Pronin <dannftk@yandex.ru>
Reviewed-by: Dmitry Belyavskiy <beldmit@gmail.com>
Reviewed-by: Frederik Wedel-Heinen <fwh.openssl@gmail.com>
Reviewed-by: Neil Horman <nhorman@openssl.org>
MergeDate: Mon Feb 23 13:13:33 2026
(Merged from https://github.com/openssl/openssl/pull/25991)

6 weeks agoAdded BIO_set_send_flags() function to set flags passed to send(), sendto(), and...
Igor Ustinov [Tue, 17 Feb 2026 13:36:04 +0000 (14:36 +0100)] 
Added BIO_set_send_flags() function to set flags passed to send(), sendto(), and sendmsg().

The main intention is to allow setting the MSG_NOSIGNAL flag to avoid
a crash on receiving the SIGPIPE signal.

Fixes #16399

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

6 weeks agoOSSL_CRMF_MSG_centralkeygen_requested(): change confusing paramter name 'p10cr' to...
Dr. David von Oheimb [Wed, 26 Feb 2025 17:55:00 +0000 (18:55 +0100)] 
OSSL_CRMF_MSG_centralkeygen_requested(): change confusing paramter name 'p10cr' to 'p10'

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

6 weeks agocmp_ctx.c OSSL_CMP_CTX_new(): update and/or comment the default PBM parameters chosen
Dr. David von Oheimb [Wed, 2 Apr 2025 07:33:18 +0000 (09:33 +0200)] 
cmp_ctx.c OSSL_CMP_CTX_new(): update and/or comment the default PBM parameters chosen

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

6 weeks agoCorrect the instructions for how to run the krb5 external test.
Bob Beck [Fri, 20 Feb 2026 23:26:51 +0000 (16:26 -0700)] 
Correct the instructions for how to run the krb5 external test.

What is there is a trap. I fell into it. I was sad.

Reviewed-by: Eugene Syromiatnikov <esyr@openssl.org>
Reviewed-by: Neil Horman <nhorman@openssl.org>
MergeDate: Sun Feb 22 21:47:54 2026
(Merged from https://github.com/openssl/openssl/pull/30122)

6 weeks agoConstify X509_CRL_get0_by_cert
Angel Yankov [Thu, 19 Feb 2026 08:27:21 +0000 (10:27 +0200)] 
Constify X509_CRL_get0_by_cert

Reviewed-by: Nikola Pajkovsky <nikolap@openssl.org>
Reviewed-by: Frederik Wedel-Heinen <fwh.openssl@gmail.com>
Reviewed-by: Neil Horman <nhorman@openssl.org>
MergeDate: Sun Feb 22 17:57:56 2026
(Merged from https://github.com/openssl/openssl/pull/30079)

6 weeks agoConstify X509_CRL_get0_by_cert
Neil Horman [Thu, 19 Feb 2026 15:52:31 +0000 (10:52 -0500)] 
Constify X509_CRL_get0_by_cert

Update the X509 parameter to be const

Reviewed-by: Kurt Roeckx <kurt@roeckx.be>
Reviewed-by: Frederik Wedel-Heinen <fwh.openssl@gmail.com>
MergeDate: Sun Feb 22 17:55:12 2026
(Merged from https://github.com/openssl/openssl/pull/30090)

6 weeks agoReturn the correct error message in ossl_X509_print_ex_brief
Bob Beck [Thu, 19 Feb 2026 20:20:20 +0000 (13:20 -0700)] 
Return the correct error message in ossl_X509_print_ex_brief

X509_verify_cert_times returns a verify error code,
so X509_verify_cert_error_string() must be used to
convert it to text.

Reviewed-by: Neil Horman <nhorman@openssl.org>
Reviewed-by: David von Oheimb <david.von.oheimb@siemens.com>
MergeDate: Sun Feb 22 17:52:13 2026
(Merged from https://github.com/openssl/openssl/pull/30097)

6 weeks agoAdd a changes entry for the x509 time function changes
Bob Beck [Thu, 19 Feb 2026 20:59:17 +0000 (13:59 -0700)] 
Add a changes entry for the x509 time function changes

Reviewed-by: David von Oheimb <david.von.oheimb@siemens.com>
Reviewed-by: Tom Cosgrove <tom.cosgrove@arm.com>
Reviewed-by: Neil Horman <nhorman@openssl.org>
MergeDate: Sun Feb 22 17:49:25 2026
(Merged from https://github.com/openssl/openssl/pull/30098)

6 weeks agoFix broken strict-warnings build in sskdf and x963kdf
Neil Horman [Fri, 20 Feb 2026 10:48:53 +0000 (05:48 -0500)] 
Fix broken strict-warnings build in sskdf and x963kdf

when configuring with:

./Configure no-sskdf --strict-warnings

The build breaks as sskdf_new is defined but not used (as the same sskdf
file is used to implement x963kdf with a different new dispatch
function).  i.e. we will build the file when sskdf is disabled but
x963kdf is enabled, omitting any use of sskdf_new

Easy fix, just gate the inclusion of sskdf_new on #ifndef
OPENSSL_NO_SSKDF.

Do the same for X963KDF, which has the same problem (thank you for
pointing that out @t8m)

Fixes #30105

Reviewed-by: Tomas Mraz <tomas@openssl.org>
Reviewed-by: Nikola Pajkovsky <nikolap@openssl.org>
MergeDate: Sun Feb 22 17:46:00 2026
(Merged from https://github.com/openssl/openssl/pull/30106)

6 weeks agoConstify X509_chain_check_suiteb
Bob Beck [Tue, 17 Feb 2026 22:37:15 +0000 (15:37 -0700)] 
Constify X509_chain_check_suiteb

For https://github.com/openssl/openssl/issues/30052

Reviewed-by: Norbert Pocs <norbertp@openssl.org>
Reviewed-by: Frederik Wedel-Heinen <fwh.openssl@gmail.com>
Reviewed-by: Neil Horman <nhorman@openssl.org>
MergeDate: Sun Feb 22 17:37:38 2026
(Merged from https://github.com/openssl/openssl/pull/30058)

6 weeks agoX509V3_set_nconf(): Improve error handling using this function, mostly in apps/
Dr. David von Oheimb [Mon, 23 Aug 2021 08:33:27 +0000 (10:33 +0200)] 
X509V3_set_nconf(): Improve error handling using this function, mostly in apps/

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

6 weeks agoX509V3_set_ctx(): Improve error handling using this function, mostly in apps/
Dr. David von Oheimb [Thu, 19 Aug 2021 18:58:55 +0000 (20:58 +0200)] 
X509V3_set_ctx(): Improve error handling using this function, mostly in apps/

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

6 weeks agoCHANGE log additions
Viktor Dukhovni [Wed, 18 Feb 2026 04:27:55 +0000 (15:27 +1100)] 
CHANGE log additions

Reviewed-by: Tim Hudson <tjh@openssl.org>
Reviewed-by: Matt Caswell <matt@openssl.org>
Reviewed-by: Tomas Mraz <tomas@openssl.org>
Reviewed-by: Paul Yang <paulyang.inf@gmail.com>
MergeDate: Sat Feb 21 13:26:53 2026
(Merged from https://github.com/openssl/openssl/pull/29953)

6 weeks agoRefactor openssl-speed(1)
Viktor Dukhovni [Tue, 10 Feb 2026 11:51:15 +0000 (22:51 +1100)] 
Refactor openssl-speed(1)

- Adding support for "curveSM2" ECDH
- Integrating EdDSA and SM2 signature support into existing ECDSA code.

This removes ~500 lines of duplicated code.

Reviewed-by: Tim Hudson <tjh@openssl.org>
Reviewed-by: Matt Caswell <matt@openssl.org>
Reviewed-by: Tomas Mraz <tomas@openssl.org>
Reviewed-by: Paul Yang <paulyang.inf@gmail.com>
MergeDate: Sat Feb 21 13:26:44 2026
(Merged from https://github.com/openssl/openssl/pull/29953)

6 weeks agoNew SSL tests for SM2 cert and key exchange
Viktor Dukhovni [Wed, 11 Feb 2026 18:55:51 +0000 (05:55 +1100)] 
New SSL tests for SM2 cert and key exchange

Also some additional tests for other MLKEM hybrids.

Reviewed-by: Tim Hudson <tjh@openssl.org>
Reviewed-by: Matt Caswell <matt@openssl.org>
Reviewed-by: Tomas Mraz <tomas@openssl.org>
Reviewed-by: Paul Yang <paulyang.inf@gmail.com>
MergeDate: Sat Feb 21 13:26:36 2026
(Merged from https://github.com/openssl/openssl/pull/29953)

6 weeks agoAdd curveSM2 and curveSM2MLKEM768 TLS test.
Milan Broz [Wed, 11 Feb 2026 12:02:26 +0000 (13:02 +0100)] 
Add curveSM2 and curveSM2MLKEM768 TLS test.

This extends sslapi test for SM2-based key exchange.

Also add comments for #endif to clearly mark disabled code blocks.

Signed-off-by: Milan Broz <gmazyland@gmail.com>
Reviewed-by: Tim Hudson <tjh@openssl.org>
Reviewed-by: Matt Caswell <matt@openssl.org>
Reviewed-by: Tomas Mraz <tomas@openssl.org>
Reviewed-by: Paul Yang <paulyang.inf@gmail.com>
Reviewed-by: Viktor Dukhovni <viktor@openssl.org>
MergeDate: Sat Feb 21 13:26:27 2026
(Merged from https://github.com/openssl/openssl/pull/29953)

6 weeks agoDocument ECDH over SM2 key exchange.
Viktor Dukhovni [Sun, 8 Feb 2026 13:45:03 +0000 (00:45 +1100)] 
Document ECDH over SM2 key exchange.

Reviewed-by: Tim Hudson <tjh@openssl.org>
Reviewed-by: Matt Caswell <matt@openssl.org>
Reviewed-by: Tomas Mraz <tomas@openssl.org>
Reviewed-by: Paul Yang <paulyang.inf@gmail.com>
MergeDate: Sat Feb 21 13:26:15 2026
(Merged from https://github.com/openssl/openssl/pull/29953)

6 weeks agoSupport for RFC8998 curveSM2 + hybrid
Viktor Dukhovni [Tue, 10 Feb 2026 16:32:17 +0000 (03:32 +1100)] 
Support for RFC8998 curveSM2 + hybrid

This adds support for the "sm2sig_sm3" TLS 1.3 signature algorithm, the
"curveSM2" key exchange group (ECDH over SM2) and the associated
post-quantum/traditional (PQ/T) hybrid "curveSM2MLKEM768" key exchange.

The default key agreement group list is expanded to add two additional
PQ groups, immediately after X25519MLKEM768.  These are the P-256-based
SecP256r1MLKEM768 and the SM2-based curveSMMLKEM768.  Neither of the new
groups is a default client keyshare group, these would only come into
play after a server HRR, if for some reason X25519MLKEM768 is not
supported by the server, X25519 is not then the server's most
preferred group, and the server supports and prefers one of these
of X25519.

Reviewed-by: Tim Hudson <tjh@openssl.org>
Reviewed-by: Matt Caswell <matt@openssl.org>
Reviewed-by: Tomas Mraz <tomas@openssl.org>
Reviewed-by: Paul Yang <paulyang.inf@gmail.com>
MergeDate: Sat Feb 21 13:26:07 2026
(Merged from https://github.com/openssl/openssl/pull/29953)

6 weeks agoUse algorithm name macros instead of literals
Viktor Dukhovni [Tue, 10 Feb 2026 15:58:43 +0000 (02:58 +1100)] 
Use algorithm name macros instead of literals

In the default and FIPS provider dispatch tables use corresponding
macros instead of string literals.

Reviewed-by: Tim Hudson <tjh@openssl.org>
Reviewed-by: Matt Caswell <matt@openssl.org>
Reviewed-by: Tomas Mraz <tomas@openssl.org>
Reviewed-by: Paul Yang <paulyang.inf@gmail.com>
MergeDate: Sat Feb 21 13:25:57 2026
(Merged from https://github.com/openssl/openssl/pull/29953)

6 weeks agoPass tls-version to cert sign/verify algorithms
Viktor Dukhovni [Tue, 10 Feb 2026 15:53:51 +0000 (02:53 +1100)] 
Pass tls-version to cert sign/verify algorithms

Most signature algorithms will ignore this parameter, but for SM2 this
makes it possible to set the RFC8998 distinguished identifier.

Reviewed-by: Tim Hudson <tjh@openssl.org>
Reviewed-by: Matt Caswell <matt@openssl.org>
Reviewed-by: Tomas Mraz <tomas@openssl.org>
Reviewed-by: Paul Yang <paulyang.inf@gmail.com>
MergeDate: Sat Feb 21 13:25:47 2026
(Merged from https://github.com/openssl/openssl/pull/29953)

6 weeks agoNew SM2 "tls-version" signature parameter
Viktor Dukhovni [Tue, 10 Feb 2026 15:45:02 +0000 (02:45 +1100)] 
New SM2 "tls-version" signature parameter

When the version is TLS 1.3, this sets the SM2 distinguished identifier to
the RFC8998 specified value: "TLSv1.3+GM+Cipher+Suite".

Reviewed-by: Tim Hudson <tjh@openssl.org>
Reviewed-by: Matt Caswell <matt@openssl.org>
Reviewed-by: Tomas Mraz <tomas@openssl.org>
Reviewed-by: Paul Yang <paulyang.inf@gmail.com>
MergeDate: Sat Feb 21 13:25:39 2026
(Merged from https://github.com/openssl/openssl/pull/29953)

6 weeks agoImplement default SM2 distinguished identifier
Viktor Dukhovni [Wed, 11 Feb 2026 18:49:33 +0000 (05:49 +1100)] 
Implement default SM2 distinguished identifier

This is needed for certificate verification to work correctly.
Removed unnecessary explicit instances of the distid in most tests, and
documentation.

Reviewed-by: Tim Hudson <tjh@openssl.org>
Reviewed-by: Matt Caswell <matt@openssl.org>
Reviewed-by: Tomas Mraz <tomas@openssl.org>
Reviewed-by: Paul Yang <paulyang.inf@gmail.com>
MergeDate: Sat Feb 21 13:25:30 2026
(Merged from https://github.com/openssl/openssl/pull/29953)

6 weeks agoSM2 digest sign/verify context initialisation fix
Viktor Dukhovni [Tue, 10 Feb 2026 14:55:02 +0000 (01:55 +1100)] 
SM2 digest sign/verify context initialisation fix

SM digest sign/verify context initialisation needs to set the
"compute_z_digest" flag earlier, before calling sm2sig_signature_init(),
to process the provided parameters, because otherwise attempts to set
the "distinguished identifier" will erroneously fail.

Reviewed-by: Tim Hudson <tjh@openssl.org>
Reviewed-by: Matt Caswell <matt@openssl.org>
Reviewed-by: Tomas Mraz <tomas@openssl.org>
Reviewed-by: Paul Yang <paulyang.inf@gmail.com>
MergeDate: Sat Feb 21 13:25:19 2026
(Merged from https://github.com/openssl/openssl/pull/29953)

6 weeks agoNew decoder generator returns matched field count
Viktor Dukhovni [Mon, 9 Feb 2026 09:28:39 +0000 (20:28 +1100)] 
New decoder generator returns matched field count

It can be useful to know how many parameters matched a decoded field,
(or at least whether that number is non-zero).

Tne new `produce_param_decoder_with_count` generator produces code that
updates a count output variable.

In particular, an RSA parameter handler did not handle requests for only
unexpected parameter as gracefully as one might want.  It can now
return early when none of the provided parameters are relevant.

[ The number reported is a count of matching parameter values, not a
  count of the resulting decoded fields, so if a parameter key occurs
  more than once, the count can be larger than the number of fields
  actually set. ]

Reviewed-by: Tim Hudson <tjh@openssl.org>
Reviewed-by: Matt Caswell <matt@openssl.org>
Reviewed-by: Tomas Mraz <tomas@openssl.org>
Reviewed-by: Paul Yang <paulyang.inf@gmail.com>
MergeDate: Sat Feb 21 13:25:11 2026
(Merged from https://github.com/openssl/openssl/pull/29953)

6 weeks agoConstify X509_print_fp and X509_print_ex_fp
Neil Horman [Wed, 18 Feb 2026 21:04:52 +0000 (16:04 -0500)] 
Constify X509_print_fp and X509_print_ex_fp

Make the X509 argument to both functions const, as we don't modify the
object at all in these functions.

Again, these functions, while public, appear undocumented, and so I'm
omitting any HISTORY notes

Reviewed-by: Norbert Pocs <norbertp@openssl.org>
Reviewed-by: Nikola Pajkovsky <nikolap@openssl.org>
MergeDate: Fri Feb 20 21:26:47 2026
(Merged from https://github.com/openssl/openssl/pull/30073)

6 weeks agoConstify X509_REQ_get1_email, X509_get1_email and X509_get1_ocsp.
Milan Broz [Thu, 19 Feb 2026 12:05:21 +0000 (13:05 +0100)] 
Constify X509_REQ_get1_email, X509_get1_email and X509_get1_ocsp.

Functions seem not documented, but exported.

Signed-off-by: Milan Broz <gmazyland@gmail.com>
Reviewed-by: Tomas Mraz <tomas@openssl.org>
Reviewed-by: Norbert Pocs <norbertp@openssl.org>
Reviewed-by: Nikola Pajkovsky <nikolap@openssl.org>
Reviewed-by: Neil Horman <nhorman@openssl.org>
MergeDate: Fri Feb 20 17:07:41 2026
(Merged from https://github.com/openssl/openssl/pull/30082)

6 weeks agoRemoving some more EVP_get_smtbysmth calls
Dmitry Belyavskiy [Mon, 16 Feb 2026 13:43:41 +0000 (14:43 +0100)] 
Removing some more EVP_get_smtbysmth calls

Reviewed-by: Paul Dale <paul.dale@oracle.com>
Reviewed-by: Simo Sorce <simo@redhat.com>
(Merged from https://github.com/openssl/openssl/pull/30026)

6 weeks agorequire manual build for external ECH tests
sftcd [Tue, 17 Feb 2026 23:09:01 +0000 (23:09 +0000)] 
require manual build for external ECH tests

Reviewed-by: Tomas Mraz <tomas@openssl.org>
Reviewed-by: Matt Caswell <matt@openssl.org>
MergeDate: Fri Feb 20 14:16:40 2026
(Merged from https://github.com/openssl/openssl/pull/30059)

6 weeks agoECH: Remove whitespace at EOL or EOF
Tomas Mraz [Wed, 18 Feb 2026 14:09:37 +0000 (15:09 +0100)] 
ECH: Remove whitespace at EOL or EOF

Reviewed-by: Nikola Pajkovsky <nikolap@openssl.org>
Reviewed-by: Paul Dale <paul.dale@oracle.com>
Reviewed-by: Matt Caswell <matt@openssl.org>
MergeDate: Fri Feb 20 10:11:21 2026
(Merged from https://github.com/openssl/openssl/pull/30066)

6 weeks agoECH: Use BIO_puts when appropriate
Tomas Mraz [Wed, 18 Feb 2026 14:09:11 +0000 (15:09 +0100)] 
ECH: Use BIO_puts when appropriate

And also a few additional code cleanups.

Reviewed-by: Nikola Pajkovsky <nikolap@openssl.org>
Reviewed-by: Paul Dale <paul.dale@oracle.com>
Reviewed-by: Matt Caswell <matt@openssl.org>
MergeDate: Fri Feb 20 10:11:20 2026
(Merged from https://github.com/openssl/openssl/pull/30066)

6 weeks agoECH: change from I-D to RFC 9849 and resolve TODO(ECH) cases
sftcd [Tue, 17 Feb 2026 16:48:18 +0000 (16:48 +0000)] 
ECH: change from I-D to RFC 9849 and resolve TODO(ECH) cases

Reviewed-by: Matt Caswell <matt@openssl.org>
Reviewed-by: Tomas Mraz <tomas@openssl.org>
MergeDate: Thu Feb 19 09:22:37 2026
(Merged from https://github.com/openssl/openssl/pull/30048)

6 weeks agoECH: avoid pointer aliasing in tls_construct_ctos_psk()
sftcd [Tue, 17 Feb 2026 19:11:50 +0000 (19:11 +0000)] 
ECH: avoid pointer aliasing in tls_construct_ctos_psk()

Reviewed-by: Paul Dale <paul.dale@oracle.com>
Reviewed-by: Matt Caswell <matt@openssl.org>
Reviewed-by: Richard Levitte <levitte@openssl.org>
Reviewed-by: Tomas Mraz <tomas@openssl.org>
MergeDate: Thu Feb 19 09:20:46 2026
(Merged from https://github.com/openssl/openssl/pull/30051)

6 weeks agoech_check_format(): Fix potential out of bounds read
sftcd [Tue, 17 Feb 2026 18:37:04 +0000 (18:37 +0000)] 
ech_check_format(): Fix potential out of bounds read

strspn() is called on likely non-NUL-terminated BIO buffer.
Copy it and add NUL-termination before calling the function.

Reviewed-by: Paul Dale <paul.dale@oracle.com>
Reviewed-by: Matt Caswell <matt@openssl.org>
Reviewed-by: Tomas Mraz <tomas@openssl.org>
MergeDate: Thu Feb 19 09:17:54 2026
(Merged from https://github.com/openssl/openssl/pull/30050)

6 weeks agoAdd tests and documentation and fix a couple of issues identified by added tests
sftcd [Sun, 23 Nov 2025 23:19:16 +0000 (23:19 +0000)] 
Add tests and documentation and fix a couple of issues identified by added tests

Reviewed-by: Tomas Mraz <tomas@openssl.org>
Reviewed-by: Matt Caswell <matt@openssl.org>
MergeDate: Mon Feb 16 15:41:15 2026
(Merged from https://github.com/openssl/openssl/pull/29200)

6 weeks agoossl_ech_get_retry_configs(): Check for integer overflow
sftcd [Thu, 18 Dec 2025 14:39:10 +0000 (14:39 +0000)] 
ossl_ech_get_retry_configs(): Check for integer overflow

Fixes DEF-02-010

Reviewed-by: Paul Dale <paul.dale@oracle.com>
Reviewed-by: Matt Caswell <matt@openssl.org>
MergeDate: Wed Feb 11 17:19:16 2026
(Merged from https://github.com/openssl/openssl/pull/29593)

6 weeks agotls_process_server_hello(): With retry config validate the outer hostname
sftcd [Thu, 18 Dec 2025 14:16:10 +0000 (14:16 +0000)] 
tls_process_server_hello(): With retry config validate the outer hostname

Call SSL_set1_host() to apply the outer hostname to the certificate
validation.

Fixes DEF-02-009

Reviewed-by: Paul Dale <paul.dale@oracle.com>
Reviewed-by: Matt Caswell <matt@openssl.org>
MergeDate: Wed Feb 11 17:19:14 2026
(Merged from https://github.com/openssl/openssl/pull/29593)

6 weeks agoech_test.c: Add test for trying ECH with TLSv1.2
sftcd [Thu, 18 Dec 2025 13:48:28 +0000 (13:48 +0000)] 
ech_test.c: Add test for trying ECH with TLSv1.2

Fixes DEF-02-006

Reviewed-by: Paul Dale <paul.dale@oracle.com>
Reviewed-by: Matt Caswell <matt@openssl.org>
MergeDate: Wed Feb 11 17:19:13 2026
(Merged from https://github.com/openssl/openssl/pull/29593)

6 weeks agossl_choose_server_version(): With ECH check if connection is TLSv1.3
sftcd [Thu, 18 Dec 2025 02:10:38 +0000 (02:10 +0000)] 
ssl_choose_server_version(): With ECH check if connection is TLSv1.3

Fixes DEF-02-005

Reviewed-by: Paul Dale <paul.dale@oracle.com>
Reviewed-by: Matt Caswell <matt@openssl.org>
MergeDate: Wed Feb 11 17:19:11 2026
(Merged from https://github.com/openssl/openssl/pull/29593)

6 weeks agoDocument that SSL_OP_ECH_TRIALDECRYPT can cause DoS in some circumstances
sftcd [Tue, 25 Nov 2025 23:39:33 +0000 (23:39 +0000)] 
Document that SSL_OP_ECH_TRIALDECRYPT can cause DoS in some circumstances

Fixes DEF-02-002

Reviewed-by: Paul Dale <paul.dale@oracle.com>
Reviewed-by: Matt Caswell <matt@openssl.org>
MergeDate: Wed Feb 11 17:19:10 2026
(Merged from https://github.com/openssl/openssl/pull/29593)

6 weeks agoech_read_priv_echconfiglist(): Pass encodedlen to BIO_new_mem_buf()
sftcd [Tue, 25 Nov 2025 22:41:23 +0000 (22:41 +0000)] 
ech_read_priv_echconfiglist(): Pass encodedlen to BIO_new_mem_buf()

Fixes DEF-02-001

Reviewed-by: Paul Dale <paul.dale@oracle.com>
Reviewed-by: Matt Caswell <matt@openssl.org>
MergeDate: Wed Feb 11 17:19:08 2026
(Merged from https://github.com/openssl/openssl/pull/29593)

6 weeks agoECH: Properly apply libctx and propq from SSL_CTX
Tomas Mraz [Thu, 18 Dec 2025 10:43:41 +0000 (11:43 +0100)] 
ECH: Properly apply libctx and propq from SSL_CTX

And further minor refactoring.

Reviewed-by: Matt Caswell <matt@openssl.org>
Reviewed-by: Dmitry Belyavskiy <beldmit@gmail.com>
MergeDate: Thu Jan  8 09:59:56 2026
(Merged from https://github.com/openssl/openssl/pull/29439)

6 weeks agos_client and s_server options for ECH
sftcd [Thu, 14 Aug 2025 18:17:07 +0000 (19:17 +0100)] 
s_client and s_server options for ECH

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

6 weeks agoFix a client-auth bug introduced by ECH code
sftcd [Mon, 15 Sep 2025 20:10:33 +0000 (21:10 +0100)] 
Fix a client-auth bug introduced by ECH code

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

6 weeks agoech_store.c: Fix casts and avoid leaks on error return
Tomas Mraz [Thu, 18 Sep 2025 17:41:49 +0000 (19:41 +0200)] 
ech_store.c: Fix casts and avoid leaks on error return

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

6 weeks agoech_ssl_apis.c: Check some invalid argument passing
Tomas Mraz [Thu, 18 Sep 2025 16:01:49 +0000 (18:01 +0200)] 
ech_ssl_apis.c: Check some invalid argument passing

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

6 weeks agoFix warnings about casts in ECH code
Tomas Mraz [Thu, 18 Sep 2025 15:13:28 +0000 (17:13 +0200)] 
Fix warnings about casts in ECH code

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

6 weeks agoAdd server-side handling of Encrypted Client Hello
sftcd [Mon, 5 May 2025 13:23:55 +0000 (14:23 +0100)] 
Add server-side handling of Encrypted Client Hello

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

6 weeks agoAdd a test for the new PACKET_msg_start() function
Matt Caswell [Thu, 5 Jun 2025 14:29:01 +0000 (15:29 +0100)] 
Add a test for the new PACKET_msg_start() function

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

6 weeks agoIntroduce the PACKET_msg_start() function
Matt Caswell [Thu, 5 Jun 2025 13:41:55 +0000 (14:41 +0100)] 
Introduce the PACKET_msg_start() function

This gives us the start of the buffer in use for the PACKET.

We then use this information when calculating the TLS PSK binder.
Previously we were assuming knowledge about where the buffer starts.
However, with ECH, we may be using a different buffer to normal so it is
better to ask the PACKET where the start of the buffer is.

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

6 weeks agoECH client support for sending multiple key shares
sftcd [Fri, 2 May 2025 11:58:30 +0000 (12:58 +0100)] 
ECH client support for sending multiple key shares

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

6 weeks agoECH client side transcript refactor
sftcd [Sat, 28 Dec 2024 02:49:12 +0000 (02:49 +0000)] 
ECH client side transcript refactor

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

6 weeks agoECH client side
sftcd [Wed, 20 Nov 2024 14:10:30 +0000 (14:10 +0000)] 
ECH client side

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

6 weeks agoECH external APIs
sftcd [Thu, 10 Oct 2024 16:46:11 +0000 (17:46 +0100)] 
ECH external APIs

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

6 weeks agoECH CLI implementation
sftcd [Tue, 10 Sep 2024 23:28:32 +0000 (00:28 +0100)] 
ECH CLI implementation

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

6 weeks agoECH build artefacts and a bit of code
Stephen Farrell [Thu, 15 Aug 2024 00:27:24 +0000 (01:27 +0100)] 
ECH build artefacts and a bit of code

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

6 weeks agoDocuments initial agreed APIs for Encrypted Client Hello (ECH)
Stephen Farrell [Tue, 6 Aug 2024 22:16:58 +0000 (23:16 +0100)] 
Documents initial agreed APIs for Encrypted Client Hello (ECH)
and includes a minimal demo for some of those APIs.

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

6 weeks agoadd ech-api.md
Stephen Farrell [Wed, 26 Jun 2024 11:55:17 +0000 (12:55 +0100)] 
add ech-api.md

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

6 weeks agoConst correct time parameter for X509_cmp_time(), X509_time_adj() and X509_time_adj_ex().
Frederik Wedel-Heinen [Sun, 15 Feb 2026 14:34:59 +0000 (15:34 +0100)] 
Const correct time parameter for X509_cmp_time(), X509_time_adj() and X509_time_adj_ex().

Fixes #21371

Reviewed-by: Eugene Syromiatnikov <esyr@openssl.org>
Reviewed-by: David von Oheimb <david.von.oheimb@siemens.com>
Reviewed-by: Dmitry Belyavskiy <beldmit@gmail.com>
Reviewed-by: Neil Horman <nhorman@openssl.org>
MergeDate: Fri Feb 20 16:36:52 2026
(Merged from https://github.com/openssl/openssl/pull/30020)

6 weeks agoConstify X509_to_X509_REQ and X509_REQ_to_X509
Neil Horman [Wed, 18 Feb 2026 20:51:20 +0000 (15:51 -0500)] 
Constify X509_to_X509_REQ and X509_REQ_to_X509

Modify both functions to accept and return a const X509, respectively.

Again, neither of these functions appear documented, so omitting the
HISTORY updates here, though we should look into why they are missing
docs.

Reviewed-by: Norbert Pocs <norbertp@openssl.org>
Reviewed-by: Nikola Pajkovsky <nikolap@openssl.org>
MergeDate: Fri Feb 20 16:27:15 2026
(Merged from https://github.com/openssl/openssl/pull/30072)

6 weeks agoCRL: reject malformed CRL Number and CRL Delta Indicator
Daniel Kubec [Mon, 16 Feb 2026 12:09:41 +0000 (13:09 +0100)] 
CRL: reject malformed CRL Number and CRL Delta Indicator

Previously, a malformed ASN.1 INTEGER in the CRL Number or Delta CRL Indicator
extension would cause a parse error but the CRL would not be explicitly
rejected. Existing code discards the error and continues, accepting a CRL it
cannot fully parse, unlike other libraries and implementations that reject the
CRL outright.

Malformed encoding suggests a corrupt or tampered CRL, data that cannot be
parsed cannot be trusted. Reject the CRL outright if either extension cannot be
decoded, regardless of whether the extension is marked critical. This prevents
silent soft-fail behavior where revoked certificates could pass validation
unchecked.

Fixes #27374

Reviewed-by: Tomas Mraz <tomas@openssl.org>
Reviewed-by: David von Oheimb <david.von.oheimb@siemens.com>
Reviewed-by: Neil Horman <nhorman@openssl.org>
MergeDate: Fri Feb 20 16:24:44 2026
(Merged from https://github.com/openssl/openssl/pull/30024)

6 weeks agoConstify X509_issuer_and_serial_hash
Milan Broz [Thu, 19 Feb 2026 13:04:39 +0000 (14:04 +0100)] 
Constify X509_issuer_and_serial_hash

Signed-off-by: Milan Broz <gmazyland@gmail.com>
Reviewed-by: Neil Horman <nhorman@openssl.org>
Reviewed-by: Norbert Pocs <norbertp@openssl.org>
MergeDate: Fri Feb 20 16:22:12 2026
(Merged from https://github.com/openssl/openssl/pull/30084)

6 weeks agoConsity X509_add_cert and X509_self_signed
Neil Horman [Tue, 17 Feb 2026 20:47:12 +0000 (15:47 -0500)] 
Consity X509_add_cert and X509_self_signed

As part of the effort to not allow mutable X509 objects where they
aren't needed, constify the cert parameter for these two functions

Reviewed-by: Tomas Mraz <tomas@openssl.org>
Reviewed-by: Norbert Pocs <norbertp@openssl.org>
MergeDate: Fri Feb 20 13:33:04 2026
(Merged from https://github.com/openssl/openssl/pull/30054)

6 weeks agoConstify X509v3_asid_validate_resource_set and X509v3_addr_validate_resource_set
Milan Broz [Thu, 19 Feb 2026 09:47:33 +0000 (10:47 +0100)] 
Constify X509v3_asid_validate_resource_set and X509v3_addr_validate_resource_set

These functions are exported, but undocumented.

Signed-off-by: Milan Broz <gmazyland@gmail.com>
Reviewed-by: Tomas Mraz <tomas@openssl.org>
Reviewed-by: Norbert Pocs <norbertp@openssl.org>
Reviewed-by: Nikola Pajkovsky <nikolap@openssl.org>
Reviewed-by: Neil Horman <nhorman@openssl.org>
MergeDate: Fri Feb 20 13:06:58 2026
(Merged from https://github.com/openssl/openssl/pull/30080)

6 weeks agoconstify X509_check_trust, X509_TRUST_add
Neil Horman [Wed, 18 Feb 2026 20:34:31 +0000 (15:34 -0500)] 
constify X509_check_trust, X509_TRUST_add

Turn the X509 parameters to X509_check_trust and X509_TRUST_add into
consts.

Interesting side notes: X509_TRUST_add and some others that we're
modified as a result of this pr, are listed as public functions, but
have no documentation for them, and make doc-nits doesn't complain about
it.  Unsure as to why, but we should probably look at that eventually

Reviewed-by: Norbert Pocs <norbertp@openssl.org>
Reviewed-by: Nikola Pajkovsky <nikolap@openssl.org>
MergeDate: Fri Feb 20 13:04:04 2026
(Merged from https://github.com/openssl/openssl/pull/30071)

7 weeks agoRevert "fips-jitter: Force use jitter entropy in the FIPS 3.0.9 provider callback"
Dimitri John Ledkov [Wed, 14 Jan 2026 21:12:25 +0000 (21:12 +0000)] 
Revert "fips-jitter: Force use jitter entropy in the FIPS 3.0.9 provider callback"

This reverts commit aa5f1b4cf562d7f0b65ae7ef93179ebc1102fbeb.

Whilst this is still useful with pre-3.2 providers, it is actually unlikely to be deployed. And there are now openssl fips providers getting validated with statically linked jitterentropy source already.

See background info at:
- https://github.com/openssl/openssl/pull/25930

Fixes: https://github.com/openssl/openssl/issues/26903
Reviewed-by: Paul Dale <paul.dale@oracle.com>
Reviewed-by: Shane Lontis <shane.lontis@oracle.com>
MergeDate: Fri Feb 20 11:15:25 2026
(Merged from https://github.com/openssl/openssl/pull/29641)

7 weeks agoAdd CHANGES.md entry for SM-based cipher suites.
Milan Broz [Mon, 16 Feb 2026 20:30:28 +0000 (21:30 +0100)] 
Add CHANGES.md entry for SM-based cipher suites.

Signed-off-by: Milan Broz <gmazyland@gmail.com>
Reviewed-by: Viktor Dukhovni <viktor@openssl.org>
Reviewed-by: Tomas Mraz <tomas@openssl.org>
Reviewed-by: Matt Caswell <matt@openssl.org>
Reviewed-by: Neil Horman <nhorman@openssl.org>
MergeDate: Thu Feb 19 15:11:25 2026
(Merged from https://github.com/openssl/openssl/pull/30028)

7 weeks agoAdd tests for TLS1.3 TLS_SM4_GCM_SM3 and TLS_SM4_CCM_SM3
Milan Broz [Mon, 16 Feb 2026 15:04:28 +0000 (16:04 +0100)] 
Add tests for TLS1.3 TLS_SM4_GCM_SM3 and TLS_SM4_CCM_SM3

Signed-off-by: Milan Broz <gmazyland@gmail.com>
Reviewed-by: Viktor Dukhovni <viktor@openssl.org>
Reviewed-by: Tomas Mraz <tomas@openssl.org>
Reviewed-by: Matt Caswell <matt@openssl.org>
Reviewed-by: Neil Horman <nhorman@openssl.org>
MergeDate: Thu Feb 19 15:11:20 2026
(Merged from https://github.com/openssl/openssl/pull/30028)

7 weeks agoAdd TLS1.3 ciphersuites from RFC8998
Milan Broz [Sun, 15 Feb 2026 17:29:57 +0000 (18:29 +0100)] 
Add TLS1.3 ciphersuites from RFC8998

This adds TLS_SM4_GCM_SM3 and TLS_SM4_CCM_SM3
as defined in RFC 8998.

Fixes openssl/project#1871

Signed-off-by: Milan Broz <gmazyland@gmail.com>
Reviewed-by: Viktor Dukhovni <viktor@openssl.org>
Reviewed-by: Tomas Mraz <tomas@openssl.org>
Reviewed-by: Matt Caswell <matt@openssl.org>
Reviewed-by: Neil Horman <nhorman@openssl.org>
MergeDate: Thu Feb 19 15:11:15 2026
(Merged from https://github.com/openssl/openssl/pull/30028)

7 weeks agoConstify NAME_CONSTRAINTS_check and NAME_CONSTRAINTS_check_CN
Neil Horman [Tue, 17 Feb 2026 20:14:47 +0000 (15:14 -0500)] 
Constify NAME_CONSTRAINTS_check and NAME_CONSTRAINTS_check_CN

As part of our effort to not allow mutable x509 objects where they
aren't needed, constify the parameters to these two functions

Reviewed-by: Tomas Mraz <tomas@openssl.org>
Reviewed-by: Nikola Pajkovsky <nikolap@openssl.org>
MergeDate: Thu Feb 19 13:08:11 2026
(Merged from https://github.com/openssl/openssl/pull/30053)

7 weeks agoAdded NULL Pointer check to the print_keyspec function
Josh Auler [Tue, 17 Feb 2026 15:52:46 +0000 (10:52 -0500)] 
Added NULL Pointer check to the print_keyspec function

The function print_keyspec in apps/cmp.c previously dereferenced the 'alg' pointer
without checking if it was NULL:

    if (paramtype == V_ASN1_UNDEF || alg->parameter == NULL) {

In certain situations, the 'alg' pointer could be NULL, which may result in a null
pointer dereference.

This commit adds an explicit null check for 'alg' before dereferencing 'alg->parameter'
to ensure safe handling:

    if (alg == NULL) {
        BIO_puts(mem, "Key algorithm: <absent>\n");
        break;
    }

This prevents potential crashes when print_keyspec is called with a NULL algorithm
pointer, improving the robustness of the CMP application.

Reviewed-by: Frederik Wedel-Heinen <fwh.openssl@gmail.com>
Reviewed-by: Matt Caswell <matt@openssl.org>
MergeDate: Thu Feb 19 12:56:01 2026
(Merged from https://github.com/openssl/openssl/pull/30046)

7 weeks agoFix coverity issue 1681421
Norbert Pocs [Wed, 18 Feb 2026 08:59:04 +0000 (09:59 +0100)] 
Fix coverity issue 1681421

Check the return value of ASN1_parse_dump

Fixes: 6b167313f422 "Attribute certificate printing functions"
Signed-off-by: Norbert Pocs <norbertp@openssl.org>
Reviewed-by: Tomas Mraz <tomas@openssl.org>
Reviewed-by: Paul Dale <paul.dale@oracle.com>
Reviewed-by: Nikola Pajkovsky <nikolap@openssl.org>
MergeDate: Thu Feb 19 12:21:38 2026
(Merged from https://github.com/openssl/openssl/pull/30065)

7 weeks agoSSL_CONF_cmd.pod: Add PQC algs to recommended TLS 1.3 groups
Michael Baentsch [Wed, 23 Jul 2025 08:37:41 +0000 (10:37 +0200)] 
SSL_CONF_cmd.pod: Add PQC algs to recommended TLS 1.3 groups

Co-authored-by: Viktor Dukhovni <viktor1ghub@dukhovni.org>
Reviewed-by: Alicja Kario <hkario@redhat.com>
Reviewed-by: Paul Dale <paul.dale@oracle.com>
Reviewed-by: Viktor Dukhovni <viktor@openssl.org>
Reviewed-by: Tomas Mraz <tomas@openssl.org>
MergeDate: Thu Feb 19 10:14:06 2026
(Merged from https://github.com/openssl/openssl/pull/28076)

7 weeks agoRemove the "msie-hack" option from openssl ca
Bob Beck [Mon, 16 Feb 2026 22:42:14 +0000 (15:42 -0700)] 
Remove the "msie-hack" option from openssl ca

This has been documented as a deprecated option for
a long time, as we are not even certain this does what
was originally intended anymore, as it has no tests and
it's time of usefulness has long since past.

Reviewed-by: Eugene Syromiatnikov <esyr@openssl.org>
Reviewed-by: Nikola Pajkovsky <nikolap@openssl.org>
Reviewed-by: Tomas Mraz <tomas@openssl.org>
MergeDate: Thu Feb 19 10:09:33 2026
(Merged from https://github.com/openssl/openssl/pull/30033)

7 weeks agoFix unit tests when run under fuzz builds
Neil Horman [Wed, 18 Feb 2026 19:35:22 +0000 (14:35 -0500)] 
Fix unit tests when run under fuzz builds

PR https://github.com/openssl/openssl/pull/30045

Fixed an oss-fuzz failure that occured because we feed random data into
the pkcs12 kdf, which sometimes results in a huge iteration count, that
leads to timeouts in oss-fuzz.

The fix was to simply limit the number of iterations that we go through
during derivation.  This breaks the kdf of course, but it doesn't really
matter during fuzzing, because we don't expect random input data to
produce reasonable results, so no harm, no foul.

except.

We also, in our CI, build our fuzzer tests and run them through our
regular CI unit tests, during which we both provide valid data, and
expect valid results, and pr 30045 breaks that expectation.

The conventional wisdom is to simply skip unit tests that break under
these sorts of conditions (we do this for things like
70-test_quic_record.t already).

however, the tests that broke here are 25_test_x509, 30_test_evp,
80_test_pkcs12, and 90_test_store_cases.  It seems like we would want to
keep testing those unless we absolutely have to skip them.

So instead, lets indicate that we are running the unit tests with an
environment variable, and check that variable when we have an
UNSAFE_FOR_PRODUCTION build, skiping the iteration clamp in pkcs12kdf if
it is.  This allows us to continue running these unit tests, while still
getting the oss-fuzz runs to pass.

Reviewed-by: Tomas Mraz <tomas@openssl.org>
Reviewed-by: Norbert Pocs <norbertp@openssl.org>
MergeDate: Thu Feb 19 08:49:56 2026
(Merged from https://github.com/openssl/openssl/pull/30070)

7 weeks agoAnnotate benign race in FIPS deferred self test
Simo Sorce [Tue, 17 Feb 2026 08:09:44 +0000 (03:09 -0500)] 
Annotate benign race in FIPS deferred self test

Move TSAN definitions to threads_common.h to make them available
globally and introduce the ANNOTATE_BENIGN_RACE macro.

Apply this annotation to the state check in ossl_deferred_self_test()
to suppress a benign race warning from ThreadSanitizer, as the race
is intentional and accepted to avoid cpu contention.

Signed-off-by: Simo Sorce <simo@redhat.com>
Reviewed-by: Neil Horman <nhorman@openssl.org>
Reviewed-by: Shane Lontis <shane.lontis@oracle.com>
Reviewed-by: Paul Dale <paul.dale@oracle.com>
(Merged from https://github.com/openssl/openssl/pull/30009)

7 weeks agoRelax unnecessary atomic reads in FIPS provider
Simo Sorce [Mon, 16 Feb 2026 17:37:36 +0000 (12:37 -0500)] 
Relax unnecessary atomic reads in FIPS provider

Replace calls to ossl_get_self_test_state() with direct access to
st_all_tests[].state in the FIPS self-test code.

Atomic reads are unnecessary in functions like FIPS_kat_deferred()
and SELF_TEST_kats_execute() because they are executed with the
relevant lock already held.

For ossl_deferred_self_test(), removing the atomic read avoids
contention. The common case is that tests are already passed. If a
race occurs, the function safely falls back to the locked path in
FIPS_kat_deferred() which re-verifies the state.

Signed-off-by: Simo Sorce <simo@redhat.com>
Reviewed-by: Neil Horman <nhorman@openssl.org>
Reviewed-by: Shane Lontis <shane.lontis@oracle.com>
Reviewed-by: Paul Dale <paul.dale@oracle.com>
(Merged from https://github.com/openssl/openssl/pull/30009)

7 weeks agoMake FIPS self test state access atomic
Simo Sorce [Sat, 14 Feb 2026 03:38:26 +0000 (22:38 -0500)] 
Make FIPS self test state access atomic

Direct access to the FIPS self-test state array caused race conditions in
multi-threaded environments when checking or updating test status.

Introduce atomic accessor functions `ossl_get_self_test_state` and
`ossl_set_self_test_state`, backed by a global lock, to ensure thread-safe
state transitions. Replace all direct structure accesses with these new
functions.

Signed-off-by: Simo Sorce <simo@redhat.com>
Reviewed-by: Neil Horman <nhorman@openssl.org>
Reviewed-by: Shane Lontis <shane.lontis@oracle.com>
Reviewed-by: Paul Dale <paul.dale@oracle.com>
(Merged from https://github.com/openssl/openssl/pull/30009)

7 weeks agoFix race in FIPS on-demand self test
Simo Sorce [Fri, 13 Feb 2026 19:09:06 +0000 (14:09 -0500)] 
Fix race in FIPS on-demand self test

The on-demand self-tests could race with deferred tests executing
concurrently in another thread.

Pass the FIPS global state to SELF_TEST_post() to allow locking
around the critical section where module integrity is checked and
test states are modified. This ensures thread safety when resetting
and executing tests.

Signed-off-by: Simo Sorce <simo@redhat.com>
Reviewed-by: Neil Horman <nhorman@openssl.org>
Reviewed-by: Shane Lontis <shane.lontis@oracle.com>
Reviewed-by: Paul Dale <paul.dale@oracle.com>
(Merged from https://github.com/openssl/openssl/pull/30009)

7 weeks agoSSL_sendfile: make it more like bio/bss_sock.c:sock_write()
Gleb Smirnoff [Fri, 23 Jan 2026 18:44:23 +0000 (10:44 -0800)] 
SSL_sendfile: make it more like bio/bss_sock.c:sock_write()

First, use BIO_sock_should_retry().

Second, clear BIO retry flags.  Otherwise after an SSL_sendfile that
failed, no matter how many succeded after, the flags would still be up.

Fixes: #29742
Reviewed-by: Neil Horman <nhorman@openssl.org>
Reviewed-by: Paul Dale <paul.dale@oracle.com>
MergeDate: Wed Feb 18 23:31:24 2026
(Merged from https://github.com/openssl/openssl/pull/29744)

7 weeks agosockets: list EBUSY as a retryable socket error code.
Gleb Smirnoff [Tue, 17 Feb 2026 19:21:31 +0000 (11:21 -0800)] 
sockets: list EBUSY as a retryable socket error code.

This is a documented error code for sendfile(2) in FreeBSD.  Being on a
conservative side embrace into ifdef for now.

Reviewed-by: Neil Horman <nhorman@openssl.org>
Reviewed-by: Paul Dale <paul.dale@oracle.com>
MergeDate: Wed Feb 18 23:31:21 2026
(Merged from https://github.com/openssl/openssl/pull/29744)

7 weeks agoSSL_sendfile: let ktls_sendfile() pass more data up to SSL_sendfile()
Gleb Smirnoff [Fri, 23 Jan 2026 18:42:42 +0000 (10:42 -0800)] 
SSL_sendfile: let ktls_sendfile() pass more data up to SSL_sendfile()

Before this change ktls_sendfile() is basically 1:1 wrapper around Linux
sendfile(2).  FreeBSD sendfile(2) API is richer than Linux, and reducing
it down to Linux API loses meaningful data.  Instead, make ktls_sendfile()
more like FreeBSD sendfile(2) and adopt Linux version to that.

With this change we will be raising BIO_should_retry() flag after a short
write due to lack of buffer space in a non-blocking socket on FreeBSD.
That will allow an application to tell a short write due to lack of buffer
space from a short write due to end of file.  Before this change, the only
way to tell between these two kinds of short writes was to immediately
retry the operation.

This change allows to cut nearly in half the number of sendfile(2)
syscalls when sending a large file over a non-blocking socket on FreeBSD.

Fixes: #29742
Reviewed-by: Neil Horman <nhorman@openssl.org>
Reviewed-by: Paul Dale <paul.dale@oracle.com>
MergeDate: Wed Feb 18 23:31:18 2026
(Merged from https://github.com/openssl/openssl/pull/29744)

7 weeks agoX509: apply AKID verification checks when X509_V_FLAG_X509_STRICT is set
Daniel Kubec [Tue, 10 Feb 2026 12:36:03 +0000 (13:36 +0100)] 
X509: apply AKID verification checks when X509_V_FLAG_X509_STRICT is set

- Raise X509_V_ERR_MISSING_AUTHORITY_KEY_IDENTIFIER when AKID is not present.
- Raise X509_V_ERR_EMPTY_AUTHORITY_KEY_IDENTIFIER when AKID has no attributes.
- Raise X509_V_ERR_AKID_ISSUER_SERIAL_NOT_PAIRED when authorityCertIssuer
  and authorityCertSerialNumber fields are not paired.

RFC 5280 section 4.2.1.1: The authorityCertIssuer and authorityCertSerialNumber
fields are paired and MUST either both be present or both be absent.

- Issuer without serial is ambiguous, and serial without issuer is meaningless,
  leading to unresolvable and misleading issuer identification.

Fixes #27114
Fixes #27360
Fixes #20027

Reviewed-by: Viktor Dukhovni <viktor@openssl.org>
Reviewed-by: Tomas Mraz <tomas@openssl.org>
MergeDate: Wed Feb 18 18:17:03 2026
(Merged from https://github.com/openssl/openssl/pull/29971)

7 weeks agolimit number of iterations for fuzzer in pkcs12kdf
Neil Horman [Tue, 17 Feb 2026 15:01:12 +0000 (10:01 -0500)] 
limit number of iterations for fuzzer in pkcs12kdf

OSS-FUZZ tripped over a timeout:
https://issues.oss-fuzz.com/issues/477959320

It occurs because the pkcs12 data the fuzzer feeds into the mac
verification routine requests a large number of iterations (I think gdb
read it as 15346721 or some such), which causes very long processing
times while verifying the mac.  This is something of an artificial
problem unique to the fuzzer, as the fuzzer contains a 60 second timeout
on any single test iteration.

Fix it by limiting the iteration count to 100 only when running the
fuzzer tests.

Fixes openssl/srt#89

Reviewed-by: Tomas Mraz <tomas@openssl.org>
Reviewed-by: Matt Caswell <matt@openssl.org>
Reviewed-by: Dmitry Belyavskiy <beldmit@gmail.com>
Reviewed-by: Paul Dale <paul.dale@oracle.com>
MergeDate: Wed Feb 18 18:07:05 2026
(Merged from https://github.com/openssl/openssl/pull/30045)

7 weeks agoBugfix of bn_sqr_mont procedure on SPARC sun4v
Igor Ustinov [Wed, 28 Jan 2026 22:41:57 +0000 (23:41 +0100)] 
Bugfix of bn_sqr_mont procedure on SPARC sun4v

The fix for sparcv9-mont.pl came from Andy Polyakov (@dot-asm)

Fixes #15587

Reviewed-by: Neil Horman <nhorman@openssl.org>
Reviewed-by: Tomas Mraz <tomas@openssl.org>
Reviewed-by: Paul Dale <paul.dale@oracle.com>
MergeDate: Wed Feb 18 18:02:33 2026
(Merged from https://github.com/openssl/openssl/pull/29948)

7 weeks agosrtpkdf: check libctx null before use
Nikola Pajkovsky [Tue, 17 Feb 2026 10:03:52 +0000 (11:03 +0100)] 
srtpkdf: check libctx null before use

Signed-off-by: Nikola Pajkovsky <nikolap@openssl.org>
Reviewed-by: Eugene Syromiatnikov <esyr@openssl.org>
Reviewed-by: Neil Horman <nhorman@openssl.org>
Reviewed-by: Paul Dale <paul.dale@oracle.com>
Reviewed-by: Shane Lontis <shane.lontis@oracle.com>
MergeDate: Wed Feb 18 16:34:05 2026
(Merged from https://github.com/openssl/openssl/pull/30040)

7 weeks agosrtpkdf: cipher is written twice with the same value
Nikola Pajkovsky [Tue, 17 Feb 2026 10:00:36 +0000 (11:00 +0100)] 
srtpkdf: cipher is written twice with the same value

Resolves: https://scan5.scan.coverity.com/#/project-view/65138/10222?selectedIssue=1681392
Fixes: 5b310281af9a ("SRTP: Fixup settable input limits and test them.")
Signed-off-by: Nikola Pajkovsky <nikolap@openssl.org>
Reviewed-by: Eugene Syromiatnikov <esyr@openssl.org>
Reviewed-by: Neil Horman <nhorman@openssl.org>
Reviewed-by: Paul Dale <paul.dale@oracle.com>
Reviewed-by: Shane Lontis <shane.lontis@oracle.com>
MergeDate: Wed Feb 18 16:34:01 2026
(Merged from https://github.com/openssl/openssl/pull/30040)

7 weeks agoUse the appropriate libctx when executing CMS_SignerInfo_verify
Neil Horman [Mon, 16 Feb 2026 23:04:37 +0000 (18:04 -0500)] 
Use the appropriate libctx when executing CMS_SignerInfo_verify

@beldmit found some odd fips behavior when running cms tests after
attempting to remove the EVP_get_digestbyname call from the find routine
in cms when doing certificate signer validation.

It was occuring because the cms app, being an applet in openssl uses the
app libctx to load all the provided configuration, which implies the
fips and base providers are loaded to that ctx.  However, in the find
routine (part of cms), it only ever fetches algorithms from the default
libctx, leading to failed lookups, and consequently, CMS errors.

Fix it by using the appropriate libctx, which in this case can be
fetched from the SignerInfo data, which initializes its libctx member to
the app libctx in all cases.

Reviewed-by: Tomas Mraz <tomas@openssl.org>
Reviewed-by: Dmitry Belyavskiy <beldmit@gmail.com>
MergeDate: Wed Feb 18 16:28:44 2026
(Merged from https://github.com/openssl/openssl/pull/30034)

7 weeks agoUse defined TLS cipher suite names in SSL trace
Milan Broz [Tue, 17 Feb 2026 12:18:10 +0000 (13:18 +0100)] 
Use defined TLS cipher suite names in SSL trace

This should use #define strings instead of duplication.
Not everything is defined, though.

Fixes openssl/project#1875

Co-Authored-By: Claude Opus 4.6 Extended <noreply@anthropic.com>
Signed-off-by: Milan Broz <gmazyland@gmail.com>
Reviewed-by: Viktor Dukhovni <viktor@openssl.org>
Reviewed-by: Neil Horman <nhorman@openssl.org>
Reviewed-by: Matt Caswell <matt@openssl.org>
MergeDate: Wed Feb 18 16:01:18 2026
(Merged from https://github.com/openssl/openssl/pull/30042)

7 weeks agoAlternate fix for CVE-2025-69419
Bernd Edlinger [Fri, 13 Feb 2026 06:42:48 +0000 (07:42 +0100)] 
Alternate fix for CVE-2025-69419

This affects the function OPENSSL_uni2utf8
which caused heap buffer overflow when certain
unicode characters are converted.
The current fix is incomplete and does only prevent the
crash by making OPENSSL_uni2utf8 return a NULL pointer.
But with this change the OPENSSL_uni2utf8 will return the
correct utf8 string instead of a NULL pointer.
Additionally we add a simple test case that demonstrates
the original CVE.

Reviewed-by: Paul Dale <paul.dale@oracle.com>
Reviewed-by: Tomas Mraz <tomas@openssl.org>
MergeDate: Wed Feb 18 15:46:35 2026
(Merged from https://github.com/openssl/openssl/pull/29997)

7 weeks agoSSL_get_error(): Do not depend on the state of the error stack
Igor Ustinov [Sat, 7 Feb 2026 09:21:22 +0000 (10:21 +0100)] 
SSL_get_error(): Do not depend on the state of the error stack

We check in relevant functions (SSL_handshake(), SSL_read(), etc.) whether
a new error has been pushed onto the error stack, and if so, memorise this
fact in the SSL structure. After that SSL_get_error() uses this memorised
information instead of checking the error stack itself.

Fixes #11889
Fixes openssl/project#1715

Reviewed-by: Matt Caswell <matt@openssl.org>
Reviewed-by: Tomas Mraz <tomas@openssl.org>
MergeDate: Wed Feb 18 15:27:38 2026
(Merged from https://github.com/openssl/openssl/pull/29991)

7 weeks agoConstify X509_verify
Bob Beck [Mon, 16 Feb 2026 23:13:39 +0000 (16:13 -0700)] 
Constify X509_verify

Reviewed-by: Eugene Syromiatnikov <esyr@openssl.org>
Reviewed-by: Paul Dale <paul.dale@oracle.com>
Reviewed-by: Frederik Wedel-Heinen <fwh.openssl@gmail.com>
MergeDate: Wed Feb 18 14:56:08 2026
(Merged from https://github.com/openssl/openssl/pull/30035)

7 weeks agoMove typedef 'RSA_OEAP_PARAMS' to openssl/types.h
giorgiopapini [Thu, 12 Feb 2026 21:34:51 +0000 (22:34 +0100)] 
Move typedef 'RSA_OEAP_PARAMS' to openssl/types.h

This avoids redefinition of the type.

CLA: trivial

Reviewed-by: Shane Lontis <shane.lontis@oracle.com>
Reviewed-by: Frederik Wedel-Heinen <fwh.openssl@gmail.com>
Reviewed-by: Paul Dale <paul.dale@oracle.com>
Reviewed-by: Tomas Mraz <tomas@openssl.org>
MergeDate: Wed Feb 18 13:09:26 2026
(Merged from https://github.com/openssl/openssl/pull/29994)

7 weeks agoDeprecate X509_NAME_get_text_by NID and X509_NAME_get_text_by_OBJ
Bob Beck [Mon, 16 Feb 2026 20:25:20 +0000 (13:25 -0700)] 
Deprecate X509_NAME_get_text_by NID and X509_NAME_get_text_by_OBJ

As they were already documented as "should be considered deprecated".

Reviewed-by: Paul Dale <paul.dale@oracle.com>
Reviewed-by: Nikola Pajkovsky <nikolap@openssl.org>
Reviewed-by: Eugene Syromiatnikov <esyr@openssl.org>
Reviewed-by: Tomas Mraz <tomas@openssl.org>
MergeDate: Wed Feb 18 13:06:18 2026
(Merged from https://github.com/openssl/openssl/pull/30031)