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..d1b7310b47eaa20a96440ce8a46e68d0b674f10b 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). |
| +enum SubjectAltNameType { |
| + SAN_RFC822_NAME, |
| + SAN_DNS_NAME, |
| + SAN_URI, |
| + SAN_IP_ADDRESS, |
| + SAN_UPN, |
| +}; |
| + |
| // 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. |
| +void NET_EXPORT GetSubjectAltName(CERTCertificate* cert_handle, |
| + SubjectAltNameType type, |
| + std::vector<std::string>* names); |
|
stevenjb
2016/02/29 22:05:03
Avoid having two identical function names with dif
Kevin Cernekee
2016/02/29 22:52:01
Done.
|
| + |
| // Creates all possible OS certificate handles from |data| encoded in a specific |
| // |format|. Returns an empty collection on failure. |
| X509Certificate::OSCertHandles CreateOSCertHandlesFromBytes( |