Clone of https://github.com/NixOS/nixpkgs.git (to stress-test knotserver)
at 20.03 24 lines 839 B view raw
1diff --git a/dlls/crypt32/rootstore.c b/dlls/crypt32/rootstore.c 2index f795181..fb4926a 100644 3--- a/dlls/crypt32/rootstore.c 4+++ b/dlls/crypt32/rootstore.c 5@@ -18,6 +18,7 @@ 6 #include "config.h" 7 #include <stdarg.h> 8 #include <stdio.h> 9+#include <stdlib.h> /* getenv */ 10 #include <sys/types.h> 11 #ifdef HAVE_SYS_STAT_H 12 #include <sys/stat.h> 13@@ -916,6 +917,11 @@ static void read_trusted_roots_from_known_locations(HCERTSTORE store) 14 15 for (i = 0; !ret && i < ARRAY_SIZE(CRYPT_knownLocations); i++) 16 ret = import_certs_from_path(CRYPT_knownLocations[i], from, TRUE); 17+ 18+ char *nix_cert_file = getenv("NIX_SSL_CERT_FILE"); 19+ if (nix_cert_file != NULL) 20+ ret = import_certs_from_path(nix_cert_file, from, TRUE); 21+ 22 check_and_store_certs(from, store); 23 } 24 CertCloseStore(from, 0);