[Pgp-tools-commit] r710 - trunk/caff

Guilhem Moulin guilhem-guest at moszumanska.debian.org
Sat Sep 13 18:01:42 UTC 2014


Author: guilhem-guest
Date: 2014-09-13 18:01:41 +0000 (Sat, 13 Sep 2014)
New Revision: 710

Modified:
   trunk/caff/caff
Log:
Use gpg's --textmode instead of manually changing the line separators to CRLFs.

Modified: trunk/caff/caff
===================================================================
--- trunk/caff/caff	2014-09-13 18:01:36 UTC (rev 709)
+++ trunk/caff/caff	2014-09-13 18:01:41 UTC (rev 710)
@@ -855,17 +855,12 @@
 
 	if ($can_encrypt) {
 		my $message = $message_entity->stringify();
-		# CRLF is the only accepted line separator in text/plain (RFC 2157 6.7)
-		# and PGP/MIME (RFC 3156 5).
-		$message =~ s/\x0D\x0A?/\x0A/g;
-		$message =~ s/\x0A/\x0D\x0A/g;
-
 		my $gpg = GnuPG::Interface->new();
 		$gpg->call( $CONFIG{'gpg'} );
 		$gpg->options->hash_init( 'homedir' => $GNUPGHOME,
 			'meta_interactive' => 0,
 			'always_trust' => 1,
-			'extra_args' => [ qw{ --no-auto-check-trustdb } ],
+			'extra_args' => [ qw{ --no-auto-check-trustdb --textmode } ],
 			'armor' => 1 );
 		my $handles = make_gpg_fds( map {$_ => undef} qw/stdin stdout stderr status/ );
 		$gpg->options->push_recipients( $key_id );




More information about the Pgp-tools-commit mailing list