]> git.ipfire.org Git - thirdparty/openssl.git/log
thirdparty/openssl.git
3 months agoPrepare for 3.5.1 27298/head
openssl-machine [Tue, 8 Apr 2025 13:09:15 +0000 (13:09 +0000)] 
Prepare for 3.5.1

Reviewed-by: Saša Nedvědický <sashan@openssl.org>
Reviewed-by: Matt Caswell <matt@openssl.org>
Release: yes

3 months agoPrepare for release of 3.5.0 openssl-3.5.0
openssl-machine [Tue, 8 Apr 2025 13:09:06 +0000 (13:09 +0000)] 
Prepare for release of 3.5.0

Reviewed-by: Saša Nedvědický <sashan@openssl.org>
Reviewed-by: Matt Caswell <matt@openssl.org>
Release: yes

3 months agomake update
openssl-machine [Tue, 8 Apr 2025 13:09:05 +0000 (13:09 +0000)] 
make update

Reviewed-by: Saša Nedvědický <sashan@openssl.org>
Reviewed-by: Matt Caswell <matt@openssl.org>
Release: yes

3 months agoCopyright year updates
openssl-machine [Tue, 8 Apr 2025 13:07:23 +0000 (13:07 +0000)] 
Copyright year updates

Reviewed-by: Saša Nedvědický <sashan@openssl.org>
Reviewed-by: Matt Caswell <matt@openssl.org>
Release: yes

3 months agoAdd known issues to NEWS.md for 3.5.0
Neil Horman [Mon, 7 Apr 2025 13:09:09 +0000 (09:09 -0400)] 
Add known issues to NEWS.md for 3.5.0

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

(cherry picked from commit 30adecd7258b1c657466f1ecf0c1d29491aac0b4)

4 months agoREADME: Remove client only restriction for QUIC.
Sebastian Andrzej Siewior [Thu, 3 Apr 2025 21:17:54 +0000 (23:17 +0200)] 
README: Remove client only restriction for QUIC.

The QUIC protocol is also supported on server side.
Update the README file accordingly.

Signed-off-by: Sebastian Andrzej Siewior <sebastian@breakpoint.cc>
Reviewed-by: Tomas Mraz <tomas@openssl.org>
Reviewed-by: Matt Caswell <matt@openssl.org>
Reviewed-by: Paul Dale <ppzgs1@gmail.com>
Reviewed-by: Neil Horman <nhorman@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/27258)

(cherry picked from commit 648366ad010b3b22c1f298d39934d72702b3fd55)

4 months agoFix code style in quicapitest.c
Samson S. Kolge [Fri, 4 Apr 2025 12:19:52 +0000 (17:49 +0530)] 
Fix code style in quicapitest.c

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

(cherry picked from commit ba46275556ae93e44f27fece2d25655b42ce2842)

4 months agoFix SSL_new() with QUIC_server_method and improve formatting (Fixes #27255)
Samson S. Kolge [Fri, 4 Apr 2025 11:38:22 +0000 (17:08 +0530)] 
Fix SSL_new() with QUIC_server_method and improve formatting (Fixes #27255)

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

(cherry picked from commit 5341e271d9eb211d3b61d370a68ee4ce4147cd12)

4 months agoFix a reference in the OpenSSL guide to QUIC for servers
Matt Caswell [Fri, 4 Apr 2025 09:12:46 +0000 (10:12 +0100)] 
Fix a reference in the OpenSSL guide to QUIC for servers

One part of the OpenSSL guide suggests we only support clients for QUIC
which is no longer true.

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: Neil Horman <nhorman@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/27265)

(cherry picked from commit 0a16bb7e740306a10c14a6f92c42782f9b5e2048)

4 months agoUpdate README-QUIC.md with server-side QUIC support information
Samson S. Kolge [Wed, 2 Apr 2025 10:32:10 +0000 (16:02 +0530)] 
Update README-QUIC.md with server-side QUIC support information

- Add information about OpenSSL 3.5 server-side QUIC support

- Include specific command instructions for running the QUIC server example

- Explicitly note that s_server does NOT support QUIC

- Fix documentation formatting (trailing spaces and blank lines around code blocks)

Signed-off-by: Samson S. Kolge <eglok1980@gmail.com>
Reviewed-by: Tomas Mraz <tomas@openssl.org>
Reviewed-by: Matt Caswell <matt@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/27230)

(cherry picked from commit c66e00398c9feabc02ff6e678089a3dc95f985d2)

4 months agoFix a visual glitch in test_cmp_http.t
Bernd Edlinger [Fri, 21 Mar 2025 19:58:57 +0000 (20:58 +0100)] 
Fix a visual glitch in test_cmp_http.t

Kill the shell process after the Mock server is running,
to prevent the shell from printing an error message when
the Mock server is finally killed.

Reviewed-by: Paul Dale <ppzgs1@gmail.com>
Reviewed-by: David von Oheimb <david.von.oheimb@siemens.com>
Reviewed-by: Tomas Mraz <tomas@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/27144)

(cherry picked from commit c45f0dd80370f1aa942cf47fc5ea99cb887621e4)

4 months agoDetect segfault in the pkeyutl test
Matt Caswell [Tue, 1 Apr 2025 09:32:00 +0000 (10:32 +0100)] 
Detect segfault in the pkeyutl test

Some tests are expected to fail in the pkeyutl test. However, if a segfault
occurs then that counts as a failure and the test passes. A segfault should
never be a "pass".

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

(cherry picked from commit ff5a272e605633b9cba30ee9440cf05b90e903d9)

4 months agoFix a segfault in the pkeyutl command line app
Matt Caswell [Tue, 1 Apr 2025 09:31:33 +0000 (10:31 +0100)] 
Fix a segfault in the pkeyutl command line app

Don't attempt to deref a pkey that is NULL

Fixes #27156

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

(cherry picked from commit 3f0f723b521b5138f9ac77ede45a77dc46a734d4)

4 months agoTemporarily disable gost-engine tests in ci
Neil Horman [Tue, 1 Apr 2025 17:16:04 +0000 (13:16 -0400)] 
Temporarily disable gost-engine tests in ci

We need to temporarily disable this as we have a build break in CI:
https://github.com/openssl/openssl/actions/runs/14192630435

Its occuring because gost-engine depends on libprov, which requires a
minimum version cmake-3.0.  The update of github runners to cmake-4.0
causes a bail out as cmake 4.0 no longers supports cmake 3.0 syntax.

Libprov is fixed now, but gost-engine needs to update its libprov
submodule, and then we need to update the gost-engine submodule.  Until
thats done (which may take days), we should disable the gost-engine
external tests

Reviewed-by: Paul Yang <kaishen.yy@antfin.com>
Reviewed-by: Tomas Mraz <tomas@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/27234)

(cherry picked from commit db9771b5a056d939b6112cdc099fbf4f86d184ee)

4 months agoLink SSL_get_negotiated_group() and SSL_get0_group_name() in the docs
Matt Caswell [Mon, 31 Mar 2025 14:51:14 +0000 (15:51 +0100)] 
Link SSL_get_negotiated_group() and SSL_get0_group_name() in the docs

If you are intereseted in one you might be interested in the other.

Fixes #27137

Reviewed-by: Tom Cosgrove <tom.cosgrove@arm.com>
Reviewed-by: Tomas Mraz <tomas@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/27210)

(cherry picked from commit 9eb21877f5704595a89cd550b1a639df86229b09)

4 months agofix OOB issue in AVX-512 XTS decryption
Dan Pittman [Mon, 31 Mar 2025 17:28:41 +0000 (10:28 -0700)] 
fix OOB issue in AVX-512 XTS decryption

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

(cherry picked from commit 8ca8f9afbb870293fb0a9dd74cfead9b7767596f)

4 months agostatem: always save sigalgs during PHA
Benjamin Kaduk [Fri, 14 Jun 2024 21:10:39 +0000 (14:10 -0700)] 
statem: always save sigalgs during PHA

We use the same extension-parsing function on server and client
for convenience, but while the server might worry about tracking
what was previously received and not overwriting it, on the client
receiving a request for post-handshake authentication, we always
want to use the values from the current extension (and should
always have a new session object that we are free to mutate).

It is somewhat unclear whether the server also needs the check
for a resumed connection; it appears to have been added back in
2015 in commit 062178678f5374b09f00d70796f6e692e8775aca as part
of a broad pass to handle extensions on resumption, but without
specific documentation of each extension's handling.

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

(cherry picked from commit ddd99d52d30e2fdae08f9684947cba45ce53898b)

4 months agoFix more quic_multistream test formatting
Neil Horman [Sat, 29 Mar 2025 21:52:20 +0000 (17:52 -0400)] 
Fix more quic_multistream test formatting

We encountered another failure in the quic_multistream_test:
https://github.com/openssl/openssl/actions/runs/14127125173/job/39578660601#step:9:1005

It appears we still occasionally get empty frames in our qlog, with the
validate-qlog.py scripts properly bails out on.  In the above case, the
offending frame entry looked like this:
{
  "name": "transport:packet_received",
  "data": {
    "header": {
      "packet_type": "initial",
      "packet_number": 4,
      "dcid": "",
      "scid": "6217813c336a012a"
    },
    "datagram_id": 6,
    "frames": [
      {
        "frame_type": "new_token",
        "token": {
          "raw": {
            "data": "44801add5794"
          }
        },
        "length": 8
      },
      {
        "frame_type": "stream",
        "stream_id": 15897,
        "offset": 625652585,
        "payload_length": 11,
        "explicit_length": true,
        "fin": true,
        "length": 8
      },
      {}    <= NOTE EMPTY FRAME HERE
    ]
  },
  "time": 0
}

I think we're still missing some frame formatting cases in
script_21_inject_plain(), which can format potentially any of the frames
listed in the forbidden_frame_types array when running the
test_dyn_frame_types test.

I think we need to enumerate all of those frame types in the case
statement we have there.  Fortunately we generally don't have to provide
sane values, and most of the cases fall into 4 categories (those that
need a 64 bit data value, and those that require 1, 2 or 3 variable
integers).  There are two special cases, NEW_TOKEN, and NEW_CONNECTION,
but those just need a mix of fixed and variable width data.

So lets fully enumerate those and hopefully put this to bed.

Reviewed-by: Saša Nedvědický <sashan@openssl.org>
Reviewed-by: Tomas Mraz <tomas@openssl.org>
Reviewed-by: Bernd Edlinger <bernd.edlinger@hotmail.de>
(Merged from https://github.com/openssl/openssl/pull/27200)

(cherry picked from commit 0162f75fb1ae4adfb56f022884d8325521bcc141)

4 months agoFix cpp comment in windows build
slontis [Fri, 28 Mar 2025 08:35:42 +0000 (19:35 +1100)] 
Fix cpp comment in windows build

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

(cherry picked from commit b8860598d2f7eab14fcf63c22579d879615465c8)

4 months agoFix Strict c issue in aes_gcm for armv8
slontis [Sun, 30 Mar 2025 22:42:59 +0000 (09:42 +1100)] 
Fix Strict c issue in aes_gcm for armv8

Reported by David Makepeace

Reviewed-by: Paul Dale <ppzgs1@gmail.com>
Reviewed-by: Kurt Roeckx <kurt@roeckx.be>
Reviewed-by: Tom Cosgrove <tom.cosgrove@arm.com>
Reviewed-by: Tomas Mraz <tomas@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/27203)

(cherry picked from commit 0a78595eac55cc9ec9d2046c704404ec52752b8c)

4 months agoAdded 3.5 to coveralls.yml
Vavroch [Sun, 30 Mar 2025 07:49:59 +0000 (09:49 +0200)] 
Added 3.5 to coveralls.yml

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

(cherry picked from commit b3955eaa26f25fc43bdb6b2f299c89f685b5b7b6)

4 months agoFix sigalg corner cases
Viktor Dukhovni [Wed, 26 Mar 2025 10:36:08 +0000 (21:36 +1100)] 
Fix sigalg corner cases

- Tolerate RSA PKCS#1 *certificate* signatures when
  the peer sigals include RSA PSS with the same digest.

  Now that we're more strict about not sending sigalgs that are out of
  protocol range, when the client supports TLS 1.3 only, we might refuse
  to return an RSA PKCS#1-signed cert.

- Don't send TLS 1.3 sigalgs when requesting client certs from
  a TLS 1.2 client.

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

(cherry picked from commit a5f98e6da521934455898d49c8b2152a60b46925)

4 months agoFix c++ comment in ec code.
slontis [Fri, 28 Mar 2025 07:57:48 +0000 (18:57 +1100)] 
Fix c++ comment in ec code.

This is a 9 month old change, so I am not sure why it is only causing a
compile issue now.

Reported by David Makepeace

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

(cherry picked from commit ea77608920e88812a5278be351e3ebbfdb81d992)

4 months agoFix probing the registry for configuration
Branden Clark [Tue, 28 Jan 2025 15:50:10 +0000 (16:50 +0100)] 
Fix probing the registry for configuration

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

(cherry picked from commit 908e0f37288b76132c166364c75cbac9f46deb9f)

4 months agocrypto: windows: use LPCTSTR for the temp registry buffer
Hugo Beauzée-Luyssen [Mon, 27 Jan 2025 07:36:30 +0000 (08:36 +0100)] 
crypto: windows: use LPCTSTR for the temp registry buffer

mingw-w64 only defines LPCTCH when UNICODE isn't defined
crypto/defaults.c: In function 'get_windows_regdirs':
crypto/defaults.c:72:5: error: unknown type name 'LPCTCH'; did you mean 'LPTCH'?
   72 |     LPCTCH tempstr = NULL;
      |     ^~~~~~
      |     LPTCH

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

