nixpkgs-suyu/pkgs/misc/emulators/wine/cert-path.patch
2020-11-24 00:54:08 +02:00

23 lines
749 B
Diff

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>
+#include <stdlib.h>
#include <dirent.h>
#include <fcntl.h>
#include <unistd.h>
@@ -605,6 +606,10 @@ static void load_root_certs(void)
for (i = 0; i < ARRAY_SIZE(CRYPT_knownLocations) && list_empty(&root_cert_list); i++)
import_certs_from_path( CRYPT_knownLocations[i], TRUE );
+
+ 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 )