| OLD | NEW |
| 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #ifndef NET_CERT_X509_UTIL_NSS_H_ | 5 #ifndef NET_CERT_X509_UTIL_NSS_H_ |
| 6 #define NET_CERT_X509_UTIL_NSS_H_ | 6 #define NET_CERT_X509_UTIL_NSS_H_ |
| 7 | 7 |
| 8 #include <stddef.h> | 8 #include <stddef.h> |
| 9 | 9 |
| 10 #include <string> | 10 #include <string> |
| (...skipping 27 matching lines...) Expand all Loading... |
| 38 void ParseDate(const SECItem* der_date, base::Time* result); | 38 void ParseDate(const SECItem* der_date, base::Time* result); |
| 39 | 39 |
| 40 // Parses the serial number from |certificate|. | 40 // Parses the serial number from |certificate|. |
| 41 std::string ParseSerialNumber(const CERTCertificate* certificate); | 41 std::string ParseSerialNumber(const CERTCertificate* certificate); |
| 42 | 42 |
| 43 // Gets the subjectAltName extension field from the certificate, if any. | 43 // Gets the subjectAltName extension field from the certificate, if any. |
| 44 void GetSubjectAltName(CERTCertificate* cert_handle, | 44 void GetSubjectAltName(CERTCertificate* cert_handle, |
| 45 std::vector<std::string>* dns_names, | 45 std::vector<std::string>* dns_names, |
| 46 std::vector<std::string>* ip_addrs); | 46 std::vector<std::string>* ip_addrs); |
| 47 | 47 |
| 48 // Filters subjectAltName list by type. |
| 49 void GetSubjectAltName(CERTCertificate* cert_handle, |
| 50 X509Certificate::SubjectAltNameType type, |
| 51 std::vector<std::string>* names); |
| 52 |
| 48 // Creates all possible OS certificate handles from |data| encoded in a specific | 53 // Creates all possible OS certificate handles from |data| encoded in a specific |
| 49 // |format|. Returns an empty collection on failure. | 54 // |format|. Returns an empty collection on failure. |
| 50 X509Certificate::OSCertHandles CreateOSCertHandlesFromBytes( | 55 X509Certificate::OSCertHandles CreateOSCertHandlesFromBytes( |
| 51 const char* data, | 56 const char* data, |
| 52 size_t length, | 57 size_t length, |
| 53 X509Certificate::Format format); | 58 X509Certificate::Format format); |
| 54 | 59 |
| 55 // Reads a single certificate from |pickle_iter| and returns a platform-specific | 60 // Reads a single certificate from |pickle_iter| and returns a platform-specific |
| 56 // certificate handle. Returns an invalid handle, NULL, on failure. | 61 // certificate handle. Returns an invalid handle, NULL, on failure. |
| 57 X509Certificate::OSCertHandle ReadOSCertHandleFromPickle( | 62 X509Certificate::OSCertHandle ReadOSCertHandleFromPickle( |
| (...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 94 std::string GetUniqueNicknameForSlot(const std::string& nickname, | 99 std::string GetUniqueNicknameForSlot(const std::string& nickname, |
| 95 const SECItem* subject, | 100 const SECItem* subject, |
| 96 PK11SlotInfo* slot); | 101 PK11SlotInfo* slot); |
| 97 #endif // defined(USE_NSS_CERTS) || defined(OS_IOS) | 102 #endif // defined(USE_NSS_CERTS) || defined(OS_IOS) |
| 98 | 103 |
| 99 } // namespace x509_util | 104 } // namespace x509_util |
| 100 | 105 |
| 101 } // namespace net | 106 } // namespace net |
| 102 | 107 |
| 103 #endif // NET_CERT_X509_UTIL_NSS_H_ | 108 #endif // NET_CERT_X509_UTIL_NSS_H_ |
| OLD | NEW |