]> git.deb.at Git - pkg/t-prot.git/blob - contrib/t-prot-r1.240-mutt157.diff
238f78b1f395f9fe3aaa726bc0382f9b374b9c6f
[pkg/t-prot.git] / contrib / t-prot-r1.240-mutt157.diff
1 --- t-prot      2005-05-08 20:13:26.000000000 +0200
2 +++ t-prot-M157 2005-05-08 20:11:49.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 @@ -982,7 +986,7 @@
64                  m/^([^%]*)/;
65              ($mutt_pgpsigned) =
66                  Locale::gettext::gettext("[-- End of signed data --]\n")  =~
67 -                m/^(.*)\n/m;
68 +                m/^\n*(.*)\n/m;
69              ($mutt_beginsigned) =
70                  Locale::gettext::gettext("[-- The following data is signed --]\n\n") =~
71                  m/^(.*)\n/m;
72 @@ -990,16 +994,24 @@
73                  Locale::gettext::gettext("[-- END PGP SIGNED MESSAGE --]\n") =~
74                  m/^(.*)\n/m;
75              ($mutt_pgpclearsigstart) =
76 -                Locale::gettext::gettext("[-- BEGIN PGP SIGNED MESSAGE --]\n") =~
77 +                Locale::gettext::gettext("[-- BEGIN PGP SIGNED MESSAGE --]\n\n") =~
78                  m/^(.*)\n/m;
79              ($mutt_pgpencrypted) =
80                  Locale::gettext::gettext("[-- End of PGP/MIME encrypted data --]\n") =~
81                  m/^(.*)\n/m;
82              ($mutt_pgpoutstart) =
83 -                Locale::gettext::gettext("[-- PGP output follows (current time: %c) --]\n") =~
84 -                m/^([^%]*)/;
85 +                Locale::gettext::gettext("[-- %s output follows%s --]\n") =~
86 +                m/^(.*)%s/;
87 +            $mutt_pgpoutstart =~ s/%s/PGP/;
88              ($mutt_pgpoutend) =
89 -                Locale::gettext::gettext("[-- End of PGP output --]\n") =~
90 +                Locale::gettext::gettext("[-- End of PGP output --]\n\n") =~
91 +                m/^(.*)\n/m;
92 +            ($mutt_ssloutstart) =
93 +                Locale::gettext::gettext("[-- %s output follows%s --]\n") =~
94 +                m/^(.*)%s/;
95 +            $mutt_ssloutstart =~ s/%s/OpenSSL/;
96 +            ($mutt_ssloutend) =
97 +                Locale::gettext::gettext("[-- End of OpenSSL output --]\n\n") =~
98                  m/^(.*)\n/m;
99  
100              Locale::gettext::textdomain('gnupg');