Skip Menu |

This queue is for tickets about the Mail-DKIM CPAN distribution.

Report information
The Basics
Id: 27566
Status: resolved
Priority: 0/
Queue: Mail-DKIM

People
Owner: jason [...] long.name
Requestors: dairiki [...] dairiki.org
Cc:
AdminCc:

Bug Information
Severity: Important
Broken in: 0.26
Fixed in: 0.29



Subject: The get_algorithm_class method should use its own objects algorithm
I think the get_algorithm_class methods of Mail::DKIM::Signature and Mail::DKIM::DkSignature should take no arguments and should return the class appropriate for $self->algorithm. As things currently stand (in 0.26), when Mail::DKIM::Signer::add_signature creates a new algorithm, it passes $signer->{Algorithm} to $signature->get_algorithm_class. This ends up (incorrectly) creating an algorithm object appropriate for $signer->{Algorithm} rather than $signature->algorithm. This makes it impossible to use a single Signer to generate multiple signatures, if the signatures have different algorithms. One might, for example, want to generate both a DKIM sig (with a=relaxed) and a DomainKey sig (with a=nofws). (If both signatures use the same algorithm (e.g. a=simple), then this can be done, currently by using a signer policy which calls $signer->add_signature once for each signature.)
On Wed Jun 13 14:30:25 2007, dairiki wrote: Show quoted text
> As things currently stand (in 0.26), when > Mail::DKIM::Signer::add_signature creates a new algorithm, it passes > $signer->{Algorithm} to $signature->get_algorithm_class. This ends up > (incorrectly) creating an algorithm object appropriate for > $signer->{Algorithm} rather than $signature->algorithm.
Thanks for reporting this. Yes, that's a bug. It will be fixed in 0.29. Jason