scratch/sign
changeset 15 7c3215a97e4b
parent 12 9f127fcfdf6d
child 17 e65ad1481966
--- a/scratch/sign	Fri Nov 11 11:22:50 2011 +0100
+++ b/scratch/sign	Fri Nov 25 15:44:37 2011 +0100
@@ -17,12 +17,13 @@
 
 my $unsigned = Message::2822->new(file => shift//"ex/mails/unsigned");
 
+die join " ", $unsigned->header_contents("Subject");
 
 # copy the body into a tmp file and copy there the content-
 # header lines
 open(my $message, "+>$dir/message");
 print {$message}
-    $unsigned->header_lines(qr/^content-/i), "\n",
+    $unsigned->header_lines("content-"), "\n",
     $unsigned->orig_body;
 $message->flush();
 
@@ -37,7 +38,6 @@
 
 # ask GPG to sign it…
 system("gpg",
-    "--rfc1991",
     "--detach-sign",
     "--homedir" => "ex/gpg",
     "--armor" => "$dir/message");
@@ -49,7 +49,7 @@
 seek($message, 0, 0);
 
 print "--${boundary}\n",
-      <$message>, "\n",
+      <$message>,
       "--${boundary}\n",
       <<___, <$sig>, "\n--${boundary}--\n";
 Content-Type: application/pgp-signature; name="signature.asc"