nixpkgs/pkgs/misc/emulators/wine/cert-path.patch

24 lines
749 B
Diff
Raw Normal View History

2020-11-23 16:01:00 +00:00
diff --git a/dlls/crypt32/unixlib.c b/dlls/crypt32/unixlib.c
index 035f2d936bb..959716d727a 100644
--- a/dlls/crypt32/unixlib.c
+++ b/dlls/crypt32/unixlib.c
@@ -24,6 +24,7 @@
#include "wine/port.h"
#include <stdarg.h>
2020-11-23 16:01:00 +00:00
+#include <stdlib.h>
#include <dirent.h>
#include <fcntl.h>
#include <unistd.h>
@@ -605,6 +606,10 @@ static void load_root_certs(void)
2020-11-23 16:01:00 +00:00
for (i = 0; i < ARRAY_SIZE(CRYPT_knownLocations) && list_empty(&root_cert_list); i++)
import_certs_from_path( CRYPT_knownLocations[i], TRUE );
+
2020-11-23 16:01:00 +00:00
+ char *nix_cert_file = getenv("NIX_SSL_CERT_FILE");
+ if (nix_cert_file != NULL)
+ import_certs_from_path(nix_cert_file, TRUE);
}
static BOOL WINAPI enum_root_certs( void *buffer, SIZE_T size, SIZE_T *needed )