mirror of
https://github.com/RustPython/RustPython.git
synced 2026-10-29 03:04:38 +08:00
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] <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](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] <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>
This commit is contained in:
3 files changed
+7
-12
No files matched your search
Generated
+2
-8
@@ -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",
|
||||
|
||||
@@ -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)
|
||||
|
||||
@@ -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<PyModule> {
|
||||
// if openssl is vendored, it doesn't know the locations
|
||||
@@ -38,12 +39,12 @@ pub(crate) fn make_module(vm: &VirtualMachine) -> PyRef<PyModule> {
|
||||
// easily, without having to have a bunch of cfgs
|
||||
cfg_if::cfg_if! {
|
||||
if #[cfg(openssl_vendored)] {
|
||||
use std::sync::LazyLock;
|
||||
static PROBE: LazyLock<ProbeResult> = LazyLock::new(openssl_probe::probe);
|
||||
fn probe() -> &'static ProbeResult { &PROBE }
|
||||
} else {
|
||||
static EMPTY_PROBE: LazyLock<ProbeResult> = 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()) })
|
||||
|
||||
Reference in new issue
Block a user