python3.12-cryptography/SOURCES/CVE-2025-24898.patch

53 lines
1.5 KiB
Diff

From eda4f38d30c9e8bdfee282d75fc7350d50ba78f3 Mon Sep 17 00:00:00 2001
From: Charalampos Stratakis <cstratak@redhat.com>
Date: Thu, 6 Feb 2025 00:16:30 +0100
Subject: [PATCH 1/2] Use our patched copy of the openssl crate
---
src/rust/Cargo.toml | 3 +++
1 file changed, 3 insertions(+)
diff --git a/src/rust/Cargo.toml b/src/rust/Cargo.toml
index 01fba14..a352548 100644
--- a/src/rust/Cargo.toml
+++ b/src/rust/Cargo.toml
@@ -20,6 +20,9 @@ openssl = "0.10.54"
openssl-sys = "0.9.88"
foreign-types-shared = "0.1"
+[patch.crates-io]
+openssl = { path= "../../vendor/openssl" }
+
[build-dependencies]
cc = "1.0.72"
--
2.48.1
From a99434f68209631e9363ffa4dd32dacbfa376221 Mon Sep 17 00:00:00 2001
From: Steven Fackler <sfackler@gmail.com>
Date: Sun, 2 Feb 2025 12:19:46 -0500
Subject: [PATCH 2/2] Fix lifetimes in ssl::select_next_proto
---
vendor/openssl/src/ssl/mod.rs | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/vendor/openssl/src/ssl/mod.rs b/vendor/openssl/src/ssl/mod.rs
index fb38bb3..6aa6705 100644
--- a/vendor/openssl/src/ssl/mod.rs
+++ b/vendor/openssl/src/ssl/mod.rs
@@ -696,7 +696,7 @@ cfg_if! {
///
/// [`SslContextBuilder::set_alpn_protos`]: struct.SslContextBuilder.html#method.set_alpn_protos
#[corresponds(SSL_select_next_proto)]
-pub fn select_next_proto<'a>(server: &[u8], client: &'a [u8]) -> Option<&'a [u8]> {
+pub fn select_next_proto<'a>(server: &'a [u8], client: &'a [u8]) -> Option<&'a [u8]> {
unsafe {
let mut out = ptr::null_mut();
let mut outlen = 0;
--
2.48.1