diff --git a/cpython-unix/build-openssl-3.5.sh b/cpython-unix/build-openssl-3.5.sh index ea7d5c60..952098c5 100755 --- a/cpython-unix/build-openssl-3.5.sh +++ b/cpython-unix/build-openssl-3.5.sh @@ -13,12 +13,6 @@ tar -xf openssl-${OPENSSL_3_5_VERSION}.tar.gz pushd openssl-${OPENSSL_3_5_VERSION} -# hardcode the vlenb CSR address (0xc22) as our GCC version doesn't know it -# https://github.com/riscv/riscv-isa-manual/blob/c001fa237cdd8b6079384044462a89eb0e3fd9cf/src/v-st-ext.adoc?plain=1#L74 -if [[ "${TARGET_TRIPLE}" = "riscv64-unknown-linux-gnu" ]]; then - patch -p1 -i "${ROOT}/patch-openssl-3.5-riscv-vlenb-register.patch" -fi - # Otherwise it gets set to /tools/deps/ssl by default. case "${TARGET_TRIPLE}" in *apple*) diff --git a/cpython-unix/build.py b/cpython-unix/build.py index 1fbb019b..662d7021 100755 --- a/cpython-unix/build.py +++ b/cpython-unix/build.py @@ -274,13 +274,10 @@ def simple_build( add_target_env(env, host_platform, target_triple, build_env) - # for OpenSSL, set the OPENSSL_TARGET environment variable and copy in patches + # for OpenSSL, set the OPENSSL_TARGET environment variable if entry.startswith("openssl-"): settings = get_targets(TARGETS_CONFIG)[target_triple] env["OPENSSL_TARGET"] = settings["openssl_target"] - build_env.copy_file( - SUPPORT / "patch-openssl-3.5-riscv-vlenb-register.patch" - ) build_env.run("build-%s.sh" % entry, environment=env) diff --git a/cpython-unix/patch-openssl-3.5-riscv-vlenb-register.patch b/cpython-unix/patch-openssl-3.5-riscv-vlenb-register.patch deleted file mode 100644 index dacedeef..00000000 --- a/cpython-unix/patch-openssl-3.5-riscv-vlenb-register.patch +++ /dev/null @@ -1,15 +0,0 @@ -diff --git a/crypto/riscv64cpuid.pl b/crypto/riscv64cpuid.pl -index 5dcdc5c584..7751ad50d9 100644 ---- a/crypto/riscv64cpuid.pl -+++ b/crypto/riscv64cpuid.pl -@@ -94,8 +94,8 @@ $code .= <<___; - .globl riscv_vlen_asm - .type riscv_vlen_asm,\@function - riscv_vlen_asm: -- csrr $ret, vlenb -- slli $ret, $ret, 3 -+ csrr a0, 0xc22 -+ slli a0, a0, 3 - ret - .size riscv_vlen_asm,.-riscv_vlen_asm - ___ diff --git a/pythonbuild/downloads.py b/pythonbuild/downloads.py index c4c12516..d72d7fde 100644 --- a/pythonbuild/downloads.py +++ b/pythonbuild/downloads.py @@ -262,10 +262,10 @@ }, # Remember to update OPENSSL_VERSION_INFO in verify_distribution.py whenever upgrading. "openssl-3.5": { - "url": "https://github.com/openssl/openssl/releases/download/openssl-3.5.2/openssl-3.5.2.tar.gz", - "size": 53180161, - "sha256": "c53a47e5e441c930c3928cf7bf6fb00e5d129b630e0aa873b08258656e7345ec", - "version": "3.5.2", + "url": "https://github.com/openssl/openssl/releases/download/openssl-3.5.3/openssl-3.5.3.tar.gz", + "size": 53183370, + "sha256": "c9489d2abcf943cdc8329a57092331c598a402938054dc3a22218aea8a8ec3bf", + "version": "3.5.3", "library_names": ["crypto", "ssl"], "licenses": ["Apache-2.0"], "license_file": "LICENSE.openssl-3.txt", diff --git a/src/verify_distribution.py b/src/verify_distribution.py index a4704f3f..709394f3 100644 --- a/src/verify_distribution.py +++ b/src/verify_distribution.py @@ -152,7 +152,7 @@ def test_ssl(self): if os.name == "nt" and sys.version_info[0:2] < (3, 11): wanted_version = (1, 1, 1, 23, 15) else: - wanted_version = (3, 5, 0, 2, 0) + wanted_version = (3, 5, 0, 3, 15) self.assertEqual(ssl.OPENSSL_VERSION_INFO, wanted_version)