Open ixolius opened 1 year ago
It seems like we should just change the implementation to call ::new
.
It's a breaking change though, so it would have to be done in a v0.10 release.
In my opinion, changing the implementation of ::new
would be the preferable option.
I'd offer to file a PR, if necessary.
You can open a PR and we can make the change in the next breaking release.
I created a pair of RSA keys using Openssl . private.key.pem.txt public.key.pem.txt Now I have the following code:
This works for the
lib
Key, but not for theopenssl
key. And there are supposed to be equal!However, if i change
to
each verification passes. It took me hours to debug this. The problem is the definition of the
from
method.(from: https://docs.rs/rsa/0.9.2/src/rsa/pkcs1v15/verifying_key.rs.html#167-169)
I'm not sure whether it is possible to modify the implementation and maybe there are good reasons for this behavior. But there should be something like a warning for the
from
method in the documentation, like this:as it is done with
VerifyingKey::new_unprefixed
.This issue is closely related to #238
The
Cargo.toml
for the example code is Cargo.toml.txt