On Tue, 2006-06-27 at 19:20 -0700, Yang Yang wrote:
> for version 0.23,
> I tried $rsa->public_decrypt($encrypted_string),
> then it segfaults,
>
> 0.22 doesn't segfault, but it gave error:
> Can't locate auto/Crypt/OpenSSL/RSA/public_decr.al in @INC (@INC contains:
> ......
> )
I don't recall having run into this before, but some extra information
might help. Did the unit tests pass while doing the install? What
version of perl and openssl do you have installed? Can you provide a
complete sample program which is driving this error?
>
>
> I also tried the sample code from CPAN,
>
> ####################
> $rsa_priv->use_md5_hash(); # use_sha1_hash is the default
> $signature = $rsa_priv->sign($plaintext);
> print "Signed correctly\n" if ($rsa->verify($plaintext, $signature));
> #################
> if I have the first sentence, it fails to verify,
> if I delete it (defaulting to sha1), it works.
You would need to also call $rsa->use_md5_hash(); Otherwise, you are
signing with one hash, and attempting to verify using another. Or am I
misunderstanding the problem?
>
> Thanks
> Yang
- Ian
|