diff options
author | Thomas Tuegel <ttuegel@gmail.com> | 2014-12-02 10:41:24 -0600 |
---|---|---|
committer | Thomas Tuegel <ttuegel@gmail.com> | 2014-12-02 10:41:24 -0600 |
commit | 02157ab123508341c4019c64017966fbb8ab2921 (patch) | |
tree | 7b33500a2bbe0eb1556f5c47e2a01fb0c2c43f3b /pkgs/tools/networking/curl | |
parent | ea1dd9fd4a44228f02ef3916968425a1fca65483 (diff) | |
download | nixlib-02157ab123508341c4019c64017966fbb8ab2921.tar nixlib-02157ab123508341c4019c64017966fbb8ab2921.tar.gz nixlib-02157ab123508341c4019c64017966fbb8ab2921.tar.bz2 nixlib-02157ab123508341c4019c64017966fbb8ab2921.tar.lz nixlib-02157ab123508341c4019c64017966fbb8ab2921.tar.xz nixlib-02157ab123508341c4019c64017966fbb8ab2921.tar.zst nixlib-02157ab123508341c4019c64017966fbb8ab2921.zip |
libcurl: honor $SSL_CERT_FILE (fixed)
The previous attempt to patch libcurl used getenv("CURL_CA_BUNDLE") || getenv("SSL_CERT_FILE") to get the second environment variable if the first is unset. Unfortunately, this broke libcurl because the (||) operator is C returns only 0 or 1, so it is inappropriate for pointer comparisons! Now we use getenv("CURL_CA_BUNDLE") ? getenv("CURL_CA_BUNDLE") : getenv("SSL_CERT_FILE") instead. This has one downside: it always calls getenv twice! But, that's a small price to pay for actually being correct.
Diffstat (limited to 'pkgs/tools/networking/curl')
-rw-r--r-- | pkgs/tools/networking/curl/default.nix | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/pkgs/tools/networking/curl/default.nix b/pkgs/tools/networking/curl/default.nix index 2e106c899b9c..b54df60ef0a9 100644 --- a/pkgs/tools/networking/curl/default.nix +++ b/pkgs/tools/networking/curl/default.nix @@ -37,7 +37,7 @@ stdenv.mkDerivation rec { # make curl honor CURL_CA_BUNDLE & SSL_CERT_FILE postConfigure = '' - echo '#define CURL_CA_BUNDLE (getenv("CURL_CA_BUNDLE") || getenv("SSL_CERT_FILE"))' >> lib/curl_config.h + echo '#define CURL_CA_BUNDLE (getenv("CURL_CA_BUNDLE") ? getenv("CURL_CA_BUNDLE") : getenv("SSL_CERT_FILE"))' >> lib/curl_config.h ''; configureFlags = [ |