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