<<< Date Index >>>     <<< Thread Index >>>

[Mutt] #2954: Bug#439775: mutt: imaps broken with gnutls13 1.7.18 (fwd)



#2954: Bug#439775: mutt: imaps broken with gnutls13 1.7.18 (fwd)

 {{{
 ----- Forwarded message from Julien Cristau <jcristau@xxxxxxxxxx> -----

 Date: Mon, 27 Aug 2007 12:15:07 +0200
 From: Julien Cristau <jcristau@xxxxxxxxxx>
 Reply-To: Julien Cristau <jcristau@xxxxxxxxxx>, 439775@xxxxxxxxxxxxxxx
 To: Debian Bug Tracking System <submit@xxxxxxxxxxxxxxx>
 Subject: Bug#439775: mutt: imaps broken with gnutls13 1.7.18

 Package: mutt
 Version: 1.5.16-3
 Severity: grave
 Justification: renders package unusable

 After upgrading to the new version of libgnutls13 in unstable, mutt
 fails to connect to my imaps server with "tls_socket_read ((unknown
 error code))".
 Downgrading to libgnutls13 1.6.3-1 fixes it.
 Apparently mutt calls gnutls_error_is_fatal() even when
 gnutls_record_recv() returns a positive value (success), but the default
 return value of that function has changed from 0 to 1 in the new gnutls.

 The comment on top of gnutls_error_is_fatal() in gnutls_errors.c says:
   * @error: is an error returned by a gnutls function. Error should be a
   * negative value.

 The following (untested) patch should fix that particular problem.

 --- mutt_ssl_gnutls.c.orig      2007-08-27 12:12:09.000000000 +0200
 +++ mutt_ssl_gnutls.c   2007-08-27 12:12:43.000000000 +0200
 @@ -99,7 +99,7 @@
    }

    ret = gnutls_record_recv (data->state, buf, len);
 -  if (gnutls_error_is_fatal(ret) == 1)
 +  if (ret < 0 && gnutls_error_is_fatal(ret) == 1)
    {
      mutt_error ("tls_socket_read (%s)", gnutls_strerror (ret));
      mutt_sleep (4);
 @@ -121,7 +121,7 @@
    }

    ret = gnutls_record_send (data->state, buf, len);
 -  if (gnutls_error_is_fatal(ret) == 1)
 +  if (ret < 0 && gnutls_error_is_fatal(ret) == 1)
    {
      mutt_error ("tls_socket_write (%s)", gnutls_strerror (ret));
      mutt_sleep (4);

 Cheers,
 Julien


 ----- End forwarded message -----
 ----- Forwarded message from Julien Cristau <jcristau@xxxxxxxxxx> -----

 Date: Mon, 27 Aug 2007 21:10:57 +0200
 From: Julien Cristau <jcristau@xxxxxxxxxx>
 Reply-To: Julien Cristau <jcristau@xxxxxxxxxx>, 439775@xxxxxxxxxxxxxxx
 To: 439775@xxxxxxxxxxxxxxx
 CC: control@xxxxxxxxxxxxxxx
 Subject: Bug#439775: mutt: imaps broken with gnutls13 1.7.18

 severity 439775 normal
 kthxbye

 On Mon, Aug 27, 2007 at 12:15:07 +0200, Julien Cristau wrote:

 > Package: mutt
 > Version: 1.5.16-3
 > Severity: grave
 > Justification: renders package unusable
 >
 > After upgrading to the new version of libgnutls13 in unstable, mutt
 > fails to connect to my imaps server with "tls_socket_read ((unknown
 > error code))".
 > Downgrading to libgnutls13 1.6.3-1 fixes it.
 > Apparently mutt calls gnutls_error_is_fatal() even when
 > gnutls_record_recv() returns a positive value (success), but the default
 > return value of that function has changed from 0 to 1 in the new gnutls.
 >
 The change has been reverted in gnutls13 1.7.19, so I'm downgrading the
 severity.  It's arguably still a bug in mutt, though.

 Cheers,
 Julien


 ----- End forwarded message -----

 Christoph
 }}}

-- 
Ticket URL: <http://dev.mutt.org/trac/ticket/2954>