Skip to content

helper methods for certificate management #140

Closed

Description

@Geal

Hello!
I am currently working on importing rustls in the sozu HTTP reverse proxy and a bit puzzled by how to load and manipulate certificates. Specifically, I'd like to get the list of names in common name and subject alternative name fields, coming from a certificate in PEM format.
So from what I see, I can get the DER representation with internal::pemfile::certs which I'll reuse to create a CertifiedKey.
Then, what should I do? wrap this Certificate in untrusted::Input and load it in a webpki::EndEntityCert? But then webpki's name module is not publicly exported.
I could probably write the code to extract names from a certificate, but where do you think I should put it? in webpki? Or would such helper functions be useful directly in rustls?

Activity

  1. ctz commented on Dec 15, 2017

    @ctz
    Member

    I think things which decode certificates should live in webpki, or perhaps a new lower-level crate which deals with x509-level concepts that webpki uses.

  2. Geal commented on Dec 16, 2017

    @Geal
    ContributorAuthor

    Either solution is fine by me. @briansmith what do you think? That would still require a patch to webpki to expose some things from the name module

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions