nixpkgs-suyu/pkgs/tools/networking/curl/nix-ssl-cert-file.patch
Domen Kožar c3c9412c7d
git, openssl, curl: Respect $NIX_SSL_CERT_FILE
Slightly modified version of 942dbf89c6
2017-03-20 14:11:20 +01:00

14 lines
562 B
Diff

diff -ru -x '*~' curl-7.50.3-orig/src/tool_operate.c curl-7.50.3/src/tool_operate.c
--- curl-7.50.3-orig/src/tool_operate.c 2016-09-06 23:25:06.000000000 +0200
+++ curl-7.50.3/src/tool_operate.c 2016-10-14 11:51:48.999943142 +0200
@@ -269,7 +269,9 @@
capath_from_env = true;
}
else {
- env = curlx_getenv("SSL_CERT_FILE");
+ env = curlx_getenv("NIX_SSL_CERT_FILE");
+ if(!env)
+ env = curlx_getenv("SSL_CERT_FILE");
if(env) {
config->cacert = strdup(env);
if(!config->cacert) {