]> sjero.net Git - wget/commitdiff
gnutls: do not use a deprecated function.
authorGiuseppe Scrivano <gscrivano@gnu.org>
Fri, 5 Aug 2011 19:36:08 +0000 (21:36 +0200)
committerGiuseppe Scrivano <gscrivano@gnu.org>
Fri, 5 Aug 2011 19:36:08 +0000 (21:36 +0200)
src/ChangeLog
src/gnutls.c

index bd10d2f1e9031d7d5c5dd26dd39c73e3b13a24db..c3b9b56c594f6e15e22bb667401e31eae0de0f53 100644 (file)
@@ -1,3 +1,8 @@
+2011-08-05  Giuseppe Scrivano  <giuseppe@southpole.se>
+
+       * gnutls.c (ssl_connect_wget): Use `gnutls_priority_set_direct' instead
+       of the deprecated `gnutls_protocol_set_priority'.
+
 2011-08-02  Giuseppe Scrivano  <giuseppe@southpole.se>
 
        * cookies.c (parse_set_cookie): If the value is quoted, do not modify
index db9241678c45bf58d7662028112d9fe0526fe1a0..34d27ec34e43635ea85f5f8862c2a4136d366c04 100644 (file)
@@ -246,7 +246,6 @@ ssl_connect_wget (int fd)
   struct wgnutls_transport_context *ctx;
   gnutls_session session;
   int err;
-  int allowed_protocols[4] = {0, 0, 0, 0};
   gnutls_init (&session, GNUTLS_CLIENT);
   gnutls_set_default_priority (session);
   gnutls_certificate_type_set_priority (session, cert_type_priority);
@@ -263,14 +262,10 @@ ssl_connect_wget (int fd)
       break;
     case secure_protocol_sslv2:
     case secure_protocol_sslv3:
-      allowed_protocols[0] = GNUTLS_SSL3;
-      err = gnutls_protocol_set_priority (session, allowed_protocols);
+      err = gnutls_priority_set_direct (session, "NORMAL:-VERS-TLS-ALL", NULL);
       break;
     case secure_protocol_tlsv1:
-      allowed_protocols[0] = GNUTLS_TLS1_0;
-      allowed_protocols[1] = GNUTLS_TLS1_1;
-      allowed_protocols[2] = GNUTLS_TLS1_2;
-      err = gnutls_protocol_set_priority (session, allowed_protocols);
+      err = gnutls_priority_set_direct (session, "NORMAL:-VERS-SSL3.0", NULL);
       break;
     default:
       abort ();