Browse files

reworked upstream/624058-gnutls-deprecated.patch to compile cleanly

  • Loading branch information...
1 parent b72f0ca commit 82e42305247c2f54331c46206b71498b08d6b04b Antonio Radici committed May 3, 2011
Showing with 11 additions and 9 deletions.
  1. +11 −9 debian/patches/upstream/624058-gnutls-deprecated.patch
View
20 debian/patches/upstream/624058-gnutls-deprecated.patch
@@ -1,8 +1,10 @@
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);
}
@@ -17,12 +19,12 @@ gnutls_priority_set_direct(), initially reported in http://bugs.debian.org/62405
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;
@@ -47,11 +49,12 @@ gnutls_priority_set_direct(), initially reported in http://bugs.debian.org/62405
}
/*
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 )
@@ -67,7 +70,6 @@ gnutls_priority_set_direct(), initially reported in http://bugs.debian.org/62405
+ mutt_sleep(2);
+ goto fail;
+ }
-+
- gnutls_protocol_set_priority (data->state, protocol_priority);
if (SslDHPrimeBits > 0)
+ {

0 comments on commit 82e4230

Please sign in to comment.