(cherry picked from commit 0e38f78dca2ececcce4d0179b7d111452e7878ea)

4 months agocrypto: fix preprocessor concatenation
Hugo Beauzée-Luyssen [Mon, 27 Jan 2025 07:36:07 +0000 (08:36 +0100)] 
crypto: fix preprocessor concatenation

String litteral don't need the '##' operator, which causes build
failures:
crypto/defaults.c:kepi:23: error: pasting ""SOFTWARE\\WOW6432Node\\OpenSSL"" and ""-"" does not give a valid preprocessing token

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

(cherry picked from commit ed3876adb1f0beb5fac8d564337ab949f227c563)

4 months agoUpdate FIPS-README.md to reflect latest versions
Neil Horman [Thu, 27 Mar 2025 14:34:52 +0000 (10:34 -0400)] 
Update FIPS-README.md to reflect latest versions

With our new FIPS provider certification, lets update the FIPS-README to
reflect our latest release and fips validated versions

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

(cherry picked from commit 50316c18a0468bb0191904d7615955c9b47f061f)

4 months agoAvoid potential double-free with duplicated hybrid ML-KEM keys
Viktor Dukhovni [Thu, 27 Mar 2025 01:34:50 +0000 (12:34 +1100)] 
Avoid potential double-free with duplicated hybrid ML-KEM keys

Issue reported by Apple Inc on 2025-03-26.

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

(cherry picked from commit 02cada2e45a2867e304542f9c5440bfb29af0283)

4 months agoadded use IO::File; to 15-test_ml_kem_codecs.t
Alex Prabhat Bara [Thu, 27 Mar 2025 10:12:07 +0000 (15:42 +0530)] 
added use IO::File; to 15-test_ml_kem_codecs.t

CLA: trivial

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

(cherry picked from commit 39229d93d53806fff98108f4bfdb228fef6546e3)

4 months agoadded use IO::File; 15-test_ml_dsa_codecs.t
Alex Prabhat Bara [Thu, 27 Mar 2025 10:11:31 +0000 (15:41 +0530)] 
added use IO::File; 15-test_ml_dsa_codecs.t

CLA: trivial

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

(cherry picked from commit 6a6ce4c1f3d3ceee77ad8787d9786d4af896b72d)

4 months agoapps/lib/apps.c: Add a check for OPENSSL_strdup()
JiashengJiang [Wed, 26 Mar 2025 21:40:16 +0000 (17:40 -0400)] 
apps/lib/apps.c: Add a check for OPENSSL_strdup()

Add a check for the return value of OPENSSL_strdup() to guarantee the success of allocation, similar to the other call sites.

Fixes: c7d5ea2670 ("Prepare to detect index changes in OCSP responder.")
Signed-off-by: JiashengJiang <jiasheng@purdue.edu>
Reviewed-by: Paul Dale <ppzgs1@gmail.com>
Reviewed-by: Tim Hudson <tjh@openssl.org>
Reviewed-by: Tomas Mraz <tomas@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/27172)

(cherry picked from commit 930c645e6b74a09398f6345b2d265c38ff035afe)

4 months agoFix goto label indents to match style
Viktor Dukhovni [Thu, 27 Mar 2025 07:58:37 +0000 (18:58 +1100)] 
Fix goto label indents to match style

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

(cherry picked from commit 60f2a714002365256dba1c55bb4dd46802ea14d6)

4 months agoprovider-compatibility.yml: Update the branches
Tomas Mraz [Thu, 27 Mar 2025 11:11:57 +0000 (12:11 +0100)] 
provider-compatibility.yml: Update the branches

Fixes regression from 725f55e23

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

(cherry picked from commit bf4c9b7b663e03e81fe0291e03b814bafd409d1b)

4 months agoFix quic_multistream_test: correct more frame types
Bernd Edlinger [Tue, 25 Mar 2025 15:57:32 +0000 (16:57 +0100)] 
Fix quic_multistream_test: correct more frame types

There are a few more critical frame injections that
previously created an out-of-diskspace problem
and now only a CI test failure.  The pattern
in the qlog files is always similar to this:

{"frame_type":"stop_sending","stream_id":6,"error_code":1152,"length":4},
{"frame_type":"path_challenge","length":9},...{}

Note: The stream_id 6 is a OSSL_QUIC_FRAME_TYPE_CRYPTO.

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

(cherry picked from commit 8ed3eee3b416d0bff4890bba24af4a7a1839bf78)

4 months agoUse OPENSSL_strdup() for strings freed by OPENSSL_free()
sashan [Wed, 26 Mar 2025 08:37:01 +0000 (09:37 +0100)] 
Use OPENSSL_strdup() for strings freed by OPENSSL_free()

Things can get messy when application decides to use it's own memory
allocation functions using CRYPTO_set_mem_functions(3ossl)

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

(cherry picked from commit 7fa51041e4d68838b2c7ddf4f77d6bba0edf2735)

4 months agoReport s_client chain cert pkey alg correctly
Viktor Dukhovni [Sun, 23 Mar 2025 13:50:39 +0000 (00:50 +1100)] 
Report s_client chain cert pkey alg correctly

In particular provided keys are also supported, and for EC keys we
report the group rather than the bit count.

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

(cherry picked from commit aeb797594b28f8bd3e2cc1fa8a51ba7f1aea1b1d)

4 months agoUpdate X509_VERIFY_PARAM_set_flags.pod
Kyle Mullen [Tue, 18 Mar 2025 13:29:25 +0000 (09:29 -0400)] 
Update X509_VERIFY_PARAM_set_flags.pod

Change description of B<X509_V_FLAG_CRL_CHECK_ALL> to reflect its inability
to function without B<X509_V_FLAG_CRL_CHECK> being enabled as well.

Fixes #27056 (https://github.com/openssl/openssl/issues/27056)

CLA: trivial

Reviewed-by: Paul Yang <kaishen.yy@antfin.com>
Reviewed-by: David von Oheimb <david.von.oheimb@siemens.com>
Reviewed-by: Tomas Mraz <tomas@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/27098)

(cherry picked from commit b7d3c729b14ccd9d23437d8ae107020a4332af72)

4 months agoExtend backoff period in noisydgram BIO users
Neil Horman [Wed, 26 Mar 2025 15:17:31 +0000 (11:17 -0400)] 
Extend backoff period in noisydgram BIO users

Initially tests that were written which make use of the noisy dgram BIO,
were done under the assumption that, despite any packet mangling done by
the noisy dgram bio, the connection would still be established.  This
was initiall guaranteed by configuring the BIO to avoid
corrupting/dropping/duplicating/re-injecting the first packet received,
thus ensuring that the client and server hello frames would make it to
the peer successfully.

This implicitly made the assumption that the client and server hellos
were contained within a single datagram, which until recently was true.

However, with the introduction of ML-KEM keyshares, the above assumption
no longer holds.  Large ML-KEM keyshares generally expand these TLS
messages accross multiple datagrams, and so it is now possible that
those initial records can become corrupted/lost etc, leading to
unexpected connection failures.

Lets fix it by restoring the guarantee that these tests were written
under by making the backoff time configurable to a number of frames, and
configuring the quic connection objects used in the test to not drop the
first two initial frames, once again guaranteeing that the client and
server hello arrive at the peer uncorrupted, so that we get a good
connection established.

Fixes #27103

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

(cherry picked from commit 131fff1b09e07eeb5db8b99d7e8f502d8c4fb1e5)

4 months agobn_mul_words.pod: Fix failures in doc-nits check
qu3ri [Tue, 4 Feb 2025 14:05:02 +0000 (09:05 -0500)] 
bn_mul_words.pod: Fix failures in doc-nits check

Reviewed-by: Nicola Tuveri <nic.tuv@gmail.com>
Reviewed-by: Tomas Mraz <tomas@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/26597)

(cherry picked from commit 1b61f8e1808d3b3ee2d8f8e42bdc8fcc2b538373)

4 months agoMoved crypto/bn/README.pod to internal manpages
qu3ri [Thu, 30 Jan 2025 19:04:59 +0000 (14:04 -0500)] 
Moved crypto/bn/README.pod to internal manpages

The new place is doc/internal/man3/bn_mul_words.pod.

Also removed outdated information.

Implementing the fix from https://github.com/quictls/quictls/pull/214

Fixes #26399

Reviewed-by: Nicola Tuveri <nic.tuv@gmail.com>
Reviewed-by: Tomas Mraz <tomas@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/26597)

(cherry picked from commit 78b1fdf4a101ae4909038e90b2c3c961be5a7064)

4 months agoRemoved duplicates in some man pages
Chase Killorin [Wed, 5 Mar 2025 19:44:58 +0000 (14:44 -0500)] 
Removed duplicates in some man pages

Fixes openssl/openssl#11748

find-doc-nits: Check for duplicate options

Reviewed-by: Nicola Tuveri <nic.tuv@gmail.com>
Reviewed-by: Paul Yang <kaishen.yy@antfin.com>
Reviewed-by: Tomas Mraz <tomas@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/27088)

(cherry picked from commit 2c8103e468fa6463ef503a3dd8e6e20d1b1afec9)

4 months agoFix return value of the i2d_ASN1_bio_stream() call
Andrey Tsygunka [Thu, 20 Mar 2025 14:45:23 +0000 (17:45 +0300)] 
Fix return value of the i2d_ASN1_bio_stream() call

If the flags argument does not contain the SMIME_STREAM bit,
the i2d_ASN1_bio_stream() function always returns 1,
ignoring the result of the ASN1_item_i2d_bio() call.

Fix the return value to the result of the ASN1_item_i2d_bio()
call for this case.

CLA: trivial

Signed-off-by: Andrey Tsygunka <aitsygunka@yandex.ru>
Reviewed-by: Nicola Tuveri <nic.tuv@gmail.com>
Reviewed-by: Paul Yang <kaishen.yy@antfin.com>
Reviewed-by: Tomas Mraz <tomas@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/27106)

(cherry picked from commit 3edb1f09c62c058edf4039587ef35f6b074e0870)

4 months agoIn s_client report 'long' certificate sigalg name
Viktor Dukhovni [Sun, 23 Mar 2025 13:29:38 +0000 (00:29 +1100)] 
In s_client report 'long' certificate sigalg name

This matches the sigalg output format of X509_signature_print(3).

Reviewed-by: Dmitry Belyavskiy <beldmit@gmail.com>
Reviewed-by: Paul Yang <kaishen.yy@antfin.com>
Reviewed-by: Tim Hudson <tjh@openssl.org>
Reviewed-by: Tomas Mraz <tomas@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/27130)

(cherry picked from commit dc246cec87793843d5a725abf2c89a6e134e7939)

4 months agoUpdate provider compatibility CI to run on 3.5 branch
Tomas Mraz [Tue, 25 Mar 2025 09:16:30 +0000 (10:16 +0100)] 
Update provider compatibility CI to run on 3.5 branch

Also drop 3.1 development branch as it is out of public support now.

