| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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_CERT_TYPES_H_ | 5 #ifndef NET_CERT_X509_CERT_TYPES_H_ |
| 6 #define NET_CERT_X509_CERT_TYPES_H_ | 6 #define NET_CERT_X509_CERT_TYPES_H_ |
| 7 | 7 |
| 8 #include <stddef.h> | 8 #include <stddef.h> |
| 9 #include <string.h> | 9 #include <string.h> |
| 10 | 10 |
| (...skipping 12 matching lines...) Expand all Loading... |
| 23 #if defined(OS_MACOSX) && !defined(OS_IOS) | 23 #if defined(OS_MACOSX) && !defined(OS_IOS) |
| 24 #include <Security/x509defs.h> | 24 #include <Security/x509defs.h> |
| 25 #endif | 25 #endif |
| 26 | 26 |
| 27 namespace base { | 27 namespace base { |
| 28 class Time; | 28 class Time; |
| 29 } // namespace base | 29 } // namespace base |
| 30 | 30 |
| 31 namespace net { | 31 namespace net { |
| 32 | 32 |
| 33 class X509Certificate; | |
| 34 | |
| 35 // CertPrincipal represents the issuer or subject field of an X.509 certificate. | 33 // CertPrincipal represents the issuer or subject field of an X.509 certificate. |
| 36 struct NET_EXPORT CertPrincipal { | 34 struct NET_EXPORT CertPrincipal { |
| 37 CertPrincipal(); | 35 CertPrincipal(); |
| 38 explicit CertPrincipal(const std::string& name); | 36 explicit CertPrincipal(const std::string& name); |
| 39 ~CertPrincipal(); | 37 ~CertPrincipal(); |
| 40 | 38 |
| 41 #if (defined(OS_MACOSX) && !defined(OS_IOS)) || defined(OS_WIN) | 39 #if (defined(OS_MACOSX) && !defined(OS_IOS)) || defined(OS_WIN) |
| 42 // Parses a BER-format DistinguishedName. | 40 // Parses a BER-format DistinguishedName. |
| 43 bool ParseDistinguishedName(const void* ber_name_data, size_t length); | 41 bool ParseDistinguishedName(const void* ber_name_data, size_t length); |
| 44 #endif | 42 #endif |
| (...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 90 // Attempts to parse |raw_date|, an ASN.1 date/time string encoded as | 88 // Attempts to parse |raw_date|, an ASN.1 date/time string encoded as |
| 91 // |format|, and writes the result into |*time|. If an invalid date is | 89 // |format|, and writes the result into |*time|. If an invalid date is |
| 92 // specified, or if parsing fails, returns false, and |*time| will not be | 90 // specified, or if parsing fails, returns false, and |*time| will not be |
| 93 // updated. | 91 // updated. |
| 94 NET_EXPORT_PRIVATE bool ParseCertificateDate(const base::StringPiece& raw_date, | 92 NET_EXPORT_PRIVATE bool ParseCertificateDate(const base::StringPiece& raw_date, |
| 95 CertDateFormat format, | 93 CertDateFormat format, |
| 96 base::Time* time); | 94 base::Time* time); |
| 97 } // namespace net | 95 } // namespace net |
| 98 | 96 |
| 99 #endif // NET_CERT_X509_CERT_TYPES_H_ | 97 #endif // NET_CERT_X509_CERT_TYPES_H_ |
| OLD | NEW |