Subject: | silently does nothing without errors or warnings when attempting to sign |
Additionally #1 - the "see also" section in the documentation contains
two things we should "see" - none of which have any documentation...
Additionally #2 - The appear to be no tests checking the "$mail->sign"
function - if this is true, can you please add some?
Here's how to reproduce the problem - when it fails like this, I
expect to see a reason - that's the underlying philosophy of all
things perl: we should get what we expect.
[root@nic bin]# echo -e "From: cnd@nic.srve.com\nTo:
cnd@nic.srve.com\nSubject: Hi me\n\nHello\n" | perl domainkeys_sign.pl
0.80 at domainkeys_sign.pl line 7.
rsa at domainkeys_sign.pl line 13, <FILE> line 19.
a=rsa-sha1; c=simple; s=test; d=nic.srve.com; b= at domainkeys_sign.pl
line 17, <FILE> line 19.
[root@nic bin]# cat domainkeys_sign.pl
#!perl
use Mail::DomainKeys qw(VERSION);
require Mail::DomainKeys::Message;
require Mail::DomainKeys::Key::Private;
warn $Mail::DomainKeys::VERSION;
my $mail = load Mail::DomainKeys::Message() or die "unable to load
message";
my $priv = load Mail::DomainKeys::Key::Private(File
=> "domainkey.pem") or die "unable to load key";
warn $priv->type;
$mail->sign(Method => "simple", Selector => "test", Private => $priv)
or warn "Oops";
warn $mail->signature->as_string;