Chromium Code Reviews| Index: net/cert/x509_util_nss.h |
| diff --git a/net/cert/x509_util_nss.h b/net/cert/x509_util_nss.h |
| index 55e562effbab95875f4fb9cd76099c0977d8a83b..b0ad7138e317f7506d541c28d5f52e451adf1b83 100644 |
| --- a/net/cert/x509_util_nss.h |
| +++ b/net/cert/x509_util_nss.h |
| @@ -29,6 +29,17 @@ namespace net { |
| namespace x509_util { |
| #if defined(USE_NSS_CERTS) || defined(OS_IOS) |
| +// Allows the caller to filter the subjectAltName list and return only |
| +// a specific data type (e.g. email addresses or Microsoft User Principal |
| +// Name). |
|
Ryan Sleevi
2016/03/01 00:28:28
While not wanting to seem too aggressive in this C
Kevin Cernekee
2016/03/01 19:28:01
Done.
|
| +enum SubjectAltNameType { |
| + SAN_RFC822_NAME, |
| + SAN_DNS_NAME, |
| + SAN_URI, |
| + SAN_IP_ADDRESS, |
| + SAN_UPN, |
|
Ryan Sleevi
2016/03/01 00:28:28
I highlighted this in a previous CL, but I do want
Ryan Sleevi
2016/03/01 00:28:28
SAN_UPN explicitly is the sort of thing that shoul
Kevin Cernekee
2016/03/01 19:28:01
Done.
|
| +}; |
| + |
| // Parses the Principal attribute from |name| and outputs the result in |
| // |principal|. |
| void ParsePrincipal(CERTName* name, |
| @@ -45,6 +56,12 @@ void GetSubjectAltName(CERTCertificate* cert_handle, |
| std::vector<std::string>* dns_names, |
| std::vector<std::string>* ip_addrs); |
| +// Filters subjectAltName list by type. Only implemented for NSS, to |
| +// support wifi on CrOS. |
|
Ryan Sleevi
2016/03/01 00:28:28
1) It's obvious this is only implemented for NSS,
Ryan Sleevi
2016/03/01 00:28:28
DESIGN: This design really gets to the crux of the
Kevin Cernekee
2016/03/01 19:28:01
Done.
|
| +NET_EXPORT void GetSubjectAltNameByType(CERTCertificate* cert_handle, |
| + SubjectAltNameType type, |
| + std::vector<std::string>* names); |
| + |
| // Creates all possible OS certificate handles from |data| encoded in a specific |
| // |format|. Returns an empty collection on failure. |
| X509Certificate::OSCertHandles CreateOSCertHandlesFromBytes( |