diff options
Diffstat (limited to 'infra/libkookie/nixpkgs/pkgs/misc/emulators/wine/cert-path.patch')
-rw-r--r-- | infra/libkookie/nixpkgs/pkgs/misc/emulators/wine/cert-path.patch | 41 |
1 files changed, 20 insertions, 21 deletions
diff --git a/infra/libkookie/nixpkgs/pkgs/misc/emulators/wine/cert-path.patch b/infra/libkookie/nixpkgs/pkgs/misc/emulators/wine/cert-path.patch index da01a4778102..18a90e1a9af8 100644 --- a/infra/libkookie/nixpkgs/pkgs/misc/emulators/wine/cert-path.patch +++ b/infra/libkookie/nixpkgs/pkgs/misc/emulators/wine/cert-path.patch @@ -1,24 +1,23 @@ -diff --git a/dlls/crypt32/rootstore.c b/dlls/crypt32/rootstore.c -index f795181..fb4926a 100644 ---- a/dlls/crypt32/rootstore.c -+++ b/dlls/crypt32/rootstore.c -@@ -18,6 +18,7 @@ - #include "config.h" +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 <stdio.h> -+#include <stdlib.h> /* getenv */ - #include <sys/types.h> - #ifdef HAVE_SYS_STAT_H - #include <sys/stat.h> -@@ -916,6 +917,11 @@ static void read_trusted_roots_from_known_locations(HCERTSTORE store) ++#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; !ret && i < ARRAY_SIZE(CRYPT_knownLocations); i++) - ret = import_certs_from_path(CRYPT_knownLocations[i], from, TRUE); -+ -+ char *nix_cert_file = getenv("NIX_SSL_CERT_FILE"); -+ if (nix_cert_file != NULL) -+ ret = import_certs_from_path(nix_cert_file, from, TRUE); + for (i = 0; i < ARRAY_SIZE(CRYPT_knownLocations) && list_empty(&root_cert_list); i++) + import_certs_from_path( CRYPT_knownLocations[i], TRUE ); + - check_and_store_certs(from, store); - } - CertCloseStore(from, 0); ++ 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 ) |