diff options
author | Jeremy Harris <jgh146exb@wizmail.org> | 2015-11-29 01:12:38 +0000 |
---|---|---|
committer | Jeremy Harris <jgh146exb@wizmail.org> | 2015-11-29 22:56:04 +0000 |
commit | 6a11a9e618a72b8d96aecb2ad9aa300b98f8d991 (patch) | |
tree | 750abcaea755909d6e7fe315285d216080a0415d /test/aux-fixed/dkim | |
parent | cc28be65e1c95a079b4288c30e15abf68faa45d4 (diff) |
DKIM: relaxed body canonicalisation should ignore whitespace at EOL
and empty lines at EOM. Bug 1721
Diffstat (limited to 'test/aux-fixed/dkim')
-rw-r--r-- | test/aux-fixed/dkim/dkim.private | 15 | ||||
-rw-r--r-- | test/aux-fixed/dkim/sign.pl | 38 |
2 files changed, 53 insertions, 0 deletions
diff --git a/test/aux-fixed/dkim/dkim.private b/test/aux-fixed/dkim/dkim.private new file mode 100644 index 000000000..e509ee027 --- /dev/null +++ b/test/aux-fixed/dkim/dkim.private @@ -0,0 +1,15 @@ +-----BEGIN RSA PRIVATE KEY----- +MIICXQIBAAKBgQDXRFf+VhT+lCgFhhSkinZKcFNeRzjYdW8vT29Rbb3NadvTFwAd ++cVLPFwZL8H5tUD/7JbUPqNTCPxmpgIL+V5T4tEZMorHatvvUM2qfcpQ45IfsZ+Y +dhbIiAslHCpy4xNxIR3zylgqRUF4+Dtsaqy3a5LhwMiKCLrnzhXk1F1hxwIDAQAB +AoGAZPokJKQQmRK6a0zn5f8lWemy0airG66KhzDF0Pafb/nWKgDCB02gpJgdw5rJ +bO7/HI3IeqsfRdYTP7tjfmZtPiPo1mnF7D1rSRspZjOF2yXY/ky7t7c5xChRcSxf ++69CknwjrfteY9Aj0j6o7N+2w2uvHO+AAq8BHDgXKmPo0SECQQDzQ/glyhNH9tlO +x+3TTMwwyZUf2mYYosN3Q9NIl3Umz/3+13K5b6Ed6fZvS/XwU55Qf5IBUVj2Fujk +Rv2lbGPpAkEA4okpnzYz5nm1X5WjpJPQPyo8nGEU1A5QfoDbkAvWYvVoYrpWPOx5 +HFpOAHkvSk1Y1vhCUa+zHwiQRBC8OMp6LwJBAOAUK/AjQ792UpWO9DM++pe2F/dP +ZdwrkYG6qFSlrvQhgwXLz5GgkfjMGoRKpDDL1XixCfzMwfVtBPnBqsNGJIECQGYX +SIGu7L7edMXJ60C9OKluwHf9LGTQuqf4LHsDSq+4Rz3PGhREwePsMqD1/EDxEKt4 +oHKtyvyeYF28aQbzARMCQQCRtJlR6vlKhxYL8+xoPrCu3MijKgVruRUcNstXkDZK +fKQax6vhiMq+0qIiEwLA1wavyLVKZ7Mfag+/4NTcDUVC +-----END RSA PRIVATE KEY----- diff --git a/test/aux-fixed/dkim/sign.pl b/test/aux-fixed/dkim/sign.pl new file mode 100644 index 000000000..1c2a87280 --- /dev/null +++ b/test/aux-fixed/dkim/sign.pl @@ -0,0 +1,38 @@ +use Mail::DKIM::Signer; +use Mail::DKIM::TextWrap; #recommended +use Getopt::Long; + +my $method = "simple/simple"; + +GetOptions( + "method=s" => \$method, +); + +# create a signer object +my $dkim = Mail::DKIM::Signer->new( + Algorithm => "rsa-sha1", + Method => $method, + Domain => "test.ex", + Selector => "sel", + KeyFile => "aux-fixed/dkim/dkim.private", + ); + +# read an email and pass it into the signer, one line at a time +while (<STDIN>) +{ + # remove local line terminators + chomp; + s/\015$//; + + # use SMTP line terminators + $dkim->PRINT("$_\015\012"); +} +$dkim->CLOSE; + +# what is the signature result? +my $signature = $dkim->signature; +print $signature->as_string; +print "\n"; + +#print $dkim->headers; +#print "\n"; |