Skip to content

Commit f672fcc

Browse files
authored
Merge pull request sfackler#2377 from davidben/bssl-init
Unify the two BoringSSL codepaths a bit and simplify init
2 parents acd312c + dfe216a commit f672fcc

File tree

1 file changed

+7
-10
lines changed

1 file changed

+7
-10
lines changed

openssl-sys/src/lib.rs

+7-10
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,6 @@
66
non_upper_case_globals,
77
unused_imports
88
)]
9-
#![cfg_attr(feature = "unstable_boringssl", allow(ambiguous_glob_reexports))]
109
#![doc(html_root_url = "https://docs.rs/openssl-sys/0.9")]
1110
#![recursion_limit = "128"] // configure fixed limit across all rust versions
1211

@@ -15,21 +14,19 @@ pub use libc::c_int;
1514

1615
#[cfg(feature = "unstable_boringssl")]
1716
extern crate bssl_sys;
18-
#[cfg(feature = "unstable_boringssl")]
19-
pub use bssl_sys::*;
2017

21-
#[cfg(all(boringssl, not(feature = "unstable_boringssl")))]
18+
#[cfg(boringssl)]
2219
#[path = "."]
2320
mod boringssl {
21+
#[cfg(feature = "unstable_boringssl")]
22+
pub use bssl_sys::*;
23+
#[cfg(not(feature = "unstable_boringssl"))]
2424
include!(concat!(env!("OUT_DIR"), "/bindgen.rs"));
2525

26-
pub fn init() {
27-
unsafe {
28-
CRYPTO_library_init();
29-
}
30-
}
26+
// BoringSSL does not require initialization.
27+
pub fn init() {}
3128
}
32-
#[cfg(all(boringssl, not(feature = "unstable_boringssl")))]
29+
#[cfg(boringssl)]
3330
pub use boringssl::*;
3431

3532
#[cfg(openssl)]

0 commit comments

Comments
 (0)