Subject: | logical/bitwise AND mixup in RSA.pm |
Date: | Thu, 13 Dec 2007 16:28:58 -0000 |
To: | <bug-Net-SSH-Perl [...] rt.cpan.org> |
From: | "Haydon Peter" <Peter.Haydon [...] uk.fujitsu.com> |
The following line in the 'verify' function of
Net::SSH::Perl::Key::RSA.pm should probably read:
my $dgst = ${ $key->{datafellows} } & SSH_COMPAT_BUG_RSASIGMD5 ?
'MD5' : 'SHA1';
and not:
my $dgst = ${ $key->{datafellows} } && SSH_COMPAT_BUG_RSASIGMD5 ?
'MD5' : 'SHA1';
i.e. a 'logical' AND has been typed where a bitwise AND was intended.
When the first term is non-zero (mine was usually '31') and the second
term is a constant value of 0x2000, the consequence was that 'MD5' was
always selected even when 'SHA1' was the correct value.
Module version info is:
# $Id: RSA.pm,v 1.8 2001/07/11 21:57:33 btrott Exp $
Regards,
Peter Haydon