Reviewed-by: Matt Caswell <matt@openssl.org>
Reviewed-by: Paul Yang <kaishen.yy@antfin.com>
Reviewed-by: Tim Hudson <tjh@openssl.org>
Reviewed-by: Paul Dale <ppzgs1@gmail.com>
(Merged from https://github.com/openssl/openssl/pull/27149)

(cherry picked from commit 725f55e235057c463feadabbb4d23450126117fd)

4 months agoIn doc/man7/provider-{en,de}coder.pod, clarify where properties are defined
Richard Levitte [Mon, 24 Mar 2025 05:25:01 +0000 (06:25 +0100)] 
In doc/man7/provider-{en,de}coder.pod, clarify where properties are defined

Fixes #27126

Reviewed-by: Paul Yang <kaishen.yy@antfin.com>
Reviewed-by: Paul Dale <ppzgs1@gmail.com>
Reviewed-by: Nicola Tuveri <nic.tuv@gmail.com>
(Merged from https://github.com/openssl/openssl/pull/27132)

(cherry picked from commit a006b0a0894b9aa399eee91bd28ca06b281eef7e)

4 months agoFix a visual glitch in test_cms.t
Bernd Edlinger [Mon, 24 Mar 2025 22:03:16 +0000 (23:03 +0100)] 
Fix a visual glitch in test_cms.t

the newline in the newly added subtest names somehow
creates another small visual glitch in the test output,
that looks like:
80-test_cms.t .. 30/?
80-test_cms.t .. ok

Reviewed-by: Tomas Mraz <tomas@openssl.org>
Reviewed-by: Paul Yang <kaishen.yy@antfin.com>
(Merged from https://github.com/openssl/openssl/pull/27145)

4 months agoChange documentation to point to new wiki location
Jon Ericson [Fri, 14 Mar 2025 16:44:55 +0000 (09:44 -0700)] 
Change documentation to point to new wiki location

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

(cherry picked from commit da8de0e8dd3e09655cd17ef700359c63acdc9cd4)

4 months agoMemory leak fix ktls_meth.c
jay9827342 [Fri, 21 Mar 2025 09:39:49 +0000 (09:39 +0000)] 
Memory leak fix ktls_meth.c

The OSSL_RECORD_LAYER needs to be properly freed when return code isnt success.
Memory leak fix

CLA: trivial

Reviewed-by: Matt Caswell <matt@openssl.org>
Reviewed-by: Paul Yang <kaishen.yy@antfin.com>
Reviewed-by: Tomas Mraz <tomas@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/27111)

(cherry picked from commit e5e4cf41c7af9b533265efb05e81ce1c56d58601)

4 months agoReport IANA sigalg name in s_client
Viktor Dukhovni [Sun, 23 Mar 2025 07:50:39 +0000 (18:50 +1100)] 
Report IANA sigalg name in s_client

Reviewed-by: Dmitry Belyavskiy <beldmit@gmail.com>
Reviewed-by: Paul Dale <ppzgs1@gmail.com>
Reviewed-by: Paul Yang <kaishen.yy@antfin.com>
Reviewed-by: Nicola Tuveri <nic.tuv@gmail.com>
Reviewed-by: Tomas Mraz <tomas@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/27128)

(cherry picked from commit 681528cbc41278a7bdc662cdb1ab286e07170a90)

4 months agoTest EVP_DigestSignInit() with ECDSA and KECCAK-256 hash
Tomas Mraz [Thu, 20 Mar 2025 20:25:07 +0000 (21:25 +0100)] 
Test EVP_DigestSignInit() with ECDSA and KECCAK-256 hash

Reviewed-by: Paul Dale <ppzgs1@gmail.com>
Reviewed-by: Dmitry Belyavskiy <beldmit@gmail.com>
Reviewed-by: Nicola Tuveri <nic.tuv@gmail.com>
(Merged from https://github.com/openssl/openssl/pull/27107)

(cherry picked from commit 69fa61b08253a991e5553f35bd9fdaf8dc9aec43)

4 months agoAllow ECDSA signing with digests without a NID in default provider
Tomas Mraz [Thu, 20 Mar 2025 19:47:54 +0000 (20:47 +0100)] 
Allow ECDSA signing with digests without a NID in default provider

Also fix ineffective check in DSA signing.

Fixes #27084

Reviewed-by: Paul Dale <ppzgs1@gmail.com>
Reviewed-by: Dmitry Belyavskiy <beldmit@gmail.com>
Reviewed-by: Nicola Tuveri <nic.tuv@gmail.com>
(Merged from https://github.com/openssl/openssl/pull/27107)

(cherry picked from commit 6708df48d6e31a598df2fa24bbc907a762d9a371)

4 months agoFix NULL pointer dereference in `asn1_ex_i2c()`, crypto/asn1/tasn_enc.c
Andrey Tsygunka [Wed, 19 Mar 2025 11:53:02 +0000 (14:53 +0300)] 
Fix NULL pointer dereference in `asn1_ex_i2c()`, crypto/asn1/tasn_enc.c

Adds handling of V_ASN1_UNDEF to avoid NULL dereference
in case ASN1 structure contains an element of type ASN1_TYPE
without initializing its value (i.e. default constructed)

CLA: trivial

Signed-off-by: Andrey Tsygunka <aitsygunka@yandex.ru>
Reviewed-by: Bernd Edlinger <bernd.edlinger@hotmail.de>
Reviewed-by: Paul Dale <ppzgs1@gmail.com>
Reviewed-by: Tomas Mraz <tomas@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/27100)

(cherry picked from commit 8e08f9c5a013d9a9fb9e2db3c90a70eda50f78b5)

4 months agoPrepare for 3.5 beta 2 27154/head
openssl-machine [Tue, 25 Mar 2025 15:01:31 +0000 (15:01 +0000)] 
Prepare for 3.5 beta 2

Reviewed-by: Neil Horman <nhorman@openssl.org>
Reviewed-by: Tomas Mraz <tomas@openssl.org>
Release: yes

4 months agoPrepare for release of 3.5 beta 1 openssl-3.5.0-beta1
openssl-machine [Tue, 25 Mar 2025 15:01:22 +0000 (15:01 +0000)] 
Prepare for release of 3.5 beta 1

Reviewed-by: Neil Horman <nhorman@openssl.org>
Reviewed-by: Tomas Mraz <tomas@openssl.org>
Release: yes

4 months agomake update
openssl-machine [Tue, 25 Mar 2025 15:01:21 +0000 (15:01 +0000)] 
make update

Reviewed-by: Neil Horman <nhorman@openssl.org>
Reviewed-by: Tomas Mraz <tomas@openssl.org>
Release: yes

4 months agoCopyright year updates
openssl-machine [Tue, 25 Mar 2025 14:59:38 +0000 (14:59 +0000)] 
Copyright year updates

Reviewed-by: Neil Horman <nhorman@openssl.org>
Reviewed-by: Tomas Mraz <tomas@openssl.org>
Release: yes

4 months agoUpdate NEWS.md and CHANGES.md for the 3.5 release
Tomas Mraz [Tue, 25 Mar 2025 14:19:05 +0000 (15:19 +0100)] 
Update NEWS.md and CHANGES.md for the 3.5 release

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

4 months ago80-test_cms.t: Fix Provider compatibility CI failures
Tomas Mraz [Tue, 25 Mar 2025 09:17:36 +0000 (10:17 +0100)] 
80-test_cms.t: Fix Provider compatibility CI failures

Old FIPS providers do not support PQC algorithms.

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

(cherry picked from commit e5bd7f91106481690c8be2d6de9c8a86c81b5f91)

4 months agoTry to fix endless loops in quic_multistream_test
Bernd Edlinger [Sun, 23 Mar 2025 14:20:34 +0000 (15:20 +0100)] 
Try to fix endless loops in quic_multistream_test

The problem seem to be caused by syntax errors due to injected
OSSL_QUIC_FRAME_TYPE_PATH_CHALLENGE packets which are too short
by 8 bytes.

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

(cherry picked from commit ad684e1a6a925c7fbadad7d309f0204f49e67105)

4 months agoUpload artifacts despite possible test failures
Bernd Edlinger [Fri, 21 Mar 2025 16:34:24 +0000 (17:34 +0100)] 
Upload artifacts despite possible test failures

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

(cherry picked from commit 289dcbe008018b3cf81053cba2b36825a1f49b74)

4 months agoDo not wrap the python3 in ../../util/wrap.pl
Bernd Edlinger [Thu, 20 Mar 2025 18:45:17 +0000 (19:45 +0100)] 
Do not wrap the python3 in ../../util/wrap.pl

That is bad, because this script does seem to have issues,
because it is itself linked against libcrypto, which causes
crashes in enable-asan builds:

ASan runtime does not come first in initial library list;
you should either link runtime to your application or manually
preload it with LD_PRELOAD.
../../util/wrap.pl python3 ../../test/recipes/70-test_quic_multistream_data/verify-qlog.py => 1
    not ok 1 - running qlog verification script
not ok 2 - check qlog output

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

(cherry picked from commit f346932a15b5ce0cf7e42628e0b02a1871de93e1)

4 months agoTry to fix reported qlog issues
Bernd Edlinger [Thu, 20 Mar 2025 16:14:51 +0000 (17:14 +0100)] 
Try to fix reported qlog issues

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

(cherry picked from commit 9f85a036e331d2837db604fc505062f7790a8b2b)

4 months agoqlog_event_helpers.c: Fix inverted condition
Tomas Mraz [Mon, 24 Mar 2025 09:53:02 +0000 (10:53 +0100)] 
qlog_event_helpers.c: Fix inverted condition

We want to skip up to PACKET_remaining() and not "at least"
PACKET_remaining() bytes.

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

(cherry picked from commit 83b11af01738196b0ebde28a2f91df351c1c72fc)

4 months agoML_DSA - Fix bug in OSSL_PKEY_PARAM_SECURITY_BITS getter.
slontis [Fri, 21 Mar 2025 04:46:52 +0000 (15:46 +1100)] 
ML_DSA - Fix bug in OSSL_PKEY_PARAM_SECURITY_BITS getter.

Reported by @romen

It was off by a factor of 8.

Reviewed-by: Tim Hudson <tjh@openssl.org>
Reviewed-by: Viktor Dukhovni <viktor@openssl.org>
Reviewed-by: Paul Dale <ppzgs1@gmail.com>
Reviewed-by: Matt Caswell <matt@openssl.org>
Reviewed-by: Tomas Mraz <tomas@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/27110)

(cherry picked from commit 3c1f50ad6f3d9dbbce095e83a59e6cd64cabe65e)

4 months agoMove the Handshake read secret change earlier in the process for QUIC 0-RTT
Matt Caswell [Wed, 19 Mar 2025 15:18:06 +0000 (15:18 +0000)] 
Move the Handshake read secret change earlier in the process for QUIC 0-RTT

On the server side we were changing the handshake rx secret a little late.
This meant the application was forced to call SSL_do_handshake() again
even if there was nothing to read in order to get the secret. We move it
a little earlier int the process to avoid this.

Fixes the issue described in:
https://github.com/ngtcp2/ngtcp2/pull/1582#issuecomment-2735950083

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

(cherry picked from commit 95051052b319d346a8aa3d34d6105d683bb77294)

4 months agoFix use of SHAKE as a digest in CMS
Daniel Van Geest [Tue, 18 Mar 2025 12:56:53 +0000 (12:56 +0000)] 
Fix use of SHAKE as a digest in CMS

draft-ietf-lamps-cms-sphincs-plus-19 specifies SHAKE as
the message digest algorithm for SLH-DSA-SHAKE-* in CMS.
SHAKE doesn't have a default digest length, so this adds
a SHAKE-specific kludge in CMS.

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

(cherry picked from commit c1d27789e99543d366a8e0498cbab2d9543ef2cb)

4 months agoAvoid erroneous legacy code path when provided
Viktor Dukhovni [Mon, 17 Mar 2025 03:08:52 +0000 (14:08 +1100)] 
Avoid erroneous legacy code path when provided

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

(cherry picked from commit 27b88364e41f01cc1be6ff2941dd07919f286c89)

4 months agoapps/cms.c, apps/ocsp.c: Added NULL pointer checks
Ankit Kekre [Thu, 13 Mar 2025 15:59:54 +0000 (21:29 +0530)] 
apps/cms.c, apps/ocsp.c: Added NULL pointer checks

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

(cherry picked from commit 952d9b83b20359e9ed0fff8f18a84add29949f6f)

4 months agoFix the use of CCM ciphersuites with QUIC TLS API
Matt Caswell [Tue, 18 Mar 2025 14:36:28 +0000 (14:36 +0000)] 
Fix the use of CCM ciphersuites with QUIC TLS API

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

(cherry picked from commit 207cd5bb975f1cda542757b9695ac4e5bdb71576)

4 months agoAdd a test for using CCM ciphersuites with QUIC TLS API
Matt Caswell [Tue, 18 Mar 2025 14:36:14 +0000 (14:36 +0000)] 
Add a test for using CCM ciphersuites with QUIC TLS API

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

(cherry picked from commit 366b2643cb6f63c9e73b95c22b979c77e93625ec)

4 months agoAlways use NULL BIOs when using the QUIC TLS API
Matt Caswell [Tue, 18 Mar 2025 12:51:29 +0000 (12:51 +0000)] 
Always use NULL BIOs when using the QUIC TLS API

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

(cherry picked from commit 228a26fde43e63a46b0f4c16031d08c6a9dd04c7)

4 months agoTest that using the QUIC TLS API does not require BIOs to be set
Matt Caswell [Tue, 18 Mar 2025 12:49:48 +0000 (12:49 +0000)] 
Test that using the QUIC TLS API does not require BIOs to be set

When using the QUIC TLS API it does not make sense to require BIOs to be
set.

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

(cherry picked from commit 445c0942cd19d78a96ea5c351c25c2613ab76c56)

4 months agoEnsure SSL_get_app_data() continues to work even in SSL_free()
Matt Caswell [Tue, 18 Mar 2025 12:10:59 +0000 (12:10 +0000)] 
Ensure SSL_get_app_data() continues to work even in SSL_free()

During SSL_free() we may get a QUIC TLS callback being called to clean up
any remaining record data. We should ensure that SSL_get_app_data()
continues to work, even in this scenario.

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

(cherry picked from commit 2100cf2ee0d377976d28c9e04eefae4e1b5373ea)

4 months agoDon't decrement the unreleased counter if we failed to release a record
Matt Caswell [Tue, 18 Mar 2025 12:05:08 +0000 (12:05 +0000)] 
Don't decrement the unreleased counter if we failed to release a record

In a failure situation we may incorrectly decrement the amount of data
released. Only decrement the counter if we successfully released.

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

(cherry picked from commit 4ad45969b028dbf2521fa42ea463978402b3584b)

4 months agoCheck SSL_get_app_data() from QUIC cb in a failure situation
Matt Caswell [Tue, 18 Mar 2025 12:04:15 +0000 (12:04 +0000)] 
Check SSL_get_app_data() from QUIC cb in a failure situation

Ensure SSL_get_app_data() works even in a failure situation from SSL_free()

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

(cherry picked from commit f2488a567ba3376c7d2e2cb4567a20111c6df23b)

4 months agoAdd a test for calling SSL_get_app_data() from QUIC TLS callbacks
Matt Caswell [Tue, 18 Mar 2025 11:36:01 +0000 (11:36 +0000)] 
Add a test for calling SSL_get_app_data() from QUIC TLS callbacks

Check that we get the expected app data when using the QUIC TLS callbacks.

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

(cherry picked from commit 2ebae654d5baf1c3781d1228ce0fd9d28e02d08b)

4 months agoRemove workaround for an old ppc64le compiler bug
Bernd Edlinger [Tue, 11 Mar 2025 17:58:25 +0000 (18:58 +0100)] 
Remove workaround for an old ppc64le compiler bug

Lowering the optimization level is no longer needed,
since the old compiler bug from ubuntu-20.04 has been
fixed meanwhile.

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

(cherry picked from commit c658a60aae5b3ac5a22cc11ad59d687bafcc6fbf)

4 months agocorrectly mark the release as prerelease
Dmitry Misharov [Tue, 18 Mar 2025 16:11:40 +0000 (17:11 +0100)] 
correctly mark the release as prerelease

release must be marked as prerelease if "alpha" or "beta" is in tag name

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

(cherry picked from commit 1bf328edf93a25e7b7bf8d2b5b75aa5e03793dc1)

4 months agoTolerate PKCS#8 V2 with optional public keys
Viktor Dukhovni [Mon, 17 Mar 2025 04:24:33 +0000 (15:24 +1100)] 
Tolerate PKCS#8 V2 with optional public keys

- Presently any included public key is unused.
- We don't check that v1 PKCS#8 structures omit the public key.

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

(cherry picked from commit 064bb16454ec4d55a1e40cb673232c54e9f28196)

4 months agoUse text compare for PEM and text files
Jon Spillett [Tue, 18 Mar 2025 03:37:15 +0000 (13:37 +1000)] 
Use text compare for PEM and text files

- Fix ml_dsa_codecs test
- Fix ml_kem_codecs test
- Fix pkey test
- Fix dsaparam test
- Fix dhparam test
- Fix pkcs8 test

Reviewed-by: Tim Hudson <tjh@openssl.org>
Reviewed-by: Shane Lontis <shane.lontis@oracle.com>
Reviewed-by: Dmitry Belyavskiy <beldmit@gmail.com>
Reviewed-by: Paul Dale <ppzgs1@gmail.com>
Reviewed-by: Tomas Mraz <tomas@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/27082)

