Skip to contentSkip to conversation

openssl: Upgrade 4.0.3 -> 4.1.0

PATCH In review Jaipaul Cheernam 2 participants 5 messages Oct 26 – Oct 28

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 openssl: Upgrade 4.0.3 -> 4.1.0

Release information [1]:

OpenSSL 4.1.0 is a feature release adding significant new functionality to OpenSSL.

This release incorporates the following potentially significant or incompatible changes:

- Added VC-WIN32-MSVC2013 and VC-WIN64A-MSVC2013 build targets to provide internal functions for bridging the gaps in C99 standard support that are present in MSVC 2013.
- Added optimized ML-DSA and ML-KEM NTT operations on ppc64le; optimized ML-DSA operations on x86_64; AVX-512-optimized SHAKE x4 operations for ML-DSA on x86_64; AVX-512 and VAES optimizations for AES-CBC decryption on x86_64.
- Changed tsget utility to use Net::Curl::Easy (from the Net-Curl CPAN distribution) instead of the abandoned WWW::Curl::Easy. Users who rely on tsget should install Net::Curl::Easy before upgrading.
- Dropped Windows-on-Itanium (VC-WIN64I) and Windows CE (VC-CE) targets from Configurations.
- Dropped no-ecdsa and no-ecdh options from Configure, as these options did not really disable the implementations. Use no-ec to disable the elliptic curve support.

This release adds the following new features:

- Support for DTLS 1.3 (RFC 9147). Refer to the ossl-guide-dtlsv13(7) manual page for details.
- Support for RFC 8701 GREASE (Generate Random Extensions And Sustain Extensibility).
- DTLS support in the SSL listener API.
- Support for IKEV2 KDF.
- Initial support for the Elbrus2000 (e2k) architecture.

[1] https://github.com/openssl/openssl/blob/openssl-4.1/NEWS.md#major-changes-between-openssl-40-and-openssl-410-23-oct-2026

- Refresh existing patches
- Verified with world

---
 .../0001-Configure-do-not-tweak-mips-cflags.patch  |  6 +++---
 ...trip-sysroot-and-debug-prefix-map-from-co.patch | 14 +++++++-------
 .../0001-extend-check_cwm-test-timeout.patch       |  2 +-
 .../openssl/{openssl_4.0.3.bb => openssl_4.1.0.bb} |  2 +-
 4 files changed, 12 insertions(+), 12 deletions(-)
 rename meta/recipes-connectivity/openssl/{openssl_4.0.3.bb => openssl_4.1.0.bb} (99%)
meta/recipes-connectivity/openssl/openssl/0001-Configure-do-not-tweak-mips-cflags.patch +3 -3
index 77bfe4e4e52..2991082a5f5 100644
@@ -1,4 +1,4 @@
-From b5cee0cb0f14a78056ef7722a34b361491f1fdda Mon Sep 17 00:00:00 2001
+From 89d2702e00b0826fded82b06a9866e0fe7380540 Mon Sep 17 00:00:00 2001
 From: Alexander Kanavin <[email protected]>
 Date: Tue, 30 May 2023 09:11:27 -0700
 Subject: [PATCH] Configure: do not tweak mips cflags
@@ -17,10 +17,10 @@ Signed-off-by: Tim Orling <[email protected]>
  1 file changed, 10 deletions(-)
 
 diff --git a/Configure b/Configure
-index c05a30b..db8adee 100755
+index e66424a..62141fe 100755
 --- a/Configure
 +++ b/Configure
-@@ -1575,16 +1575,6 @@ if ($target =~ /^mingw/ && `$config{CC} --target-help 2>&1` =~ m/-mno-cygwin/m)
+@@ -1617,16 +1617,6 @@ if ($target =~ /^mingw/ && `$config{CC} --target-help 2>&1` =~ m/-mno-cygwin/m)
          push @{$config{shared_ldflag}}, "-mno-cygwin";
          }
  
meta/recipes-connectivity/openssl/openssl/0001-buildinfo-strip-sysroot-and-debug-prefix-map-from-co.patch +7 -7
index 1d9e7539f67..04f46a3d3e2 100644
@@ -1,4 +1,4 @@
-From 6df53bfebcf8ca65910a18220a6576fb110918a5 Mon Sep 17 00:00:00 2001
+From 4df92463252f8f0695db0143d3a26566a1736b2c Mon Sep 17 00:00:00 2001
 From: =?UTF-8?q?Martin=20Hundeb=C3=B8ll?= <[email protected]>
 Date: Tue, 6 Nov 2018 14:50:47 +0100
 Subject: [PATCH] buildinfo: strip sysroot and debug-prefix-map from compiler
