Fix breaking change in 0.1.3

This commit is contained in:
Noah
2021-05-10 12:40:11 -05:00
parent b94749f45b
commit d453861489
+9 -1
View File
@@ -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),