(cherry picked from commit 58d548d84edd332a7ec1b74dd87defc2d8271b45)

4 months agoDoc fix in EVP_PKEY-ML-DSA/KEM.pod files
Ingo Franzki [Mon, 17 Mar 2025 08:57:40 +0000 (09:57 +0100)] 
Doc fix in EVP_PKEY-ML-DSA/KEM.pod files

Fix the references to OSSL_PROVIDER_add_conf_parameter in the 'SEE ALSO'
section.

Signed-off-by: Ingo Franzki <ifranzki@linux.ibm.com>
Reviewed-by: Paul Dale <ppzgs1@gmail.com>
Reviewed-by: Tim Hudson <tjh@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/27077)

(cherry picked from commit 05c05d43bfe69b3dbe1ff0238688fc2beaaeec49)

4 months agoFix gettable_params() for ECX
Martin Oliveira [Wed, 12 Mar 2025 17:09:04 +0000 (11:09 -0600)] 
Fix gettable_params() for ECX

The OSSL_PKEY_PARAM_MANDATORY_DIGEST parameter is only handled by the
ed25519_get_params() and ed448_get_params(). The x25519 and x448
versions of get_params() always ignore that parameter, so it should not
be in the list of gettable params.

Fixes: 1a7328c88256 ("PROV: Ensure that ED25519 & ED448 keys have a mandatory digest")
cla: trivial

