Skip to content

Commit 42cc59a

Browse files
dependabot[bot]Copilotyouknowone
authored
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](rustls/openssl-probe@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] <support@github.com> * 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](rustls/openssl-probe@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] <support@github.com> * Initial plan * Fix openssl-probe 0.2.0 API compatibility --------- Signed-off-by: dependabot[bot] <support@github.com> 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>
1 parent 6408228 commit 42cc59a

File tree

3 files changed

+7
-12
lines changed

3 files changed

+7
-12
lines changed

Cargo.lock

Lines changed: 2 additions & 8 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

crates/stdlib/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -115,7 +115,7 @@ dns-lookup = "3.0"
115115
# OpenSSL dependencies (optional, for ssl-openssl feature)
116116
openssl = { version = "0.10.72", optional = true }
117117
openssl-sys = { version = "0.9.110", optional = true }
118-
openssl-probe = { version = "0.1.5", optional = true }
118+
openssl-probe = { version = "0.2.0", optional = true }
119119
foreign-types-shared = { version = "0.1.1", optional = true }
120120

121121
# Rustls dependencies (optional, for ssl-rustls feature)

crates/stdlib/src/openssl.rs

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,7 @@ cfg_if::cfg_if! {
2525

2626
use crate::vm::{PyRef, VirtualMachine, builtins::PyModule};
2727
use openssl_probe::ProbeResult;
28+
use std::sync::LazyLock;
2829

2930
pub(crate) fn make_module(vm: &VirtualMachine) -> PyRef<PyModule> {
3031
// if openssl is vendored, it doesn't know the locations
@@ -38,12 +39,12 @@ pub(crate) fn make_module(vm: &VirtualMachine) -> PyRef<PyModule> {
3839
// easily, without having to have a bunch of cfgs
3940
cfg_if::cfg_if! {
4041
if #[cfg(openssl_vendored)] {
41-
use std::sync::LazyLock;
4242
static PROBE: LazyLock<ProbeResult> = LazyLock::new(openssl_probe::probe);
4343
fn probe() -> &'static ProbeResult { &PROBE }
4444
} else {
45+
static EMPTY_PROBE: LazyLock<ProbeResult> = LazyLock::new(|| ProbeResult { cert_file: None, cert_dir: vec![] });
4546
fn probe() -> &'static ProbeResult {
46-
&ProbeResult { cert_file: None, cert_dir: None }
47+
&EMPTY_PROBE
4748
}
4849
}
4950
}
@@ -446,7 +447,7 @@ mod _ssl {
446447
});
447448
let cert_dir = probe
448449
.cert_dir
449-
.as_ref()
450+
.first()
450451
.map(PathBuf::from)
451452
.unwrap_or_else(|| {
452453
path_from_cstr(unsafe { CStr::from_ptr(sys::X509_get_default_cert_dir()) })

0 commit comments

Comments
 (0)