@@ -34,12 +34,12 @@ Signed-off-by: Khem Raj <[email protected]>
  2 files changed, 16 insertions(+), 2 deletions(-)
 
 diff --git a/Configurations/unix-Makefile.tmpl b/Configurations/unix-Makefile.tmpl
-index eff66e5..bc48f51 100644
+index f8a5b16..807439f 100644
 --- a/Configurations/unix-Makefile.tmpl
 +++ b/Configurations/unix-Makefile.tmpl
-@@ -503,13 +503,27 @@ BIN_LDFLAGS={- join(' ', $target{bin_lflags} || (),
-                          '$(CNF_LDFLAGS)', '$(LDFLAGS)') -}
- BIN_EX_LIBS=$(CNF_EX_LIBS) $(EX_LIBS)
+@@ -532,13 +532,27 @@ BIN_EX_LIBS=$(CNF_EX_LIBS) $(EX_LIBS)
+ CMOCKA_LIBS={- $config{cmocka_libs} // '' -}
+ DETOURS_LIBS={- $config{detours_libs} // '' -}
  
 -# CPPFLAGS_Q is used for one thing only: to build up buildinf.h
 +# *_Q variables are used for one thing only: to build up buildinf.h
@@ -67,10 +67,10 @@ index eff66e5..bc48f51 100644
  
  # For x86 assembler: Set PROCESSOR to 386 if you want to support
 diff --git a/crypto/build.info b/crypto/build.info
-index 8e4a885..95b0902 100644
+index 422f4aa..3573af9 100644
 --- a/crypto/build.info
 +++ b/crypto/build.info
-@@ -114,7 +114,7 @@ DEFINE[../libcrypto]=$UPLINKDEF
+@@ -113,7 +113,7 @@ DEFINE[../libcrypto]=$UPLINKDEF
  
  DEPEND[info.o]=buildinf.h
  DEPEND[cversion.o]=buildinf.h
meta/recipes-connectivity/openssl/openssl/0001-extend-check_cwm-test-timeout.patch +1 -1
index 26622fd1b18..29b9728479f 100644
@@ -1,4 +1,4 @@
-From 07bbd037ca61264bcc311856a119b664ce13f586 Mon Sep 17 00:00:00 2001
+From ff0de34474c0dfec4f13dfb4079689c8731bf6ce Mon Sep 17 00:00:00 2001
 From: Gyorgy Sarvari <[email protected]>
 Date: Thu, 23 Oct 2025 11:24:36 +0200
 Subject: [PATCH] extend check_cwm test timeout
meta/recipes-connectivity/openssl/openssl_4.1.0.bb renamed from meta/recipes-connectivity/openssl/openssl_4.0.3.bb +1 -1
similarity index 99%
rename from meta/recipes-connectivity/openssl/openssl_4.0.3.bb
rename to meta/recipes-connectivity/openssl/openssl_4.1.0.bb
index 122bf61f595..1e47c3cf348 100644
@@ -18,7 +18,7 @@ SRC_URI:append:class-nativesdk = " \
            file://environment.d-openssl.sh \
            "
 
-SRC_URI[sha256sum] = "325b5c806167c13b40b1ffeadfe0248197c00eccc4cf123ec1e28d2d2fd216d9"
+SRC_URI[sha256sum] = "50c17baf54cb008f6ce42d50deb4b28050a1aad711636cabd4b241c7e90cc2fd"
 
 inherit lib_package multilib_header ptest perlnative manpages
 
#1 lore raw
Quoted 21 lines · Jaipaul Cheernam

Release information [1]:

OpenSSL 4.1.0 is a feature release adding significant new functionality to OpenSSL.

This release incorporates the following potentially significant or incompatible changes:

- Added VC-WIN32-MSVC2013 and VC-WIN64A-MSVC2013 build targets to provide internal functions for bridging the gaps in C99 standard support that are present in MSVC 2013.
- Added optimized ML-DSA and ML-KEM NTT operations on ppc64le; optimized ML-DSA operations on x86_64; AVX-512-optimized SHAKE x4 operations for ML-DSA on x86_64; AVX-512 and VAES optimizations for AES-CBC decryption on x86_64.
- Changed tsget utility to use Net::Curl::Easy (from the Net-Curl CPAN distribution) instead of the abandoned WWW::Curl::Easy. Users who rely on tsget should install Net::Curl::Easy before upgrading.
- Dropped Windows-on-Itanium (VC-WIN64I) and Windows CE (VC-CE) targets from Configurations.
- Dropped no-ecdsa and no-ecdh options from Configure, as these options did not really disable the implementations. Use no-ec to disable the elliptic curve support.

This release adds the following new features:

- Support for DTLS 1.3 (RFC 9147). Refer to the ossl-guide-dtlsv13(7) manual page for details.
- Support for RFC 8701 GREASE (Generate Random Extensions And Sustain Extensibility).
- DTLS support in the SSL listener API.
- Support for IKEV2 KDF.
- Initial support for the Elbrus2000 (e2k) architecture.

Quoted 7 lines

[1] https://github.com/openssl/openssl/blob/openssl-4.1/NEWS.md#major-changes-between-openssl-40-and-openssl-410-23-oct-2026

- Refresh existing patches
- Verified with world

---

Hi Jaipaul,

Thanks for the upgrade. This is breaking python3 crypto:

Failed ptests:
{'python3-cryptography': ['tests/hazmat/primitives/utils.py:TestAESModeGCM.test_gcm',

                          'tests/hazmat/primitives/test_sm4.py:TestSM4ModeGCM.test_invalid_tag[vector0]',
                          'tests/hazmat/primitives/test_ssh.py:TestOpenSSHSerialization.test_load_ssh_private_key_invalid_tag']}

Failed ptests:
{'python3-pyopenssl': ['tests/test_ssl.py:TestMemoryBIO.test_memory_connect']}

https://autobuilder.yoctoproject.org/valkyrie/#/builders/73/builds/4822

Can you have a look at the issue?

Thanks,
Mathieu

Signature · 3 lines
Mathieu Dubois-Briand, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com
#2 lore raw

PATCH v2 1/2 python3-cryptography: backport InvalidTag fix for openssl 4.1.0

In reply to Jaipaul Cheernam

openssl 4.1.0 changed the AEAD error queue, so bad-tag ptests now raise ValueError instead of InvalidTag. Backport pyca/cryptography#15596.

Backport of https://github.com/pyca/cryptography/pull/15596

---
 .../python/python3-cryptography.bb            |  1 +
 ...-on-AEAD-finalize-failure-regardless.patch | 53 +++++++++++++++++++
 2 files changed, 54 insertions(+)
 create mode 100644 meta/recipes-devtools/python/python3-cryptography/0001-Raise-InvalidTag-on-AEAD-finalize-failure-regardless.patch
meta/recipes-devtools/python/python3-cryptography.bb +1 -0
index 5a1ce9fe2d..311b7313f0 100644
@@ -16,6 +16,7 @@ SRC_URI[sha256sum] = "7b46165bb56eb4704e2eaaf86f3c940d19154535d9b0ca7d6d590b0406
 SRC_URI += "file://0001-pyproject.toml-remove-benchmark-disable-option.patch \
             file://check-memfree.py \
             file://run-ptest \
+            file://0001-Raise-InvalidTag-on-AEAD-finalize-failure-regardless.patch \
            "
 
 require ${BPN}-crates.inc
meta/recipes-devtools/python/python3-cryptography/0001-Raise-InvalidTag-on-AEAD-finalize-failure-regardless.patch new file +53 -0

53 lines not on this page · raw message

#3 lore raw

PATCH v2 2/2 openssl: Upgrade 4.0.3 -> 4.1.0

Release information [1]:

OpenSSL 4.1.0 is a feature release adding significant new functionality to OpenSSL.

This release incorporates the following potentially significant or incompatible changes:

- Added VC-WIN32-MSVC2013 and VC-WIN64A-MSVC2013 build targets to provide internal functions for bridging the gaps in C99 standard support that are present in MSVC 2013.
- Added optimized ML-DSA and ML-KEM NTT operations on ppc64le; optimized ML-DSA operations on x86_64; AVX-512-optimized SHAKE x4 operations for ML-DSA on x86_64; AVX-512 and VAES optimizations for AES-CBC decryption on x86_64.
- Changed tsget utility to use Net::Curl::Easy (from the Net-Curl CPAN distribution) instead of the abandoned WWW::Curl::Easy. Users who rely on tsget should install Net::Curl::Easy before upgrading.
- Dropped Windows-on-Itanium (VC-WIN64I) and Windows CE (VC-CE) targets from Configurations.
- Dropped no-ecdsa and no-ecdh options from Configure, as these options did not really disable the implementations. Use no-ec to disable the elliptic curve support.

This release adds the following new features:

- Support for DTLS 1.3 (RFC 9147). Refer to the ossl-guide-dtlsv13(7) manual page for details.
- Support for RFC 8701 GREASE (Generate Random Extensions And Sustain Extensibility).
- DTLS support in the SSL listener API.
- Support for IKEV2 KDF.
- Initial support for the Elbrus2000 (e2k) architecture.

[1] https://github.com/openssl/openssl/blob/openssl-4.1/NEWS.md#major-changes-between-openssl-40-and-openssl-410-23-oct-2026

- Refresh existing patches
- Verified with world
- Verified ptest python3-cryptography
TOTAL: 4650
PASS: 4443
FAIL: 0
ERROR: 0
TOTAL: 1 FAIL: 0

---
 .../0001-Configure-do-not-tweak-mips-cflags.patch  |  6 +++---
 ...trip-sysroot-and-debug-prefix-map-from-co.patch | 14 +++++++-------
 .../0001-extend-check_cwm-test-timeout.patch       |  2 +-
 .../openssl/{openssl_4.0.3.bb => openssl_4.1.0.bb} |  2 +-
 4 files changed, 12 insertions(+), 12 deletions(-)
 rename meta/recipes-connectivity/openssl/{openssl_4.0.3.bb => openssl_4.1.0.bb} (99%)
meta/recipes-connectivity/openssl/openssl/0001-Configure-do-not-tweak-mips-cflags.patch +3 -3
index 77bfe4e4e5..2991082a5f 100644
@@ -1,4 +1,4 @@
-From b5cee0cb0f14a78056ef7722a34b361491f1fdda Mon Sep 17 00:00:00 2001
+From 89d2702e00b0826fded82b06a9866e0fe7380540 Mon Sep 17 00:00:00 2001
 From: Alexander Kanavin <[email protected]>
 Date: Tue, 30 May 2023 09:11:27 -0700
 Subject: [PATCH] Configure: do not tweak mips cflags
@@ -17,10 +17,10 @@ Signed-off-by: Tim Orling <[email protected]>
  1 file changed, 10 deletions(-)
 
 diff --git a/Configure b/Configure
-index c05a30b..db8adee 100755
+index e66424a..62141fe 100755
 --- a/Configure
 +++ b/Configure
-@@ -1575,16 +1575,6 @@ if ($target =~ /^mingw/ && `$config{CC} --target-help 2>&1` =~ m/-mno-cygwin/m)
+@@ -1617,16 +1617,6 @@ if ($target =~ /^mingw/ && `$config{CC} --target-help 2>&1` =~ m/-mno-cygwin/m)
          push @{$config{shared_ldflag}}, "-mno-cygwin";
          }
  
meta/recipes-connectivity/openssl/openssl/0001-buildinfo-strip-sysroot-and-debug-prefix-map-from-co.patch +7 -7
index 1d9e7539f6..04f46a3d3e 100644
@@ -1,4 +1,4 @@
-From 6df53bfebcf8ca65910a18220a6576fb110918a5 Mon Sep 17 00:00:00 2001
+From 4df92463252f8f0695db0143d3a26566a1736b2c Mon Sep 17 00:00:00 2001
 From: =?UTF-8?q?Martin=20Hundeb=C3=B8ll?= <[email protected]>
 Date: Tue, 6 Nov 2018 14:50:47 +0100
 Subject: [PATCH] buildinfo: strip sysroot and debug-prefix-map from compiler
@@ -34,12 +34,12 @@ Signed-off-by: Khem Raj <[email protected]>
  2 files changed, 16 insertions(+), 2 deletions(-)
 
 diff --git a/Configurations/unix-Makefile.tmpl b/Configurations/unix-Makefile.tmpl
-index eff66e5..bc48f51 100644
+index f8a5b16..807439f 100644
 --- a/Configurations/unix-Makefile.tmpl
 +++ b/Configurations/unix-Makefile.tmpl
-@@ -503,13 +503,27 @@ BIN_LDFLAGS={- join(' ', $target{bin_lflags} || (),
-                          '$(CNF_LDFLAGS)', '$(LDFLAGS)') -}
- BIN_EX_LIBS=$(CNF_EX_LIBS) $(EX_LIBS)
+@@ -532,13 +532,27 @@ BIN_EX_LIBS=$(CNF_EX_LIBS) $(EX_LIBS)
+ CMOCKA_LIBS={- $config{cmocka_libs} // '' -}
+ DETOURS_LIBS={- $config{detours_libs} // '' -}
  
 -# CPPFLAGS_Q is used for one thing only: to build up buildinf.h
 +# *_Q variables are used for one thing only: to build up buildinf.h
@@ -67,10 +67,10 @@ index eff66e5..bc48f51 100644
  
  # For x86 assembler: Set PROCESSOR to 386 if you want to support
 diff --git a/crypto/build.info b/crypto/build.info
-index 8e4a885..95b0902 100644
+index 422f4aa..3573af9 100644
 --- a/crypto/build.info
 +++ b/crypto/build.info
-@@ -114,7 +114,7 @@ DEFINE[../libcrypto]=$UPLINKDEF
+@@ -113,7 +113,7 @@ DEFINE[../libcrypto]=$UPLINKDEF
  
  DEPEND[info.o]=buildinf.h
  DEPEND[cversion.o]=buildinf.h
meta/recipes-connectivity/openssl/openssl/0001-extend-check_cwm-test-timeout.patch +1 -1
index 26622fd1b1..29b9728479 100644
@@ -1,4 +1,4 @@
-From 07bbd037ca61264bcc311856a119b664ce13f586 Mon Sep 17 00:00:00 2001
+From ff0de34474c0dfec4f13dfb4079689c8731bf6ce Mon Sep 17 00:00:00 2001
 From: Gyorgy Sarvari <[email protected]>
 Date: Thu, 23 Oct 2025 11:24:36 +0200
 Subject: [PATCH] extend check_cwm test timeout
meta/recipes-connectivity/openssl/openssl_4.1.0.bb renamed from meta/recipes-connectivity/openssl/openssl_4.0.3.bb +1 -1
similarity index 99%
rename from meta/recipes-connectivity/openssl/openssl_4.0.3.bb
rename to meta/recipes-connectivity/openssl/openssl_4.1.0.bb
index 122bf61f59..1e47c3cf34 100644
@@ -18,7 +18,7 @@ SRC_URI:append:class-nativesdk = " \
            file://environment.d-openssl.sh \
            "
 
-SRC_URI[sha256sum] = "325b5c806167c13b40b1ffeadfe0248197c00eccc4cf123ec1e28d2d2fd216d9"
+SRC_URI[sha256sum] = "50c17baf54cb008f6ce42d50deb4b28050a1aad711636cabd4b241c7e90cc2fd"
 
 inherit lib_package multilib_header ptest perlnative manpages
 
#4 lore raw
Quoted 32 lines · Jaipaul Cheernam

Release information [1]:

OpenSSL 4.1.0 is a feature release adding significant new functionality to OpenSSL.

This release incorporates the following potentially significant or incompatible changes:

- Added VC-WIN32-MSVC2013 and VC-WIN64A-MSVC2013 build targets to provide internal functions for bridging the gaps in C99 standard support that are present in MSVC 2013.
- Added optimized ML-DSA and ML-KEM NTT operations on ppc64le; optimized ML-DSA operations on x86_64; AVX-512-optimized SHAKE x4 operations for ML-DSA on x86_64; AVX-512 and VAES optimizations for AES-CBC decryption on x86_64.
- Changed tsget utility to use Net::Curl::Easy (from the Net-Curl CPAN distribution) instead of the abandoned WWW::Curl::Easy. Users who rely on tsget should install Net::Curl::Easy before upgrading.
- Dropped Windows-on-Itanium (VC-WIN64I) and Windows CE (VC-CE) targets from Configurations.
- Dropped no-ecdsa and no-ecdh options from Configure, as these options did not really disable the implementations. Use no-ec to disable the elliptic curve support.

This release adds the following new features:

- Support for DTLS 1.3 (RFC 9147). Refer to the ossl-guide-dtlsv13(7) manual page for details.
- Support for RFC 8701 GREASE (Generate Random Extensions And Sustain Extensibility).
- DTLS support in the SSL listener API.
- Support for IKEV2 KDF.
- Initial support for the Elbrus2000 (e2k) architecture.

[1] https://github.com/openssl/openssl/blob/openssl-4.1/NEWS.md#major-changes-between-openssl-40-and-openssl-410-23-oct-2026

- Refresh existing patches
- Verified with world
- Verified ptest python3-cryptography
TOTAL: 4650
PASS: 4443
FAIL: 0
ERROR: 0
TOTAL: 1 FAIL: 0

Quoted 2 lines

---

Hi Jaipaul,

This looks better, but we still have one failure:

Failed ptests:
{'python3-pyopenssl': ['tests/test_ssl.py:TestMemoryBIO.test_memory_connect']}

https://autobuilder.yoctoproject.org/valkyrie/#/builders/73/builds/4828

Thanks,
Mathieu

Signature · 3 lines
Mathieu Dubois-Briand, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com