openssl: fix nix patch for recent update

This commit is contained in:
Graham Christensen 2017-11-02 15:13:10 -04:00
parent 5e2d96deb3
commit e06dbe4f5b
No known key found for this signature in database
GPG Key ID: ACA1C1D120C83D5C

View File

@ -5,10 +5,10 @@ diff -ru -x '*~' openssl-1.0.2j-orig/crypto/x509/by_file.c openssl-1.0.2j/crypto
switch (cmd) { switch (cmd) {
case X509_L_FILE_LOAD: case X509_L_FILE_LOAD:
if (argl == X509_FILETYPE_DEFAULT) { if (argl == X509_FILETYPE_DEFAULT) {
- file = (char *)getenv(X509_get_default_cert_file_env()); - file = getenv(X509_get_default_cert_file_env());
+ file = (char *)getenv("NIX_SSL_CERT_FILE"); + file = getenv("NIX_SSL_CERT_FILE");
+ if (!file) + if (!file)
+ file = (char *)getenv(X509_get_default_cert_file_env()); + file = getenv(X509_get_default_cert_file_env());
if (file) if (file)
ok = (X509_load_cert_crl_file(ctx, file, ok = (X509_load_cert_crl_file(ctx, file,
X509_FILETYPE_PEM) != 0); X509_FILETYPE_PEM) != 0);