Reviewed-by: Viktor Dukhovni <viktor@openssl.org>
Reviewed-by: Paul Dale <ppzgs1@gmail.com>
(Merged from https://github.com/openssl/openssl/pull/27043)

(cherry picked from commit 482d3f9338b3d4c7537a1d112dce9c8e370c8d9f)

4 months agoFix missing OSSL_FUNC_DIGEST_GET_PARAMS in provider-digest.pod
ak4153 [Sat, 8 Mar 2025 19:37:59 +0000 (21:37 +0200)] 
Fix missing OSSL_FUNC_DIGEST_GET_PARAMS in provider-digest.pod

Fixes #26626
CLA: trivial

Reviewed-by: Viktor Dukhovni <viktor@openssl.org>
Reviewed-by: Paul Dale <ppzgs1@gmail.com>
(Merged from https://github.com/openssl/openssl/pull/27009)

(cherry picked from commit 978e23a472a6acdee737ab70d0d74e173affa5ef)

4 months agorequire GNU assembler 2.30 or higher to build aesni-xtx-avx512.pl
sashan [Mon, 17 Mar 2025 09:23:19 +0000 (10:23 +0100)] 
require GNU assembler 2.30 or higher to build aesni-xtx-avx512.pl

The peralsm in aesni-xts-avx512 currently checks for GNU assembler 2.26
or higher. According to reporters it looks like we need 2.30.

This PR just attempts fix version check so people with older
tool chains can  build OpenSSL.

Fixes #27049

Reviewed-by: Neil Horman <nhorman@openssl.org>
Reviewed-by: Kurt Roeckx <kurt@roeckx.be>
Reviewed-by: Tomas Mraz <tomas@openssl.org>
Reviewed-by: Matt Caswell <matt@openssl.org>
Reviewed-by: Shane Lontis <shane.lontis@oracle.com>
Reviewed-by: Paul Dale <ppzgs1@gmail.com>
(Merged from https://github.com/openssl/openssl/pull/27078)

(cherry picked from commit 108079fcbbde3bfd2966312ea6bd1912bc23673b)

4 months agodocs(provider-base): Add HISTORY note for OSSL_CAPABILITY_TLS_SIGALG_MIN_DTLS (and...
Nicola Tuveri [Fri, 14 Mar 2025 12:09:10 +0000 (14:09 +0200)] 
docs(provider-base): Add HISTORY note for OSSL_CAPABILITY_TLS_SIGALG_MIN_DTLS (and MAX)

This commit adds a small note about
definitions for
`OSSL_CAPABILITY_TLS_SIGALG_MIN_DTLS` and
`OSSL_CAPABILITY_TLS_SIGALG_MAX_DTLS`
being first added in OpenSSL 3.5.

PR #26975 added these definitions for OpenSSL 3.5, but the documentation
update omitted a history note for the addition.

Reviewed-by: Paul Dale <ppzgs1@gmail.com>
Reviewed-by: Viktor Dukhovni <viktor@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/27063)

(cherry picked from commit 2d50cb660cdf1802a9c3e4b5fc5366a85e2158b4)

4 months agoDo some more cleanup in the RCU code
Bernd Edlinger [Sun, 9 Mar 2025 10:20:43 +0000 (11:20 +0100)] 
Do some more cleanup in the RCU code

Only a minimum of 2 qp's are necessary: one for the readers,
and at least one that writers can wait on for retirement.
There is no need for one additional qp that is always unused.
Also only one ACQUIRE barrier is necessary in get_hold_current_qp,
so the ATOMIC_LOAD of the reader_idx can be changed to RELAXED.
And finally clarify some comments.

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

(cherry picked from commit a532f2302d9eac7a2ba52b9929b790c20347c9ba)

4 months agoFix a memory order issue with weakly ordered systems
Bernd Edlinger [Mon, 3 Mar 2025 22:46:12 +0000 (23:46 +0100)] 
Fix a memory order issue with weakly ordered systems

this adds a dummy atomic release operation to update_qp, which
should make sure that the new value of reader_idx is visible in
get_hold_current_qp, directly after incrementing the users count.

Fixes: #26875
Reviewed-by: Tomas Mraz <tomas@openssl.org>
Reviewed-by: Paul Dale <ppzgs1@gmail.com>
Reviewed-by: Neil Horman <nhorman@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/26964)

(cherry picked from commit 4a1a7fe5ce088964010779e1f5a90560903ecc76)

4 months agoFix interop ci yaml
Neil Horman [Fri, 14 Mar 2025 20:08:04 +0000 (16:08 -0400)] 
Fix interop ci yaml

Somehow I mistakenly listed clients in the exlude list, when it should
have been servers, resulting in an invalid yml file

Reviewed-by: Viktor Dukhovni <viktor@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/27066)

(cherry picked from commit 5db7b99914c9a13798e9d7783a02e68ae7e411d8)

4 months agoFix Minerva timing side-channel signal for P-384 curve on PPC
Danny Tsen [Tue, 11 Feb 2025 18:48:01 +0000 (13:48 -0500)] 
Fix Minerva timing side-channel signal for P-384 curve on PPC

1. bn_ppc.c: Used bn_mul_mont_int() instead of bn_mul_mont_300_fixed_n6()
   for Montgomery multiplication.
2. ecp_nistp384-ppc64.pl:
   - Re-wrote p384_felem_mul and p384_felem_square for easier maintenance with
     minumum perl wrapper.
   - Implemented p384_felem_reduce, p384_felem_mul_reduce and p384_felem_square_reduce.
   - Implemented p384_felem_diff64, felem_diff_128_64 and felem_diff128 in assembly.
3. ecp_nistp384.c:
   - Added wrapper function for p384_felem_mul_reduce and p384_felem_square_reduce.

Signed-off-by: Danny Tsen <dtsen@us.ibm.com>
Reviewed-by: Dmitry Belyavskiy <beldmit@gmail.com>
Reviewed-by: Tomas Mraz <tomas@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/26709)

