Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ jobs:
target: x86_64-unknown-linux-gnu
- build: ubuntu-lts
os: ubuntu-24.04
rust: 1.75
rust: '1.80'
docker: linux64
target: x86_64-unknown-linux-gnu
- build: x86_64-beta
Expand Down
15 changes: 5 additions & 10 deletions src/easy/handler.rs
Original file line number Diff line number Diff line change
Expand Up @@ -676,22 +676,17 @@ impl<H: Handler> Easy2<H> {

#[cfg(need_openssl_probe)]
fn ssl_configure(&mut self) {
use std::sync::Once;

static mut PROBE: Option<::openssl_probe::ProbeResult> = None;
static INIT: Once = Once::new();
use std::sync::LazyLock;

// Probe for certificate stores the first time an easy handle is created,
// and re-use the results for subsequent handles.
INIT.call_once(|| unsafe {
PROBE = Some(::openssl_probe::probe());
});
let probe = unsafe { PROBE.as_ref().unwrap() };
static PROBE: LazyLock<openssl_probe::ProbeResult> =
LazyLock::new(|| openssl_probe::probe());

if let Some(ref path) = probe.cert_file {
if let Some(ref path) = PROBE.cert_file {
let _ = self.cainfo(path);
}
if let Some(ref path) = probe.cert_dir {
if let Some(ref path) = PROBE.cert_dir {
let _ = self.capath(path);
}
}
Expand Down