-
Notifications
You must be signed in to change notification settings - Fork 137
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
pkcs1 crate has no examples, no obvious way of using #1611
Comments
The actual working implementation of |
Yes, this crate is somewhat unloved relative to the others, and lacks examples. For reference, the correct trait for decoding The
These traits also only work for owned types as they don't have an associated lifetime, whereas In the latest prerelease of e.g. We could do a similar treatment to |
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: