From 11d09da60f2eb0db690cf477a0c2238b1bd9d22c Mon Sep 17 00:00:00 2001 From: Paul Gofman Date: Wed, 11 Nov 2020 19:01:32 +0300 Subject: [PATCH] crypt32: Prevent gnutls from using system priority file. Signed-off-by: Paul Gofman Signed-off-by: Alexandre Julliard --- dlls/crypt32/unixlib.c | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/dlls/crypt32/unixlib.c b/dlls/crypt32/unixlib.c index 47be5691005..035f2d936bb 100644 --- a/dlls/crypt32/unixlib.c +++ b/dlls/crypt32/unixlib.c @@ -86,8 +86,19 @@ static void gnutls_log( int level, const char *msg ) BOOL gnutls_initialize(void) { + const char *env_str; int ret; + if ((env_str = getenv("GNUTLS_SYSTEM_PRIORITY_FILE"))) + { + WARN("GNUTLS_SYSTEM_PRIORITY_FILE is %s.\n", debugstr_a(env_str)); + } + else + { + WARN("Setting GNUTLS_SYSTEM_PRIORITY_FILE to \"/dev/null\".\n"); + setenv("GNUTLS_SYSTEM_PRIORITY_FILE", "/dev/null", 0); + } + if (!(libgnutls_handle = dlopen( SONAME_LIBGNUTLS, RTLD_NOW ))) { ERR_(winediag)( "failed to load libgnutls, no support for pfx import/export\n" );