Paul Gofman : bcrypt: Prevent gnutls from using system priority file.

Alexandre Julliard julliard at winehq.org
Thu Nov 12 15:17:46 CST 2020


Module: wine
Branch: master
Commit: f15328b145b5652b92d264eb406faba13c70039e
URL:    https://source.winehq.org/git/wine.git/?a=commit;h=f15328b145b5652b92d264eb406faba13c70039e

Author: Paul Gofman <pgofman at codeweavers.com>
Date:   Wed Nov 11 19:01:31 2020 +0300

bcrypt: Prevent gnutls from using system priority file.

Fedora 33 disabled protocols below TLS 1.2 through crypto policy.

Signed-off-by: Paul Gofman <pgofman at codeweavers.com>
Signed-off-by: Hans Leidekker <hans at codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard at winehq.org>

---

 dlls/bcrypt/gnutls.c | 11 +++++++++++
 1 file changed, 11 insertions(+)

diff --git a/dlls/bcrypt/gnutls.c b/dlls/bcrypt/gnutls.c
index e85085499ca..41df88ca8f6 100644
--- a/dlls/bcrypt/gnutls.c
+++ b/dlls/bcrypt/gnutls.c
@@ -222,8 +222,19 @@ static void gnutls_log( int level, const char *msg )
 
 static 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 encryption\n" );




More information about the wine-cvs mailing list