[Sent this email to CPAN Forum yesterday, but did not get response from
there....]
Hi,
I am getting a "Signature longer than key" when I try to verify an RSA-SHA1
signature. When I print out my key and the signature, the signature is
actually not longer than the key (both the key and the signature are base64
encoded). Andy my code look like this:
my $x509 = Crypt::OpenSSL::X509->new_from_string($pub_key_string);
my $public_key = $x509->pubkey();
my $rsa_pub = Crypt::OpenSSL::RSA->new_public_key($public_key);
$pass = $rsa_pub->verify($base_string, $signature);
Any ideas what might caused this error, should I convert the key or the
signature to some other format before verify?
Thanks!
|