forked from Rust-related/RustPython
Merge pull request #1867 from RustPython/coolreader18/fix-openssl-vendor-certs
Fix openssl certificates not being found when openssl is vendored
This commit is contained in:
7
Cargo.lock
generated
7
Cargo.lock
generated
@@ -1032,6 +1032,12 @@ dependencies = [
|
||||
"openssl-sys",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "openssl-probe"
|
||||
version = "0.1.2"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "77af24da69f9d9341038eba93a073b1fdaaa1b788221b00a69bce9e762cb32de"
|
||||
|
||||
[[package]]
|
||||
name = "openssl-src"
|
||||
version = "111.8.1+1.1.1f"
|
||||
@@ -1584,6 +1590,7 @@ dependencies = [
|
||||
"num_enum",
|
||||
"once_cell",
|
||||
"openssl",
|
||||
"openssl-probe",
|
||||
"openssl-sys",
|
||||
"paste",
|
||||
"pwd",
|
||||
|
||||
@@ -95,6 +95,7 @@ socket2 = { version = "0.3", features = ["unix"] }
|
||||
rustyline = "6.0"
|
||||
openssl = { version = "0.10", features = ["vendored"] }
|
||||
openssl-sys = "0.9"
|
||||
openssl-probe = "0.1"
|
||||
|
||||
[target.'cfg(not(any(target_arch = "wasm32", target_os = "redox")))'.dependencies]
|
||||
dns-lookup = "1.0"
|
||||
|
||||
@@ -740,6 +740,11 @@ fn parse_version_info(mut n: i64) -> (u8, u8, u8, u8, u8) {
|
||||
}
|
||||
|
||||
pub fn make_module(vm: &VirtualMachine) -> PyObjectRef {
|
||||
// if openssl is vendored, it doesn't know the locations of system certificates
|
||||
match option_env!("OPENSSL_NO_VENDOR") {
|
||||
None | Some("0") => {}
|
||||
_ => openssl_probe::init_ssl_cert_env_vars(),
|
||||
}
|
||||
openssl::init();
|
||||
let ctx = &vm.ctx;
|
||||
let ssl_error = create_type(
|
||||
|
||||
Reference in New Issue
Block a user