File tree 3 files changed +20
-4
lines changed
3 files changed +20
-4
lines changed Original file line number Diff line number Diff line change @@ -25,7 +25,7 @@ bssl-sys = { version = "0.1.0", optional = true }
25
25
[build-dependencies ]
26
26
bindgen = { version = " 0.65.0" , optional = true , features = [" experimental" ] }
27
27
cc = " 1.0.61"
28
- openssl-src = { version = " 300.1.2 " , optional = true , features = [" legacy" ] }
28
+ openssl-src = { version = " 300.2.0 " , optional = true , features = [" legacy" ] }
29
29
pkg-config = " 0.3.9"
30
30
vcpkg = " 0.2.8"
31
31
Original file line number Diff line number Diff line change 1
1
use openssl_src;
2
2
use std:: path:: PathBuf ;
3
3
4
+ use super :: env;
5
+
4
6
pub fn get_openssl ( _target : & str ) -> ( Vec < PathBuf > , PathBuf ) {
5
- let artifacts = openssl_src:: Build :: new ( ) . build ( ) ;
7
+ let openssl_config_dir = env ( "OPENSSL_CONFIG_DIR" ) ;
8
+
9
+ let mut openssl_src_build = openssl_src:: Build :: new ( ) ;
10
+ if let Some ( value) = openssl_config_dir {
11
+ openssl_src_build. openssl_dir ( PathBuf :: from ( value) ) ;
12
+ }
13
+
14
+ let artifacts = openssl_src_build. build ( ) ;
6
15
println ! ( "cargo:vendored=1" ) ;
7
16
println ! (
8
17
"cargo:root={}" ,
Original file line number Diff line number Diff line change 19
19
//! openssl = { version = "0.10", features = ["vendored"] }
20
20
//! ```
21
21
//!
22
- //! The vendored copy will not be configured to automatically find the system's root certificates, but the
23
- //! `openssl-probe` crate can be used to do that instead.
22
+ //! The vendored copy will be configured to automatically find a configuration and root certificates at `/usr/local/ssl`.
23
+ //! This path can be overridden with an environment variable (see the manual section below).
24
+ //! Alternatively, the `openssl-probe` crate can be used to find root certificates at runtime.
24
25
//!
25
26
//! ## Automatic
26
27
//!
67
68
//! if nonstandard library names were used for whatever reason.
68
69
//! * `OPENSSL_NO_VENDOR` - If set, always find OpenSSL in the system, even if the `vendored` feature is enabled.
69
70
//!
71
+ //! If the `vendored` Cargo feature is enabled, the following environment variable can also be used to further configure
72
+ //! the OpenSSL build.
73
+ //!
74
+ //! * `OPENSSL_CONFIG_DIR` - If set, the copy of OpenSSL built by the `openssl-src` crate will be configured to look for
75
+ //! configuration files and root certificates in this directory.
76
+ //!
70
77
//! Additionally, these variables can be prefixed with the upper-cased target architecture (e.g.
71
78
//! `X86_64_UNKNOWN_LINUX_GNU_OPENSSL_DIR`), which can be useful when cross compiling.
72
79
//!
You can’t perform that action at this time.
0 commit comments