mirror of
https://github.com/openharmony/third_party_rust_openssl-probe.git
synced 2026-07-01 10:18:23 -04:00
Fix breaking change in 0.1.3
This commit is contained in:
+9
-1
@@ -39,6 +39,14 @@ pub fn find_certs_dirs() -> Vec<PathBuf> {
|
||||
}).collect()
|
||||
}
|
||||
|
||||
/// Probe for SSL certificates on the system, then configure the SSL certificate `SSL_CERT_FILE`
|
||||
/// and `SSL_CERT_DIR` environment variables in this process for OpenSSL to use.
|
||||
///
|
||||
/// Preconfigured values in the environment variables will not be overwritten.
|
||||
pub fn init_ssl_cert_env_vars() {
|
||||
try_init_ssl_cert_env_vars();
|
||||
}
|
||||
|
||||
/// Probe for SSL certificates on the system, then configure the SSL certificate `SSL_CERT_FILE`
|
||||
/// and `SSL_CERT_DIR` environment variables in this process for OpenSSL to use.
|
||||
///
|
||||
@@ -47,7 +55,7 @@ pub fn find_certs_dirs() -> Vec<PathBuf> {
|
||||
/// Returns `true` if any certificate file or directory was found while probing.
|
||||
/// Combine this with `has_ssl_cert_env_vars()` to check whether previously configured environment
|
||||
/// variables are valid.
|
||||
pub fn init_ssl_cert_env_vars() -> bool {
|
||||
pub fn try_init_ssl_cert_env_vars() -> bool {
|
||||
let ProbeResult { cert_file, cert_dir } = probe();
|
||||
match &cert_file {
|
||||
Some(path) => put(ENV_CERT_FILE, path),
|
||||
|
||||
Reference in New Issue
Block a user