r5833 - /packages/libmail-gnupg-perl/trunk/GnuPG.pm

dmn at users.alioth.debian.org dmn at users.alioth.debian.org
Mon Jul 16 11:30:53 UTC 2007


Author: dmn
Date: Mon Jul 16 11:30:53 2007
New Revision: 5833

URL: http://svn.debian.org/wsvn/pkg-perl/?sc=1&rev=5833
Log:
Revert GnuPG.pm to pristine upstream

Modified:
    packages/libmail-gnupg-perl/trunk/GnuPG.pm

Modified: packages/libmail-gnupg-perl/trunk/GnuPG.pm
URL: http://svn.debian.org/wsvn/pkg-perl/packages/libmail-gnupg-perl/trunk/GnuPG.pm?rev=5833&op=diff
==============================================================================
--- packages/libmail-gnupg-perl/trunk/GnuPG.pm (original)
+++ packages/libmail-gnupg-perl/trunk/GnuPG.pm Mon Jul 16 11:30:53 2007
@@ -63,16 +63,6 @@
   return $self;
 }
 
-sub _maybe_print {
-  # print to a child gpg process, but don't care if it has died already
-  # everyone using this will read the error string out afterwards anyway
-  # see http://bugs.debian.org/412041
-
-  my $fh = shift;
-  local $SIG{PIPE} = 'IGNORE';
-  print $fh @_;
-}
-
 sub _set_options {
   my ($self,$gnupg) = @_;
   $gnupg->options->meta_interactive( 0 );
@@ -172,11 +162,11 @@
 
   # This passes in the passphrase
   die "NO PASSPHRASE" unless defined $passphrase_fh;
-  _maybe_print $passphrase_fh,$self->{passphrase};
+  print $passphrase_fh $self->{passphrase};
   close $passphrase_fh;
 
   # this passes in the plaintext
-  _maybe_print $input,$ciphertext;
+  print $input $ciphertext;
 
   # this closes the communication channel,
   # indicating we are done
@@ -357,12 +347,6 @@
 
   The message can either be in RFC compliant-ish multipart/signed
   format, or just a single part ascii armored message.
-
-  Note that MIME-encoded data should be supplied unmodified inside
-  the MIME::Entity input message, otherwise the signature will be 
-  broken. Since MIME-tools version 5.419, this can be achieved with
-  the C<decode_bodies> method of MIME::Parser. See the MIME::Parser
-  documentation for more information.
 
  Output:
   On error:
@@ -577,7 +561,7 @@
 				   );
   my $pid = $gnupg->detach_sign( handles => $handles );
   die "NO PASSPHRASE" unless defined $passphrase_fh;
-  _maybe_print $passphrase_fh,$self->{passphrase};
+  print $passphrase_fh $self->{passphrase};
   close $passphrase_fh;
 
 
@@ -594,7 +578,7 @@
   $plaintext =~ s/\x0D+/\x0D/g;
 
   # should we store this back into the body?
-  _maybe_print $input,$plaintext;
+  print $input $plaintext;
 
   # DEBUG:
 #  print "SIGNING THIS STRING ----->\n";
@@ -691,7 +675,7 @@
   $plaintext =~ s/\x0A/\x0D\x0A/g;
   $plaintext =~ s/\x0D+/\x0D/g;
 
-  _maybe_print $input,$plaintext;
+  print $input $plaintext;
   close $input;
   
   my @ciphertext = <$output>;
@@ -797,7 +781,7 @@
 	}
   };
 
-  _maybe_print $input,$plaintext;
+  print $input $plaintext;
   close $input;
   
   my @ciphertext = <$output>;
@@ -902,7 +886,7 @@
   };
 
   die "NO PASSPHRASE" unless defined $passphrase_fh;
-  _maybe_print $passphrase_fh,$self->{passphrase};
+  print $passphrase_fh $self->{passphrase};
   close $passphrase_fh;
 
  # this passes in the plaintext
@@ -917,7 +901,7 @@
   # $plaintext =~ s/\n/\x0D\x0A/sg;
   # should we store this back into the body?
 
-  _maybe_print $input,$plaintext;
+  print $input $plaintext;
 
   # DEBUG:
   #print "ENCRYPTING THIS STRING ----->\n";




More information about the Pkg-perl-cvs-commits mailing list