Subject: | Proposed patch for Mail::GnuPG |
Date: | Wed, 7 Sep 2011 15:10:02 -0500 |
To: | "bug-Mail-GnuPG [...] rt.cpan.org" <bug-Mail-GnuPG [...] rt.cpan.org> |
From: | Nathan <nathan [...] packetmail.net> |
Hello, I respectfully submit the below patch for review and comments. It seems
that the handling of multipart is not compatible with all PGP clients. The
below patch resolves this issue and allows these clients to work as expected. I
also believe this format to be closer to what traditional OpenPGP and PGP
clients produce.
--- /usr/share/perl5/Mail/GnuPG.pm 2008-05-20 06:37:01.000000000 -0500
+++ /usr/share/perl5/Mail/GnuPG.pm 2011-09-07 14:29:28.000000000 -0500
@@ -901,13 +901,14 @@
$entity->attach(Type => "application/pgp-encrypted",
Disposition => "inline",
- Filename => "msg.asc",
+ Filename => "Version.txt",
Data => ["Version: 1",""],
Encoding => "7bit");
$entity->attach(Type => "application/octet-stream",
Disposition => "inline",
Data => [@ciphertext],
- Encoding => "7bit");
+ Encoding => "7bit",
+ Filename => "message.asc");
$entity->head->mime_attr("Content-Type","multipart/encrypted");
$entity->head->mime_attr("Content-Type.protocol","application/pgp-encrypted");
I look forward to your comments if any.
Thanks,
Nathan