View | Details | Raw Unified | Return to bug 183125
Collapse All | Expand All

(-)./Makefile (-3 / +4 lines)
Lines 2-9 Link Here
2
# $FreeBSD: head/mail/mutt/Makefile 327742 2013-09-20 19:59:12Z bapt $
2
# $FreeBSD: head/mail/mutt/Makefile 327742 2013-09-20 19:59:12Z bapt $
3
3
4
PORTNAME=	mutt
4
PORTNAME=	mutt
5
PORTVERSION=	1.5.21
5
PORTVERSION=	1.5.22
6
PORTREVISION=	4
6
PORTREVISION=	0
7
CATEGORIES+=	mail ipv6
7
CATEGORIES+=	mail ipv6
8
MASTER_SITES=	ftp://ftp.mutt.org/mutt/devel/ \
8
MASTER_SITES=	ftp://ftp.mutt.org/mutt/devel/ \
9
		ftp://ftp.fu-berlin.de/pub/unix/mail/mutt/devel/ \
9
		ftp://ftp.fu-berlin.de/pub/unix/mail/mutt/devel/ \
Lines 306-311 Link Here
306
306
307
.if ${PORT_OPTIONS:MNNTP}
307
.if ${PORT_OPTIONS:MNNTP}
308
DISTFILES+=	patch-${VVV_PATCH_VERSION}.vvv.nntp.gz:vvv
308
DISTFILES+=	patch-${VVV_PATCH_VERSION}.vvv.nntp.gz:vvv
309
DISTFILES+=	patch-${VVV_PATCH_VERSION}.vvv.nntp_ru.gz:vvv
309
CONFIGURE_ARGS+=	--enable-nntp
310
CONFIGURE_ARGS+=	--enable-nntp
310
XML_NEEDED=	yes
311
XML_NEEDED=	yes
311
CATEGORIES+=	news
312
CATEGORIES+=	news
Lines 354-360 Link Here
354
.endif
355
.endif
355
356
356
WRKSRC=		${WRKDIR}/${DISTNAME:S/i$//}
357
WRKSRC=		${WRKDIR}/${DISTNAME:S/i$//}
357
MAN1=		mutt.1 mutt_dotlock.1 flea.1 muttbug.1 smime_keys.1
358
MAN1=		mutt.1 mutt_dotlock.1 flea.1 muttbug.1 pgpewrap.1 pgpring.1 smime_keys.1
358
MAN5=		muttrc.5
359
MAN5=		muttrc.5
359
.if ${PORT_OPTIONS:MMAILBOX_MANPAGES}
360
.if ${PORT_OPTIONS:MMAILBOX_MANPAGES}
360
MAN5+=		mbox.5 mmdf.5
361
MAN5+=		mbox.5 mmdf.5
(-)./distinfo (-10 / +12 lines)
Lines 1-10 Link Here
1
SHA256 (mutt/mutt-1.5.21.tar.gz) = 2141f36e8d0f4f71c9ca6780001e7cc679fe313e643953fc07f001223e67c4a0
1
SHA256 (mutt/mutt-1.5.22.tar.gz) = 8feae890ed0758a5108bafaef27bd8fc9c378675acf25a3c620f2c7b7540f3a7
2
SIZE (mutt/mutt-1.5.21.tar.gz) = 3716886
2
SIZE (mutt/mutt-1.5.22.tar.gz) = 3782237
3
SHA256 (mutt/patch-1.5.21.rr.compressed.gz) = 5056b181222c4322667fd99a6314e80a4a8b4613357364d9deddef626136b4d9
3
SHA256 (mutt/patch-1.5.22.rr.compressed.gz) = 88480159f4b30a5d257665aa091c651eb934502db08c3459975fe64a1cd700e1
4
SIZE (mutt/patch-1.5.21.rr.compressed.gz) = 10133
4
SIZE (mutt/patch-1.5.22.rr.compressed.gz) = 10214
5
SHA256 (mutt/patch-1.5.21.vvv.nntp.gz) = 514cb4c3404bb68fef08781c17be41c6cd1251d05442db4105c6258f0b9d4928
5
SHA256 (mutt/patch-1.5.22.vvv.nntp.gz) = 0de014565facf48f368cf74d8d25c31c2e68cd22810e84d1b64b55befbe48fe6
6
SIZE (mutt/patch-1.5.21.vvv.nntp.gz) = 55611
6
SIZE (mutt/patch-1.5.22.vvv.nntp.gz) = 61382
7
SHA256 (mutt/patch-1.5.21.vvv.initials.gz) = ecce3643b04d1aced7085bca506896298bd56d991a5d1af057922c8358abf141
7
SHA256 (mutt/patch-1.5.22.vvv.nntp_ru.gz) = 899dc48b2873a6965f54c1d3a5da22f7ff94b2e4e0bdc2df6828266420dc8b07
8
SIZE (mutt/patch-1.5.21.vvv.initials.gz) = 691
8
SIZE (mutt/patch-1.5.22.vvv.nntp_ru.gz) = 5726
9
SHA256 (mutt/patch-1.5.21.vvv.quote.gz) = b0613d305932b31eaf005ee0740558d46561a6d7a333c97a00d34a1d0c1ef843
9
SHA256 (mutt/patch-1.5.22.vvv.initials.gz) = d5d25971f5d91b22554fa151b05ba5b76a88d8541158620eee5ae43047cd2b4b
10
SIZE (mutt/patch-1.5.21.vvv.quote.gz) = 1280
10
SIZE (mutt/patch-1.5.22.vvv.initials.gz) = 684
11
SHA256 (mutt/patch-1.5.22.vvv.quote.gz) = deb5c212adddf4723618a351d456989addd8840d647cb487a44545113ba5c14d
12
SIZE (mutt/patch-1.5.22.vvv.quote.gz) = 1288
(-)./files/extra-patch-doc-xml (-2 / +2 lines)
Lines 4-11 Link Here
4
 
4
 
5
 all: makedoc-all
5
 all: makedoc-all
6
 
6
 
7
-makedoc-all: mutt.1 smime_keys.1 muttrc.man
7
-makedoc-all: mutt.1 smime_keys.1 muttrc.man pgpewrap.1 pgpring.1
8
+makedoc-all: mutt.1 smime_keys.1 muttrc.man manual.html stamp-doc-chunked manual.txt
8
+makedoc-all: mutt.1 smime_keys.1 muttrc.man pgpewrap.1 pgpring.1 manual.html stamp-doc-chunked manual.txt
9
 
9
 
10
 install-data-local: makedoc-all instdoc
10
 install-data-local: makedoc-all instdoc
11
 	$(top_srcdir)/mkinstalldirs $(DESTDIR)$(mandir)/man1
11
 	$(top_srcdir)/mkinstalldirs $(DESTDIR)$(mandir)/man1
(-)./files/patch-02 (-7 / +7 lines)
Lines 1-15 Link Here
1
--- doc/Makefile.am.orig	2010-09-17 16:04:58.000000000 +0200
1
--- doc/Makefile.am.orig	2013-10-18 06:48:24.000000000 +0200
2
+++ doc/Makefile.am	2010-09-17 16:09:09.000000000 +0200
2
+++ doc/Makefile.am	2013-10-18 12:30:09.000000000 +0200
3
@@ -47,7 +47,7 @@
3
@@ -48,7 +48,7 @@
4
 
4
 
5
 all: makedoc-all
5
 all: makedoc-all
6
 
6
 
7
-makedoc-all: mutt.1 smime_keys.1 muttrc.man manual.html stamp-doc-rc stamp-doc-chunked manual.txt
7
-makedoc-all: mutt.1 smime_keys.1 muttrc.man manual.html stamp-doc-rc stamp-doc-chunked manual.txt pgpewrap.1 pgpring.1
8
+makedoc-all: mutt.1 smime_keys.1 muttrc.man
8
+makedoc-all: mutt.1 smime_keys.1 muttrc.man pgpewrap.1 pgpring.1
9
 
9
 
10
 install-data-local: makedoc-all instdoc
10
 install-data-local: makedoc-all instdoc
11
 	$(top_srcdir)/mkinstalldirs $(DESTDIR)$(mandir)/man1
11
 	$(top_srcdir)/mkinstalldirs $(DESTDIR)$(mandir)/man1
12
@@ -70,9 +70,6 @@
12
@@ -73,9 +73,6 @@
13
 		$(INSTALL) -m 644 $(srcdir)/$$f $(DESTDIR)$(docdir) ; \
13
 		$(INSTALL) -m 644 $(srcdir)/$$f $(DESTDIR)$(docdir) ; \
14
 	done
14
 	done
15
 	-$(INSTALL) -m 644 manual.txt $(DESTDIR)$(docdir)
15
 	-$(INSTALL) -m 644 manual.txt $(DESTDIR)$(docdir)
Lines 19-25 Link Here
19
 	$(INSTALL) -m 644 Muttrc $(DESTDIR)$(sysconfdir)/Muttrc.dist
19
 	$(INSTALL) -m 644 Muttrc $(DESTDIR)$(sysconfdir)/Muttrc.dist
20
 	-if [ -f $(DESTDIR)$(pkgdatadir)/Muttrc ] ; then \
20
 	-if [ -f $(DESTDIR)$(pkgdatadir)/Muttrc ] ; then \
21
 		mv $(DESTDIR)$(pkgdatadir)/Muttrc* $(DESTDIR)$(sysconfdir) ; \
21
 		mv $(DESTDIR)$(pkgdatadir)/Muttrc* $(DESTDIR)$(sysconfdir) ; \
22
@@ -103,9 +100,7 @@
22
@@ -106,9 +103,7 @@
23
 
23
 
24
 check:
24
 check:
25
 manual.txt: manual.html
25
 manual.txt: manual.html
(-)./files/patch-bdb (-11 lines)
Lines 1-11 Link Here
1
--- configure.ac.orig	2009-06-09 08:50:33.000000000 +0200
2
+++ configure.ac	2010-01-27 18:15:31.000000000 +0100
3
@@ -976,7 +976,7 @@
4
                 bdbpfx="$bdbpfx $d/$v"
5
             done
6
         done
7
-        BDB_VERSIONS="db-4 db4 db-4.6 db4.6 db46 db-4.5 db4.5 db45 db-4.4 db4.4 db44 db-4.3 db4.3 db43 db-4.2 db4.2 db42 db-4.1 db4.1 db41 db ''"
8
+        BDB_VERSIONS="db-4 db4 db-5 db5 db-5.2 db5.2 db52 db-5.1 db5.1 db51 db-5.0 db5.0 db50 db-4.8 db4.8 db48 db-4.7 db4.7 db47 db-4.6 db4.6 db46 db-4.5 db4.5 db45 db-4.4 db4.4 db44 db-4.3 db4.3 db43 db-4.2 db4.2 db42 db-4.1 db4.1 db41 db ''"
9
         AC_MSG_CHECKING([for BerkeleyDB > 4.0])
10
         for d in $bdbpfx; do
11
             BDB_INCLUDE_DIR=""
(-)./files/patch-color-eol (-62 lines)
Lines 1-62 Link Here
1
--- mutt.h.orig	Fri Jun  4 13:35:59 2004
2
+++ mutt.h	Fri Jun  4 13:49:26 2004
3
@@ -350,6 +350,7 @@
4
   OPTBEEPNEW,
5
   OPTBOUNCEDELIVERED,
6
   OPTCHECKNEW,
7
+  OPTCOLORAFTEREOL,
8
   OPTCOLLAPSEUNREAD,
9
   OPTCONFIRMAPPEND,
10
   OPTCONFIRMCREATE,
11
--- init.h.orig	Fri Jun  4 13:35:56 2004
12
+++ init.h	Fri Jun  4 13:45:43 2004
13
@@ -315,6 +315,12 @@
14
   ** \fIcheck_new\fP is \fIunset\fP, no check for new mail is performed
15
   ** while the mailbox is open.
16
   */
17
+  { "color_after_eol",	DT_BOOL, R_NONE, OPTCOLORAFTEREOL, 1 },
18
+  /*
19
+  ** .pp
20
+  ** When \fIset\fP, Mutt will color a line after the last character extending
21
+  ** to the end of the window.
22
+  */
23
   { "collapse_unread",	DT_BOOL, R_NONE, OPTCOLLAPSEUNREAD, 1 },
24
   /*
25
   ** .pp
26
--- pager.c.orig	Sat Jun  5 09:13:33 2004
27
+++ pager.c	Sat Jun  5 09:12:31 2004
28
@@ -1392,7 +1392,7 @@
29
    * ncurses does an implicit clrtoeol() when you do addch('\n') so we have
30
    * to make sure to reset the color *after* that
31
    */
32
-  if (flags & M_SHOWCOLOR)
33
+  if (option (OPTCOLORAFTEREOL) && (flags & M_SHOWCOLOR))
34
   {
35
     m = ((*lineInfo)[n].continuation) ? ((*lineInfo)[n].syntax)[0].first : n;
36
     if ((*lineInfo)[m].type == MT_COLOR_HEADER)
37
@@ -1406,6 +1406,16 @@
38
 #endif
39
   }
40
 
41
+  /*
42
+   * reset the color back to normal.  This *must* come before the
43
+   * addch('\n') for the color not to be filled to the right margin.
44
+   */
45
+  if (!option (OPTCOLORAFTEREOL) && (flags & M_SHOWCOLOR))
46
+  {
47
+    SETCOLOR(MT_COLOR_NORMAL);
48
+    BKGDSET(MT_COLOR_NORMAL);
49
+  }
50
+
51
   /* ncurses always wraps lines when you get to the right side of the
52
    * screen, but S-Lang seems to only wrap if the next character is *not*
53
    * a newline (grr!).
54
@@ -1420,7 +1430,7 @@
55
    * addch('\n'), otherwise the color for this line will not be
56
    * filled to the right margin.
57
    */
58
-  if (flags & M_SHOWCOLOR)
59
+  if (option (OPTCOLORAFTEREOL) && (flags & M_SHOWCOLOR))
60
   {
61
     SETCOLOR(MT_COLOR_NORMAL);
62
     BKGDSET(MT_COLOR_NORMAL);
(-)./files/patch-configure.ac (-9 lines)
Lines 1-9 Link Here
1
--- configure.ac.orig	2010-08-24 09:34:21.000000000 -0700
2
+++ configure.ac	2012-05-03 18:14:34.000000000 -0700
3
@@ -29,6 +29,2 @@
4
 AC_ISC_POSIX
5
-AM_C_PROTOTYPES
6
-if test "x$U" != "x"; then
7
-  AC_MSG_ERROR(Compiler not ANSI compliant)
8
-fi
9
 AC_PROG_CPP
(-)./files/patch-crypt-gpgme.c (-10 lines)
Lines 1-10 Link Here
1
--- ./crypt-gpgme.c.orig	2009-07-01 21:28:51.000000000 -0400
2
+++ ./crypt-gpgme.c	2009-07-01 21:31:52.000000000 -0400
3
@@ -342,6 +342,7 @@
4
   gpgme_error_t err;
5
   gpgme_ctx_t ctx;
6
 
7
+  gpgme_check_version (NULL);
8
   if (!GpgmeLocaleSet)
9
   {
10
     gpgme_set_locale (NULL, LC_CTYPE, setlocale (LC_CTYPE, NULL));
(-)./files/patch-gnutls-CN-validation (-29 lines)
Lines 1-29 Link Here
1
--- mutt_ssl_gnutls.c.orig
2
+++ mutt_ssl_gnutls.c
3
@@ -999,6 +999,7 @@
4
   unsigned int cert_list_size = 0;
5
   gnutls_certificate_status certstat;
6
   int certerr, i, preauthrc, savedcert, rc = 0;
7
+  int rcpeer;
8
 
9
   if (gnutls_auth_get_type (state) != GNUTLS_CRD_CERTIFICATE)
10
   {
11
@@ -1024,6 +1025,9 @@
12
   for (i = 0; i < cert_list_size; i++) {
13
     rc = tls_check_preauth(&cert_list[i], certstat, conn->account.host, i,
14
                            &certerr, &savedcert);
15
+    if (i == 0)
16
+      rcpeer = rc;
17
+
18
     preauthrc += rc;
19
 
20
     if (savedcert)
21
@@ -1049,7 +1053,7 @@
22
         dprint (1, (debugfile, "error trusting certificate %d: %d\n", i, rc));
23
 
24
       certstat = tls_verify_peers (state);
25
-      if (!certstat)
26
+      if (!certstat && !rcpeer)
27
         return 1;
28
     }
29
   }
(-)./files/patch-init.c (-39 lines)
Lines 1-39 Link Here
1
--- init.c.orig	Wed Jul 24 10:41:29 2002
2
+++ init.c	Sat May  3 08:46:29 2003
3
@@ -1707,7 +1707,11 @@
4
 void mutt_init (int skip_sys_rc, LIST *commands)
5
 {
6
   struct passwd *pw;
7
+#if __FreeBSD_version < 500000
8
+  char nodename[STRING];
9
+#else
10
   struct utsname utsname;
11
+#endif
12
   char *p, buffer[STRING], error[STRING];
13
   int i, default_rc = 0, need_pause = 0;
14
   BUFFER err;
15
@@ -1765,16 +1769,21 @@
16
 #endif
17
 
18
   /* And about the host... */
19
+#if __FreeBSD_version < 500000
20
+  gethostname(nodename, sizeof (nodename));
21
+#else
22
   uname (&utsname);
23
+  strfcpy (nodename, utsname.nodename, sizeof (nodename));
24
+#endif
25
   /* some systems report the FQDN instead of just the hostname */
26
-  if ((p = strchr (utsname.nodename, '.')))
27
+  if ((p = strchr (nodename, '.')))
28
   {
29
-    Hostname = mutt_substrdup (utsname.nodename, p);
30
+    Hostname = mutt_substrdup (nodename, p);
31
     p++;
32
     strfcpy (buffer, p, sizeof (buffer)); /* save the domain for below */
33
   }
34
   else
35
-    Hostname = safe_strdup (utsname.nodename);
36
+    Hostname = safe_strdup (nodename);
37
 
38
 #ifndef DOMAIN
39
 #define DOMAIN buffer
(-)./files/patch-nbsp (-22 lines)
Lines 1-22 Link Here
1
diff --git a/pager.c b/pager.c
2
--- pager.c
3
+++ pager.c
4
@@ -1187,10 +1187,17 @@
5
       last_special = special;
6
     }
7
 
8
-    if (IsWPrint (wc))
9
+    if (IsWPrint (wc) || (Charset_is_utf8 && wc == 0x00A0))
10
     {
11
       if (wc == ' ')
12
 	space = ch;
13
+      else if (Charset_is_utf8 && wc == 0x00A0)
14
+      {
15
+	/* Convert non-breaking space to normal space. The local variable
16
+	 * `space' is not set here so that the caller of this function won't
17
+	 * attempt to wrap at this character. */
18
+	wc = ' ';
19
+      }
20
       t = wcwidth (wc);
21
       if (col + t > wrap_cols)
22
 	break;
(-)./files/patch-pgp (-134 lines)
Lines 1-134 Link Here
1
--- crypt-gpgme.c~	2010-09-10 07:41:33.584316201 +1000
2
+++ crypt-gpgme.c	2010-09-10 08:22:32.948976728 +1000
3
@@ -2003,12 +2003,14 @@
4
   {
5
     if (!mutt_strncmp ("-----BEGIN PGP ", buf, 15))
6
     {
7
-      if (!mutt_strcmp ("MESSAGE-----\n", buf + 15))
8
+      if (!mutt_strcmp ("MESSAGE-----\n", buf + 15) ||
9
+	  !mutt_strcmp ("MESSAGE-----\r\n", buf + 15))
10
       {
11
 	enc = 1;
12
 	break;
13
       }
14
-      else if (!mutt_strcmp ("SIGNED MESSAGE-----\n", buf + 15))
15
+      else if (!mutt_strcmp ("SIGNED MESSAGE-----\n", buf + 15) ||
16
+	       !mutt_strcmp ("SIGNED MESSAGE-----\r\n", buf + 15))
17
       {
18
 	sgn = 1;
19
 	break;
20
@@ -2128,7 +2130,8 @@
21
       continue;
22
     }
23
 
24
-    if (!mutt_strcmp (buf, "-----BEGIN PGP SIGNATURE-----\n"))
25
+    if (!mutt_strcmp (buf, "-----BEGIN PGP SIGNATURE-----\n") ||
26
+	!mutt_strcmp (buf, "-----BEGIN PGP SIGNATURE-----\r\n"))
27
       break;
28
     
29
     if (armor_header)
30
@@ -2196,14 +2199,17 @@
31
           clearsign = 0;
32
           start_pos = last_pos;
33
           
34
-          if (!mutt_strcmp ("MESSAGE-----\n", buf + 15))
35
+          if (!mutt_strcmp ("MESSAGE-----\n", buf + 15) ||
36
+	      !mutt_strcmp ("MESSAGE-----\r\n", buf + 15))
37
             needpass = 1;
38
-          else if (!mutt_strcmp ("SIGNED MESSAGE-----\n", buf + 15))
39
+          else if (!mutt_strcmp ("SIGNED MESSAGE-----\n", buf + 15) ||
40
+		   !mutt_strcmp ("SIGNED MESSAGE-----\r\n", buf + 15))
41
             {
42
               clearsign = 1;
43
               needpass = 0;
44
             }
45
-          else if (!mutt_strcmp ("PUBLIC KEY BLOCK-----\n", buf + 15))
46
+          else if (!mutt_strcmp ("PUBLIC KEY BLOCK-----\n", buf + 15) ||
47
+		   !mutt_strcmp ("PUBLIC KEY BLOCK-----\r\n", buf + 15))
48
           {
49
             needpass = 0;
50
             pgp_keyblock = 1;
51
--- pgp.c~	2009-05-31 03:20:08.000000000 +1000
52
+++ pgp.c	2010-09-10 08:27:40.317064142 +1000
53
@@ -219,7 +219,8 @@
54
       continue;
55
     }
56
 
57
-    if (mutt_strcmp (buf, "-----BEGIN PGP SIGNATURE-----\n") == 0)
58
+    if (mutt_strcmp (buf, "-----BEGIN PGP SIGNATURE-----\n") == 0 ||
59
+	mutt_strcmp (buf, "-----BEGIN PGP SIGNATURE-----\r\n") == 0)
60
       break;
61
     
62
     if (armor_header)
63
@@ -287,14 +288,17 @@
64
       clearsign = 0;
65
       start_pos = last_pos;
66
 
67
-      if (mutt_strcmp ("MESSAGE-----\n", buf + 15) == 0)
68
+      if (mutt_strcmp ("MESSAGE-----\n", buf + 15) == 0 ||
69
+	  mutt_strcmp ("MESSAGE-----\r\n", buf + 15) == 0)
70
         needpass = 1;
71
-      else if (mutt_strcmp ("SIGNED MESSAGE-----\n", buf + 15) == 0)
72
+      else if (mutt_strcmp ("SIGNED MESSAGE-----\n", buf + 15) == 0 ||
73
+	       mutt_strcmp ("SIGNED MESSAGE-----\r\n", buf + 15) == 0)
74
       {
75
 	clearsign = 1;
76
         needpass = 0;
77
       }
78
-      else if (!mutt_strcmp ("PUBLIC KEY BLOCK-----\n", buf + 15))
79
+      else if (!mutt_strcmp ("PUBLIC KEY BLOCK-----\n", buf + 15) ||
80
+	       !mutt_strcmp ("PUBLIC KEY BLOCK-----\r\n", buf + 15))
81
       {
82
         needpass = 0;
83
         pgp_keyblock = 1;
84
@@ -327,10 +331,14 @@
85
 	
86
 	fputs (buf, tmpfp);
87
 
88
-	if ((needpass && mutt_strcmp ("-----END PGP MESSAGE-----\n", buf) == 0) ||
89
-	    (!needpass 
90
-             && (mutt_strcmp ("-----END PGP SIGNATURE-----\n", buf) == 0
91
-                 || mutt_strcmp ("-----END PGP PUBLIC KEY BLOCK-----\n",buf) == 0)))
92
+	if ((needpass &&
93
+	     (mutt_strcmp ("-----END PGP MESSAGE-----\n", buf) == 0 ||
94
+	      mutt_strcmp ("-----END PGP MESSAGE-----\r\n", buf) == 0)) ||
95
+	    (!needpass &&
96
+	     (mutt_strcmp ("-----END PGP SIGNATURE-----\n", buf) == 0 ||
97
+	      mutt_strcmp ("-----END PGP SIGNATURE-----\r\n", buf) == 0 ||
98
+	      mutt_strcmp ("-----END PGP PUBLIC KEY BLOCK-----\n",buf) == 0 ||
99
+	      mutt_strcmp ("-----END PGP PUBLIC KEY BLOCK-----\r\n",buf) == 0)))
100
 	  break;
101
 	/* remember optional Charset: armor header as defined by RfC4880 */
102
 	if (mutt_strncmp ("Charset: ", buf, 9) == 0)
103
@@ -554,11 +562,14 @@
104
   {
105
     if (mutt_strncmp ("-----BEGIN PGP ", buf, 15) == 0)
106
     {
107
-      if (mutt_strcmp ("MESSAGE-----\n", buf + 15) == 0)
108
+      if (mutt_strcmp ("MESSAGE-----\n", buf + 15) == 0 ||
109
+	  mutt_strcmp ("MESSAGE-----\r\n", buf + 15) == 0)
110
 	enc = 1;
111
-      else if (mutt_strcmp ("SIGNED MESSAGE-----\n", buf + 15) == 0)
112
+      else if (mutt_strcmp ("SIGNED MESSAGE-----\n", buf + 15) == 0 ||
113
+	       mutt_strcmp ("SIGNED MESSAGE-----\r\n", buf + 15) == 0)
114
 	sgn = 1;
115
-      else if (mutt_strcmp ("PUBLIC KEY BLOCK-----\n", buf + 15) == 0)
116
+      else if (mutt_strcmp ("PUBLIC KEY BLOCK-----\n", buf + 15) == 0 ||
117
+	       mutt_strcmp ("PUBLIC KEY BLOCK-----\r\n", buf + 15) == 0)
118
 	key = 1;
119
     }
120
   }
121
@@ -1067,9 +1078,11 @@
122
    */
123
   while (fgets (buffer, sizeof (buffer) - 1, pgpout) != NULL)
124
   {
125
-    if (mutt_strcmp ("-----BEGIN PGP MESSAGE-----\n", buffer) == 0)
126
+    if (mutt_strcmp ("-----BEGIN PGP MESSAGE-----\n", buffer) == 0 ||
127
+	mutt_strcmp ("-----BEGIN PGP MESSAGE-----\r\n", buffer) == 0)
128
       fputs ("-----BEGIN PGP SIGNATURE-----\n", fp);
129
-    else if (mutt_strcmp("-----END PGP MESSAGE-----\n", buffer) == 0)
130
+    else if (mutt_strcmp("-----END PGP MESSAGE-----\n", buffer) == 0 ||
131
+	     mutt_strcmp("-----END PGP MESSAGE-----\r\n", buffer) == 0)
132
       fputs ("-----END PGP SIGNATURE-----\n", fp);
133
     else
134
       fputs (buffer, fp);
(-)./files/patch-tls-version (-112 lines)
Lines 1-112 Link Here
1
--- init.h.orig	2010-09-15 08:39:31.000000000 -0700
2
+++ init.h	2012-03-28 10:58:42.870572835 -0700
3
@@ -2972,6 +2972,18 @@ struct option_t MuttVars[] = {
4
   ** SSL authentication process.
5
   */
6
 #ifdef USE_SSL_OPENSSL
7
+  { "ssl_use_tlsv1_1", DT_BOOL, R_NONE, OPTTLSV1_1, 1 },
8
+  /*
9
+  ** .pp
10
+  ** This variable specifies whether to attempt to use TLSv1.1 in the
11
+  ** SSL authentication process.
12
+  */
13
+  { "ssl_use_tlsv1_2", DT_BOOL, R_NONE, OPTTLSV1_2, 1 },
14
+  /*
15
+  ** .pp
16
+  ** This variable specifies whether to attempt to use TLSv1.2 in the
17
+  ** SSL authentication process.
18
+  */
19
   { "ssl_usesystemcerts", DT_BOOL, R_NONE, OPTSSLSYSTEMCERTS, 1 },
20
   /*
21
   ** .pp
22
--- mutt.h	2010-09-13 10:19:55.000000000 -0700
23
+++ mutt.h	2012-03-28 10:59:24.437237530 -0700
24
@@ -376,6 +376,8 @@ enum
25
 # endif /* USE_SSL_GNUTLS */
26
   OPTSSLV3,
27
   OPTTLSV1,
28
+  OPTTLSV1_1,
29
+  OPTTLSV1_2,
30
   OPTSSLFORCETLS,
31
   OPTSSLVERIFYDATES,
32
   OPTSSLVERIFYHOST,
33
--- mutt_ssl.c.orig	2010-08-25 18:31:40.000000000 +0200
34
+++ mutt_ssl.c	2013-08-20 13:51:14.000000000 +0200
35
@@ -100,12 +100,33 @@
36
     goto bail;
37
 
38
   ssldata = (sslsockdata*) safe_calloc (1, sizeof (sslsockdata));
39
-  /* the ssl_use_xxx protocol options don't apply. We must use TLS in TLS. */
40
-  if (! (ssldata->ctx = SSL_CTX_new (TLSv1_client_method ())))
41
+  /* the ssl_use_xxx protocol options don't apply. We must use TLS in TLS.
42
+   * TLSv1.2 support was added in OpenSSL 1.0.1.  RHEL6 shipped with 1.0.0 so
43
+   * our configure script checks for TLSv1.2 availability.
44
+   */
45
+  if (! (ssldata->ctx = SSL_CTX_new (
46
+#ifdef HAVE_TLSV1_2_CLIENT_METHOD
47
+				  TLSv1_2_client_method ()
48
+#else
49
+				  TLSv1_client_method ()
50
+#endif
51
+				  )))
52
   {
53
     dprint (1, (debugfile, "mutt_ssl_starttls: Error allocating SSL_CTX\n"));
54
     goto bail_ssldata;
55
   }
56
+#ifdef SSL_OP_NO_TLSv1_1
57
+  if (!option(OPTTLSV1_1))
58
+  {
59
+    SSL_CTX_set_options(ssldata->ctx, SSL_OP_NO_TLSv1_1);
60
+  }
61
+#endif
62
+#ifdef SSL_OP_NO_TLSv1_2
63
+  if (!option(OPTTLSV1_2))
64
+  {
65
+    SSL_CTX_set_options(ssldata->ctx, SSL_OP_NO_TLSv1_2);
66
+  }
67
+#endif
68
 
69
   ssl_get_client_cert(ssldata, conn);
70
 
71
@@ -303,6 +324,21 @@
72
   {
73
     SSL_CTX_set_options(data->ctx, SSL_OP_NO_TLSv1);
74
   }
75
+  /* TLSv1.1/1.2 support was added in OpenSSL 1.0.1, but some OS distros such
76
+   * as Fedora 17 are on OpenSSL 1.0.0.
77
+   */
78
+#ifdef SSL_OP_NO_TLSv1_1
79
+  if (!option(OPTTLSV1_1))
80
+  {
81
+    SSL_CTX_set_options(data->ctx, SSL_OP_NO_TLSv1_1);
82
+  }
83
+#endif
84
+#ifdef SSL_OP_NO_TLSv1_2
85
+  if (!option(OPTTLSV1_2))
86
+  {
87
+    SSL_CTX_set_options(data->ctx, SSL_OP_NO_TLSv1_2);
88
+  }
89
+#endif
90
   if (!option(OPTSSLV2))
91
   {
92
     SSL_CTX_set_options(data->ctx, SSL_OP_NO_SSLv2);
93
@@ -375,8 +411,8 @@
94
   if (!ssl_check_certificate (conn, ssldata))
95
     return -1;
96
 
97
-  mutt_message (_("SSL connection using %s (%s)"),
98
-    SSL_get_cipher_version (ssldata->ssl), SSL_get_cipher_name (ssldata->ssl));
99
+  mutt_message (_("%s connection using %s (%s)"),
100
+    SSL_get_version(ssldata->ssl), SSL_get_cipher_version (ssldata->ssl), SSL_get_cipher_name (ssldata->ssl));
101
   mutt_sleep (0);
102
 
103
   return 0;
104
@@ -911,7 +947,7 @@
105
 
106
 static int interactive_check_cert (X509 *cert, int idx, int len)
107
 {
108
-  char *part[] =
109
+  static const char * const part[] =
110
     {"/CN=", "/Email=", "/O=", "/OU=", "/L=", "/ST=", "/C="};
111
   char helpstr[LONG_STRING];
112
   char buf[STRING];

Return to bug 183125