You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The crate has a DecodeRsaPrivateKey trait, but pkcs1::RsaPrivateKey does not implement it? (or if it does, then only indirectly via a blanket impl on a pkcs8 feature in another crate???)
This seems very weird. Is that a mistake? Why is the type and trait in the same crate if they don't work together?
The only apparent way of creating pkcs1::RsaPrivateKey is via TryFrom<&[u8]> implementation, which is not mentioned anywhere, and the impl itself has zero documentation, so it needs diving into the crate's source code to discover it takes DER.
It's weird that the pkcs1 crate has a pem Cargo feature, and describes possibility of using PEM format, but as far as I can tell, PEM decoding is not supported by the crate.
The text was updated successfully, but these errors were encountered:
The actual working implementation of pkcs1::DecodeRsaPrivateKey is not in this crate, only in the rsa crate, and rsa::RsaPrivateKey is a different type than pkcs1::RsaPrivateKey! In the pkcs8 crate, the equivalent of RsaPrivateKey is called PrivateKeyInfo.
The docs for
pkcs1
have no examples how to use the crate to decode anRsaPrivateKey
.The crate has a
DecodeRsaPrivateKey
trait, butpkcs1::RsaPrivateKey
does not implement it? (or if it does, then only indirectly via a blanket impl on apkcs8
feature in another crate???)This seems very weird. Is that a mistake? Why is the type and trait in the same crate if they don't work together?
The only apparent way of creating
pkcs1::RsaPrivateKey
is viaTryFrom<&[u8]>
implementation, which is not mentioned anywhere, and the impl itself has zero documentation, so it needs diving into the crate's source code to discover it takes DER.It's weird that the
pkcs1
crate has apem
Cargo feature, and describes possibility of using PEM format, but as far as I can tell, PEM decoding is not supported by the crate.The text was updated successfully, but these errors were encountered: