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

Guilhem Moulin guilhem-guest at moszumanska.debian.org
Fri Sep 5 09:34:27 UTC 2014


Author: guilhem-guest
Date: 2014-09-05 09:34:27 +0000 (Fri, 05 Sep 2014)
New Revision: 706

Modified:
   trunk/caff/caff
Log:
Change the line separator to CRLF as per RFC 3156.

Modified: trunk/caff/caff
===================================================================
--- trunk/caff/caff	2014-09-05 09:34:22 UTC (rev 705)
+++ trunk/caff/caff	2014-09-05 09:34:27 UTC (rev 706)
@@ -855,6 +855,10 @@
 
 	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'} );




More information about the Pgp-tools-commit mailing list