]> git.llucax.com Git - software/mutt-debian.git/blobdiff - debian/patches/upstream/624058-gnutls-deprecated.patch
reworked upstream/624058-gnutls-deprecated.patch to compile cleanly
[software/mutt-debian.git] / debian / patches / upstream / 624058-gnutls-deprecated.patch
index a5257c393a1d9a83e48aa79fec6919cca8a3673c..4f8adf2ed75303484ab189e9f5eac6212ea77e37 100644 (file)
@@ -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)
+   {