Platon Technologies
not logged in Login Registration
EnglishSlovak
open source software development celebrating 10 years of open source development! Friday, October 16, 2026

Diff for scripts/perl/mail-gnupg/mail-gnupg-encrypt.pl between version 1.4 and 1.5

version 1.4, 2010/10/05 23:03:09 version 1.5, 2010/10/05 23:46:55
Line 29 
Line 29 
 # | /path/to/mail-gnupg-encrypt.pl -r your@email.address.com  # | /path/to/mail-gnupg-encrypt.pl -r your@email.address.com
 #  #
   
 # $Platon: scripts/perl/mail-gnupg/mail-gnupg-encrypt.pl,v 1.3 2005/01/16 19:57:27 rajo Exp $  # $Platon: scripts/perl/mail-gnupg/mail-gnupg-encrypt.pl,v 1.4 2010-10-05 23:03:09 rajo Exp $
   
 use strict;  use strict;
 use warnings;  use warnings;
Line 45  use vars qw (
Line 45  use vars qw (
         $cfgfile          $cfgfile
         $boundary $new_content_type $old_content_type          $boundary $new_content_type $old_content_type
         $header_line $curr_header_key          $header_line $curr_header_key
           $new_content_type_is_set
 );  );
   
 sub help($;);  sub help($;);
Line 60  $new_content_type = "Content-Type: multi
Line 61  $new_content_type = "Content-Type: multi
 $old_content_type = '';  $old_content_type = '';
 $header_line = '';  $header_line = '';
 $curr_header_key = '';  $curr_header_key = '';
   $new_content_type_is_set = 0;
   
 $conf = AppConfig->new( # {{{  $conf = AppConfig->new( # {{{
         {          {
Line 107  if (my $pid = fork()) { # parent
Line 109  if (my $pid = fork()) { # parent
         while (my $line = <STDIN>) {          while (my $line = <STDIN>) {
                 if ($line =~ m/^$/o) { # end of header, print PGP header {{{                  if ($line =~ m/^$/o) { # end of header, print PGP header {{{
                         print CHILD_WTR $header_line;                          print CHILD_WTR $header_line;
                           if ($new_content_type_is_set == 0) {
                                   #warn "NO CONTENT-TYPE-YET";
                                   print CHILD_WTR $new_content_type;
                           }
                         print CHILD_WTR "\n\n--$boundary\n",                          print CHILD_WTR "\n\n--$boundary\n",
                         "Content-Type: application/pgp-encrypted\n",                          "Content-Type: application/pgp-encrypted\n",
                         "Content-Disposition: attachment\n\n",                          "Content-Disposition: attachment\n\n",
Line 120  if (my $pid = fork()) { # parent
Line 126  if (my $pid = fork()) { # parent
                         if ($curr_header_key eq 'content-type') { # na predchadzajucom riadku bol content-type                          if ($curr_header_key eq 'content-type') { # na predchadzajucom riadku bol content-type
                                 $header_line .= $line;                                  $header_line .= $line;
                                 $line = $new_content_type;                                  $line = $new_content_type;
                                   $new_content_type_is_set = 1;
                         }                          }
                         $curr_header_key = lc($1);                          $curr_header_key = lc($1);
                         if ($curr_header_key eq 'content-type') {                          if ($curr_header_key eq 'content-type') {

Legend:
Removed from v.1.4  
changed lines
  Added in v.1.5

Platon Group <platon@platon.org> http://platon.org/
Copyright © 2002-2006 Platon Group
Site powered by Metafox CMS
Go to Top