Skip to content
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

get rfc822Name/email from certificate's SAN? #72

Open
ian-p-cooke opened this issue Jan 16, 2018 · 1 comment
Open

get rfc822Name/email from certificate's SAN? #72

ian-p-cooke opened this issue Jan 16, 2018 · 1 comment

Comments

@ian-p-cooke
Copy link

I don't see a way to get an email address out of a certificate's subject_alternate_name. Is that something that webpki could support? I think this is related to #64.

I have client certificates from which I want to get the email after verification is successful. Today I'm using openssl like this but I'm trying to avoid that dependency.

@briansmith
Copy link
Owner

There are two features here that I see:

  1. How can I validate that a certificate is valid for a given email address given up front?
  2. How can i iterate through the email addresses for which a certificate is valid?

I would expect that if one is doing S/MIME or similar then the first kind of API would be needed. I suspect that if somebody is implementing e.g. TLS client authentication then they might have a system that doesn't allow the first kind of API to be used and so the second kind of API is needed.

Here's what I think would be required for this to be merged:

  1. Implement the first kind of API, where the email address(es) for which the certificate must be valid is/are passed as inputs, similar to the existing API for DNS name validation.
  2. Implement add a method to collect the DNS names from a certificate #65/Get DNS Names from a certificate #79.
  3. Generalize add a method to collect the DNS names from a certificate #65/Get DNS Names from a certificate #79 to the email address case.

With good tests at each stage.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants