Skip to content

loading pkcs8 EC private keys #2821

@mcr

Description

@mcr

We have rsa::KeyPair::from_pkcs8, but no ec::KeyPair::from_pkcs8 (that I can see).
(Ideally, I'd like a fn that could load either EC or RSA private keys without the application have to know which it has got)

Reading unwrap_key*(), I see that the purpose of the template, which is loaded as a literal OID value,
it seems that it's just the alg_id_value in OID format. unwrap__() compares it as a ("less safe") slice.
Why have an external file for a single OID, which is then turned into an untrusted::Input, when it could just be a literal static slice?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions