Jacek Caban : secur32: Use -VERS-ALL gnutls priority string to disable not enabled protocols.

Alexandre Julliard julliard at winehq.org
Thu Dec 6 15:24:59 CST 2018


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

Author: Jacek Caban <jacek at codeweavers.com>
Date:   Thu Dec  6 18:09:18 2018 +0100

secur32: Use -VERS-ALL gnutls priority string to disable not enabled protocols.

Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=46161
Signed-off-by: Jacek Caban <jacek at codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard at winehq.org>

---

 dlls/secur32/schannel_gnutls.c | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/dlls/secur32/schannel_gnutls.c b/dlls/secur32/schannel_gnutls.c
index 05e922d..0a49421 100644
--- a/dlls/secur32/schannel_gnutls.c
+++ b/dlls/secur32/schannel_gnutls.c
@@ -166,7 +166,7 @@ DWORD schan_imp_enabled_protocols(void)
 BOOL schan_imp_create_session(schan_imp_session *session, schan_credentials *cred)
 {
     gnutls_session_t *s = (gnutls_session_t*)session;
-    char priority[128] = "NORMAL:%LATEST_RECORD_VERSION", *p;
+    char priority[128] = "NORMAL:%LATEST_RECORD_VERSION:-VERS-ALL", *p;
     unsigned i;
 
     int err = pgnutls_init(s, cred->credential_use == SECPKG_CRED_INBOUND ? GNUTLS_SERVER : GNUTLS_CLIENT);
@@ -178,8 +178,9 @@ BOOL schan_imp_create_session(schan_imp_session *session, schan_credentials *cre
 
     p = priority + strlen(priority);
     for(i = 0; i < ARRAY_SIZE(protocol_priority_flags); i++) {
+        if (!(cred->enabled_protocols & protocol_priority_flags[i].enable_flag)) continue;
         *p++ = ':';
-        *p++ = (cred->enabled_protocols & protocol_priority_flags[i].enable_flag) ? '+' : '-';
+        *p++ = '+';
         strcpy(p, protocol_priority_flags[i].gnutls_flag);
         p += strlen(p);
     }




More information about the wine-cvs mailing list