Tentative fix to replace the deprecated gnutls_protocol_set_priority() with
gnutls_priority_set_direct(), initially reported in http://bugs.debian.org/624058
---- a/mutt_ssl_gnutls.c
-+++ b/mutt_ssl_gnutls.c
+Index: mutt/mutt_ssl_gnutls.c
+===================================================================
+--- mutt.orig/mutt_ssl_gnutls.c 2011-05-03 13:26:09.000000000 +0000
++++ mutt/mutt_ssl_gnutls.c 2011-05-03 13:52:28.000000000 +0000
@@ -238,8 +238,6 @@
gnutls_x509_crt_deinit (clientcrt);
}
int err;
+#if GNUTLS_VERSION_MAJOR >= 2 && GNUTLS_VERSION_MINOR >= 12
-+ const char *force_sslv3_str = "NORMAL:-VERS-TLS-ALL:+VERS-SSL3.0";
-+ const char *force_tls_str = "NORMAL:-VERS-SSL3.0:+VERS-TLS-ALL";
++ char *force_sslv3_str = "NORMAL:-VERS-TLS-ALL:+VERS-SSL3.0";
++ char *force_tls_str = "NORMAL:-VERS-SSL3.0:+VERS-TLS-ALL";
+#else
-+ const char *force_sslv3_str =
++ char *force_sslv3_str =
+ "NORMAL:-VERS-TLS1.2:-VERS-TLS1.1:-VERS-TLS1.0:+VERS-SSL3.0";
-+ const char *force_tls_str = "NORMAL:-VERS-SSL3.0:+VERS-TLS-1.2:+VERS-TLS1.1:+VERS-TLS1.0";
++ char *force_tls_str = "NORMAL:-VERS-SSL3.0:+VERS-TLS-1.2:+VERS-TLS1.1:+VERS-TLS1.0";
+#endif
+ char *priority_str = "NORMAL";
+ const char *error_pos;
}
/*
else
-@@ -309,7 +317,22 @@
+@@ -309,8 +317,21 @@
/* We use default priorities (see gnutls documentation),
except for protocol version */
- gnutls_set_default_priority (data->state);
+- gnutls_protocol_set_priority (data->state, protocol_priority);
+ error_pos = NULL;
+ if ( (error_code = gnutls_priority_set_direct (data->state, priority_str,
+ &error_pos)) != 0 )
+ mutt_sleep(2);
+ goto fail;
+ }
-+
- gnutls_protocol_set_priority (data->state, protocol_priority);
if (SslDHPrimeBits > 0)
+ {