| 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_CERTIFICATE_H_ | 5 #ifndef NET_CERT_X509_CERTIFICATE_H_ |
| 6 #define NET_CERT_X509_CERTIFICATE_H_ | 6 #define NET_CERT_X509_CERTIFICATE_H_ |
| 7 | 7 |
| 8 #include <string.h> | 8 #include <string.h> |
| 9 | 9 |
| 10 #include <string> | 10 #include <string> |
| (...skipping 199 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 210 // certificate is invalid before the |valid_start| date and invalid after | 210 // certificate is invalid before the |valid_start| date and invalid after |
| 211 // the |valid_expiry| date. | 211 // the |valid_expiry| date. |
| 212 // If we were unable to parse either date from the certificate (or if the cert | 212 // If we were unable to parse either date from the certificate (or if the cert |
| 213 // lacks either date), the date will be null (i.e., is_null() will be true). | 213 // lacks either date), the date will be null (i.e., is_null() will be true). |
| 214 const base::Time& valid_start() const { return valid_start_; } | 214 const base::Time& valid_start() const { return valid_start_; } |
| 215 const base::Time& valid_expiry() const { return valid_expiry_; } | 215 const base::Time& valid_expiry() const { return valid_expiry_; } |
| 216 | 216 |
| 217 // The fingerprint of this certificate. | 217 // The fingerprint of this certificate. |
| 218 const SHA1HashValue& fingerprint() const { return fingerprint_; } | 218 const SHA1HashValue& fingerprint() const { return fingerprint_; } |
| 219 | 219 |
| 220 // The SHA-256 fingerprint of this certificate. |
| 221 const SHA256HashValue fingerprint256() const; |
| 222 |
| 220 // The fingerprint of the intermediate CA certificates. | 223 // The fingerprint of the intermediate CA certificates. |
| 221 const SHA1HashValue& ca_fingerprint() const { | 224 const SHA1HashValue& ca_fingerprint() const { |
| 222 return ca_fingerprint_; | 225 return ca_fingerprint_; |
| 223 } | 226 } |
| 224 | 227 |
| 225 // Gets the DNS names in the certificate. Pursuant to RFC 2818, Section 3.1 | 228 // Gets the DNS names in the certificate. Pursuant to RFC 2818, Section 3.1 |
| 226 // Server Identity, if the certificate has a subjectAltName extension of | 229 // Server Identity, if the certificate has a subjectAltName extension of |
| 227 // type dNSName, this method gets the DNS names in that extension. | 230 // type dNSName, this method gets the DNS names in that extension. |
| 228 // Otherwise, it gets the common name in the subject field. | 231 // Otherwise, it gets the common name in the subject field. |
| 229 void GetDNSNames(std::vector<std::string>* dns_names) const; | 232 void GetDNSNames(std::vector<std::string>* dns_names) const; |
| (...skipping 280 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 510 // based on the type of the certificate. | 513 // based on the type of the certificate. |
| 511 std::string default_nickname_; | 514 std::string default_nickname_; |
| 512 #endif | 515 #endif |
| 513 | 516 |
| 514 DISALLOW_COPY_AND_ASSIGN(X509Certificate); | 517 DISALLOW_COPY_AND_ASSIGN(X509Certificate); |
| 515 }; | 518 }; |
| 516 | 519 |
| 517 } // namespace net | 520 } // namespace net |
| 518 | 521 |
| 519 #endif // NET_CERT_X509_CERTIFICATE_H_ | 522 #endif // NET_CERT_X509_CERTIFICATE_H_ |
| OLD | NEW |