]> granicus.if.org Git - curl/commitdiff
gnutls: enforced use of SSLv3
authorDaniel Stenberg <daniel@haxx.se>
Mon, 23 Jan 2012 22:53:06 +0000 (23:53 +0100)
committerDaniel Stenberg <daniel@haxx.se>
Tue, 24 Jan 2012 07:54:26 +0000 (08:54 +0100)
With advice from Nikos Mavrogiannopoulos, changed the priority string to
add "actual priorities" and favour ARCFOUR. This makes libcurl work
better when enforcing SSLv3 with GnuTLS. Both in the sense that the
libmicrohttpd test is now working again but also that it mitigates a
weakness in the older SSL/TLS protocols.

Bug: http://curl.haxx.se/mail/lib-2012-01/0225.html
Reported by: Christian Grothoff

lib/gtls.c

index f44fd774819d9c8e0c69e78475aa45098a8bc253..e24e7a81ecd04e4f34cd26aa61ad6becec9153f8 100644 (file)
@@ -453,7 +453,13 @@ gtls_connect_step1(struct connectdata *conn,
     rc = gnutls_protocol_set_priority(session, protocol_priority);
 #else
     const char *err;
-    rc = gnutls_priority_set_direct(session, "-VERS-TLS-ALL:+VERS-SSL3.0",
+    /* the combination of the cipher ARCFOUR with SSL 3.0 and TLS 1.0 is not
+       vulnerable to attacks such as the BEAST, why this code now explicitly
+       asks for that
+    */
+    rc = gnutls_priority_set_direct(session,
+                                    "NORMAL:-VERS-TLS-ALL:+VERS-SSL3.0:"
+                                    "-CIPHER-ALL:+ARCFOUR-128",
                                     &err);
 #endif
     if(rc != GNUTLS_E_SUCCESS)