(cherry picked from commit 85cabd94958303859b1551364a609d4ff40b67a5)

4 months agoKeep the provided peer EVP_PKEY in the EVP_PKEY_CTX too
Tomas Mraz [Tue, 4 Mar 2025 17:43:18 +0000 (18:43 +0100)] 
Keep the provided peer EVP_PKEY in the EVP_PKEY_CTX too

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

(cherry picked from commit c8654f79f4e40e6ca0e05cc111f515ca11248e29)

4 months agoFix RCU TODOs
Andrew Dinh [Tue, 4 Mar 2025 15:32:56 +0000 (22:32 +0700)] 
Fix RCU TODOs

- Update allocate_new_qp_group to take unsigned int
- Move id_ctr in rcu_lock_st for better stack alignment

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

(cherry picked from commit 7097d2e00ea9f0119a5e42f13a51487fb1e67aa3)

4 months agoWrap use of poll.h to prevent including on NonStop.
Randall S. Becker [Wed, 12 Feb 2025 14:40:59 +0000 (14:40 +0000)] 
Wrap use of poll.h to prevent including on NonStop.

Fixes: #26724
Signed-off-by: Randall S. Becker <randall.becker@nexbridge.ca>
Reviewed-by: Neil Horman <nhorman@openssl.org>
Reviewed-by: Tim Hudson <tjh@openssl.org>
Reviewed-by: Matt Caswell <matt@openssl.org>
Reviewed-by: Tom Cosgrove <tom.cosgrove@arm.com>
(Merged from https://github.com/openssl/openssl/pull/26726)

(cherry picked from commit ff030ad5bd1c6196e640b1338dac23c1ce3a3154)

4 months agoExclude retry test with msquic server from interop
Neil Horman [Sun, 9 Mar 2025 19:19:40 +0000 (15:19 -0400)] 
Exclude retry test with msquic server from interop

With the addition of larger ml-kem keys in our tls handshake, we've
uncovered a interop failure, as described here:
https://github.com/microsoft/msquic/issues/4905

In short, when we send a client hello that spans multiple datagrams, the
servers sends an ACK frame in a datagram prior to sending its server
hello.  msquic however, recomputes a new SCID always when sending its
sserver hello, which is fine nominally, but because in this test the
server sends a retry frame to update the SCID, followed by an ACK using
that SCID (which is an initial packet), msquic violates the RFC in
section 7.2 which states:

Once a client has received a valid Initial packet from the server, it MUST
discard any subsequent packet it receives on that connection with a
different Source Connection ID

Because msquic sent an initial packet with that ACK frame, we are
required to discard subsequent frames on the connection containing a
different SCID.

Until msquic fixes that in their implementation we are going to fail the
retry interop test, so for now, lets exclude the test.

Also, while we're at it, re-add chrome into the client list for our
server tests, as that seems to have been lost during the merge.

Fixes openssl/project#1132

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

(cherry picked from commit 2fb4cfe143daa4644cf10b9f1ed3cdd940c5e1f8)

4 months agoPrepare for 3.5 alpha 2 27039/head
openssl-machine [Wed, 12 Mar 2025 13:37:29 +0000 (13:37 +0000)] 
Prepare for 3.5 alpha 2

Reviewed-by: Neil Horman <nhorman@openssl.org>
Reviewed-by: Matt Caswell <matt@openssl.org>
Release: yes

4 months agoPrepare for release of 3.5 alpha 1 openssl-3.5.0-alpha1
openssl-machine [Wed, 12 Mar 2025 13:37:20 +0000 (13:37 +0000)] 
Prepare for release of 3.5 alpha 1

Reviewed-by: Neil Horman <nhorman@openssl.org>
Reviewed-by: Matt Caswell <matt@openssl.org>
Release: yes

4 months agomake update
openssl-machine [Wed, 12 Mar 2025 13:37:18 +0000 (13:37 +0000)] 
make update

Reviewed-by: Neil Horman <nhorman@openssl.org>
Reviewed-by: Matt Caswell <matt@openssl.org>
Release: yes

4 months agoCopyright year updates
openssl-machine [Wed, 12 Mar 2025 13:35:59 +0000 (13:35 +0000)] 
Copyright year updates

Reviewed-by: Neil Horman <nhorman@openssl.org>
Reviewed-by: Matt Caswell <matt@openssl.org>
Release: yes

4 months agoAdding missed items to NEWS.md prior to release
Neil Horman [Tue, 11 Mar 2025 13:21:45 +0000 (09:21 -0400)] 
Adding missed items to NEWS.md prior to release

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

4 months agoAdd support for md-less signature schemes in CMS
Michael Schroeder [Fri, 21 Feb 2025 11:59:21 +0000 (12:59 +0100)] 
Add support for md-less signature schemes in CMS

Signature schemes like Ed25519 or ML-DSA use "pure" signing,
i.e. they directly sign the tbs data instead of signing a digest.

This is already supported in the X509 code, but not in CMS.
This commit adds support for such schemes to CMS.

This is a minimalistic set of changes, based in the work done
by David von Oheimb.

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

4 months agoMake group names case-insensitive
Viktor Dukhovni [Thu, 6 Mar 2025 14:44:06 +0000 (01:44 +1100)] 
Make group names case-insensitive

Reviewed-by: Tim Hudson <tjh@openssl.org>
Reviewed-by: Paul Dale <ppzgs1@gmail.com>
Reviewed-by: Saša Nedvědický <sashan@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/26991)