From c6cf57d2159796f2068b8366f1de81ae2a695629 Mon Sep 17 00:00:00 2001 From: Giuseppe Scrivano Date: Fri, 5 Aug 2011 21:36:08 +0200 Subject: [PATCH] gnutls: do not use a deprecated function. --- src/ChangeLog | 5 +++++ src/gnutls.c | 9 ++------- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/src/ChangeLog b/src/ChangeLog index bd10d2f1..c3b9b56c 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,3 +1,8 @@ +2011-08-05 Giuseppe Scrivano + + * gnutls.c (ssl_connect_wget): Use `gnutls_priority_set_direct' instead + of the deprecated `gnutls_protocol_set_priority'. + 2011-08-02 Giuseppe Scrivano * cookies.c (parse_set_cookie): If the value is quoted, do not modify diff --git a/src/gnutls.c b/src/gnutls.c index db924167..34d27ec3 100644 --- a/src/gnutls.c +++ b/src/gnutls.c @@ -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 ();