]> git.deb.at Git - pkg/t-prot.git/blob - contrib/t-prot-r1.311-mutt1512.diff
Imported Upstream version 2.101
[pkg/t-prot.git] / contrib / t-prot-r1.311-mutt1512.diff
1 --- t-prot      2010-10-31 11:13:22.000000000 +0100
2 +++ t-prot-mutt1520     2010-10-31 11:40:45.000000000 +0100
3 @@ -33,6 +33,7 @@
4      $mutt_attachment $mutt_contenttype $mutt_pgpsigned $mutt_beginsigned
5      $mutt_pgpclearsigned $mutt_pgpclearsigstart $mutt_pgpencrypted
6      $mutt_pgpoutstart $mutt_pgpoutend $mutt_pgpcryptend $mutt_pgpcryptstart
7 +    $mutt_ssloutstart $mutt_ssloutend
8  );
9  
10  
11 @@ -74,6 +75,8 @@
12  $mutt_pgpencrypted      = '[-- End of PGP/MIME encrypted data --]';
13  $mutt_pgpoutstart       = '[-- PGP output follows (current time:';
14  $mutt_pgpoutend         = '[-- End of PGP output --]';
15 +$mutt_ssloutstart       = '[-- OpenSSL output follows';
16 +$mutt_ssloutend         = '[-- End of OpenSSL output --]';
17  
18  # set the defaults to the C locale
19  $gpg_WARNING            = 'WARNING: ';
20 @@ -412,7 +415,7 @@
21      for (my $x=0; $x<scalar(@$L); $x++) {
22          if ($$V[$x]) { next; }
23  
24 -        if ($$L[$x]=~/^(?:\e[^\a]+\a)?(?:\Q$mutt_pgpoutstart\E)/o)
25 +        if ($$L[$x]=~/^(?:\e[^\a]+\a)?(?:\Q$mutt_pgpoutstart\E|\Q$mutt_ssloutstart\E)/o)
26          {
27              my $from;
28              for (my $m=0; $m<scalar(@$H); $m++) {
29 @@ -438,7 +441,7 @@
30                          $i--;
31                      }
32                  }
33 -                elsif ($$L[$i]=~/^(?:\e[^\a]+\a)?(?:\Q$mutt_pgpoutend\E)/o) {
34 +                elsif ($$L[$i]=~/^(?:\e[^\a]+\a)?(?:\Q$mutt_pgpoutend\E|\Q$mutt_ssloutend\E)/o) {
35                      if ($pgpmove ||
36                          ($pgpmovevrf && (!$sigint) && verified($L, $x+1, $i)))
37                      {
38 @@ -804,7 +807,7 @@
39                      'Weitergeleitete Nachricht / Forwarded Message',
40                      '[A-Za-z ]+ <(\w[\w.+-]*@(?:[\w.+-]+\.)+[A-Za-z]{2,})> schrieb:');
41          my $k = 0;    # any text above?
42 -        my $tmp = 0;  # flagged if inside PGP output
43 +        my $tmp = 0;  # flagged if inside PGP or SSL output
44  
45          DONE: for ($x=0; $x<scalar(@$lines); $x++) { 
46              if (!$vrb[$x]) {
47 @@ -832,9 +835,11 @@
48                      ((!$spass) || index($$lines[$x], $spass_prefix)!=0))
49                  {
50                      if ($mua eq 'mutt' && (!$tmp) &&
51 -                        $$lines[$x] =~
52 -                             /^(?:\e[^\a]+\a)?(?:\Q$mutt_pgpoutstart\E)/o) {
53 -                        $tmp = 1; 
54 +                        ($$lines[$x] =~
55 +                             /^(?:\e[^\a]+\a)?(?:\Q$mutt_pgpoutstart\E)/o ||
56 +                         $$lines[$x] =~
57 +                             /^(?:\e[^\a]+\a)?(?:\Q$mutt_ssloutstart\E)/o)) {
58 +                        $tmp = 1;
59                      } elsif ($mua eq 'mutt' && $tmp && 
60                          ($$lines[$x] =~
61                               /^(?:\e[^\a]+\a)?(?:\Q$mutt_beginsigned\E)/o ||
62 @@ -1130,8 +1135,8 @@
63                  Locale::gettext::gettext("[-- Type: %s/%s, Encoding: %s, Size: %s --]\n") =~
64                  m/^([^%]*)/;
65              ($mutt_pgpsigned) =
66 -                Locale::gettext::gettext("[-- End of signed data --]\n")  =~
67 -                m/^(.*)\n/m;
68 +                Locale::gettext::gettext("\n[-- End of signed data --]\n")  =~
69 +                m/^\n*(.*)\n/m;
70              ($mutt_beginsigned) =
71                  Locale::gettext::gettext("[-- The following data is signed --]\n\n") =~
72                  m/^(.*)\n/m;
73 @@ -1139,16 +1144,24 @@
74                  Locale::gettext::gettext("[-- END PGP SIGNED MESSAGE --]\n") =~
75                  m/^(.*)\n/m;
76              ($mutt_pgpclearsigstart) =
77 -                Locale::gettext::gettext("[-- BEGIN PGP SIGNED MESSAGE --]\n") =~
78 +                Locale::gettext::gettext("[-- BEGIN PGP SIGNED MESSAGE --]\n\n") =~
79                  m/^(.*)\n/m;
80              ($mutt_pgpencrypted) =
81                  Locale::gettext::gettext("[-- End of PGP/MIME encrypted data --]\n") =~
82                  m/^(.*)\n/m;
83              ($mutt_pgpoutstart) =
84 -                Locale::gettext::gettext("[-- PGP output follows (current time: %c) --]\n") =~
85 -                m/^([^%]*)/;
86 +                sprintf(Locale::gettext::gettext("[-- %s output follows%s --]\n"), 'PGP', '%s') =~
87 +                m/^(.*)%s/;
88 +            $mutt_pgpoutstart =~ s/%s/PGP/;
89              ($mutt_pgpoutend) =
90 -                Locale::gettext::gettext("[-- End of PGP output --]\n") =~
91 +                Locale::gettext::gettext("[-- End of PGP output --]\n\n") =~
92 +                m/^(.*)\n/m;
93 +            ($mutt_ssloutstart) =
94 +                Locale::gettext::gettext("[-- %s output follows%s --]\n") =~
95 +                m/^(.*)%s/;
96 +            $mutt_ssloutstart =~ s/%s/OpenSSL/;
97 +            ($mutt_ssloutend) =
98 +                Locale::gettext::gettext("[-- End of OpenSSL output --]\n\n") =~
99                  m/^(.*)\n/m;
100  
101              Locale::gettext::textdomain('gnupg');