From 42cc59a90c35ffd12d4c793cf155ea4e885c5de1 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Wed, 7 Jan 2026 10:13:13 +0900 Subject: [PATCH] Bump openssl-probe from 0.1.6 to 0.2.0 (#6663) * Bump openssl-probe from 0.1.6 to 0.2.0 Bumps [openssl-probe](https://github.com/alexcrichton/openssl-probe) from 0.1.6 to 0.2.0. - [Release notes](https://github.com/alexcrichton/openssl-probe/releases) - [Commits](https://github.com/alexcrichton/openssl-probe/compare/0.1.6...0.2.0) --- updated-dependencies: - dependency-name: openssl-probe dependency-version: 0.2.0 dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] * Fix openssl-probe 0.2.0 API compatibility (#6669) * Bump openssl-probe from 0.1.6 to 0.2.0 Bumps [openssl-probe](https://github.com/alexcrichton/openssl-probe) from 0.1.6 to 0.2.0. - [Release notes](https://github.com/alexcrichton/openssl-probe/releases) - [Commits](https://github.com/alexcrichton/openssl-probe/compare/0.1.6...0.2.0) --- updated-dependencies: - dependency-name: openssl-probe dependency-version: 0.2.0 dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] * Initial plan * Fix openssl-probe 0.2.0 API compatibility --------- Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: Copilot <198982749+Copilot@users.noreply.github.com> Co-authored-by: youknowone <69878+youknowone@users.noreply.github.com> --- Cargo.lock | 10 ++-------- crates/stdlib/Cargo.toml | 2 +- crates/stdlib/src/openssl.rs | 7 ++++--- 3 files changed, 7 insertions(+), 12 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index d8b09bf94..3b676e2a7 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -2134,12 +2134,6 @@ dependencies = [ "syn", ] -[[package]] -name = "openssl-probe" -version = "0.1.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d05e27ee213611ffe7d6348b942e8f942b37114c00cc03cec254295a4a17852e" - [[package]] name = "openssl-probe" version = "0.2.0" @@ -2890,7 +2884,7 @@ version = "0.8.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "612460d5f7bea540c490b2b6395d8e34a953e52b491accd6c86c8164c5932a63" dependencies = [ - "openssl-probe 0.2.0", + "openssl-probe", "rustls-pki-types", "schannel", "security-framework", @@ -3184,7 +3178,7 @@ dependencies = [ "num_enum", "oid-registry", "openssl", - "openssl-probe 0.1.6", + "openssl-probe", "openssl-sys", "page_size", "parking_lot", diff --git a/crates/stdlib/Cargo.toml b/crates/stdlib/Cargo.toml index d39f0ab43..4af890b8e 100644 --- a/crates/stdlib/Cargo.toml +++ b/crates/stdlib/Cargo.toml @@ -115,7 +115,7 @@ dns-lookup = "3.0" # OpenSSL dependencies (optional, for ssl-openssl feature) openssl = { version = "0.10.72", optional = true } openssl-sys = { version = "0.9.110", optional = true } -openssl-probe = { version = "0.1.5", optional = true } +openssl-probe = { version = "0.2.0", optional = true } foreign-types-shared = { version = "0.1.1", optional = true } # Rustls dependencies (optional, for ssl-rustls feature) diff --git a/crates/stdlib/src/openssl.rs b/crates/stdlib/src/openssl.rs index 38103a9ab..df153459f 100644 --- a/crates/stdlib/src/openssl.rs +++ b/crates/stdlib/src/openssl.rs @@ -25,6 +25,7 @@ cfg_if::cfg_if! { use crate::vm::{PyRef, VirtualMachine, builtins::PyModule}; use openssl_probe::ProbeResult; +use std::sync::LazyLock; pub(crate) fn make_module(vm: &VirtualMachine) -> PyRef { // if openssl is vendored, it doesn't know the locations @@ -38,12 +39,12 @@ pub(crate) fn make_module(vm: &VirtualMachine) -> PyRef { // easily, without having to have a bunch of cfgs cfg_if::cfg_if! { if #[cfg(openssl_vendored)] { - use std::sync::LazyLock; static PROBE: LazyLock = LazyLock::new(openssl_probe::probe); fn probe() -> &'static ProbeResult { &PROBE } } else { + static EMPTY_PROBE: LazyLock = LazyLock::new(|| ProbeResult { cert_file: None, cert_dir: vec![] }); fn probe() -> &'static ProbeResult { - &ProbeResult { cert_file: None, cert_dir: None } + &EMPTY_PROBE } } } @@ -446,7 +447,7 @@ mod _ssl { }); let cert_dir = probe .cert_dir - .as_ref() + .first() .map(PathBuf::from) .unwrap_or_else(|| { path_from_cstr(unsafe { CStr::from_ptr(sys::X509_get_default_cert_dir()) })