(
ca_cert_path: &Path,
combined_bundle_path: &Path,
)
| 22 | } |
| 23 | |
| 24 | pub fn tls_env_vars( |
| 25 | ca_cert_path: &Path, |
| 26 | combined_bundle_path: &Path, |
| 27 | ) -> [(&'static str, String); 6] { |
| 28 | let ca_cert_path = ca_cert_path.display().to_string(); |
| 29 | let combined_bundle_path = combined_bundle_path.display().to_string(); |
| 30 | [ |
| 31 | ("NODE_EXTRA_CA_CERTS", ca_cert_path.clone()), |
| 32 | ("DENO_CERT", ca_cert_path), |
| 33 | ("SSL_CERT_FILE", combined_bundle_path.clone()), |
| 34 | ("REQUESTS_CA_BUNDLE", combined_bundle_path.clone()), |
| 35 | ("CURL_CA_BUNDLE", combined_bundle_path.clone()), |
| 36 | // Ubuntu Noble's git links against libcurl-gnutls, which ignores SSL_CERT_FILE. |
| 37 | // git reads GIT_SSL_CAINFO (or http.sslCAInfo) to locate the CA bundle. |
| 38 | ("GIT_SSL_CAINFO", combined_bundle_path), |
| 39 | ] |
| 40 | } |
| 41 | |
| 42 | #[cfg(test)] |
| 43 | mod tests { |
no outgoing calls