1 This patch addresses a security problem due to the fact that the validation of
2 the SSL CN is not correctly done in the gnutls-related code of mutt.
4 The patch has been provided by hhorak on http://bugs.mutt.org/3506, the original
5 bug where the security problem was reported for Debian is
6 http://bugs.debian.org/619216
8 --- a/mutt_ssl_gnutls.c
9 +++ b/mutt_ssl_gnutls.c
11 unsigned int cert_list_size = 0;
12 gnutls_certificate_status certstat;
13 int certerr, i, preauthrc, savedcert, rc = 0;
16 if (gnutls_auth_get_type (state) != GNUTLS_CRD_CERTIFICATE)
19 for (i = 0; i < cert_list_size; i++) {
20 rc = tls_check_preauth(&cert_list[i], certstat, conn->account.host, i,
21 &certerr, &savedcert);
29 dprint (1, (debugfile, "error trusting certificate %d: %d\n", i, rc));
31 certstat = tls_verify_peers (state);
33 + if (!certstat && !rcpeer)