| 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_BASE_X509_CERTIFICATE_H_ | 5 #ifndef NET_BASE_X509_CERTIFICATE_H_ |
| 6 #define NET_BASE_X509_CERTIFICATE_H_ | 6 #define NET_BASE_X509_CERTIFICATE_H_ |
| 7 | 7 |
| 8 #include <string.h> | 8 #include <string.h> |
| 9 | 9 |
| 10 #include <string> | 10 #include <string> |
| (...skipping 70 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 81 kPublicKeyTypeDH, | 81 kPublicKeyTypeDH, |
| 82 kPublicKeyTypeECDH | 82 kPublicKeyTypeECDH |
| 83 }; | 83 }; |
| 84 | 84 |
| 85 // Predicate functor used in maps when X509Certificate is used as the key. | 85 // Predicate functor used in maps when X509Certificate is used as the key. |
| 86 class NET_EXPORT LessThan { | 86 class NET_EXPORT LessThan { |
| 87 public: | 87 public: |
| 88 bool operator() (X509Certificate* lhs, X509Certificate* rhs) const; | 88 bool operator() (X509Certificate* lhs, X509Certificate* rhs) const; |
| 89 }; | 89 }; |
| 90 | 90 |
| 91 enum VerifyFlags { | |
| 92 VERIFY_REV_CHECKING_ENABLED = 1 << 0, | |
| 93 VERIFY_EV_CERT = 1 << 1, | |
| 94 VERIFY_CERT_IO_ENABLED = 1 << 2, | |
| 95 }; | |
| 96 | |
| 97 enum Format { | 91 enum Format { |
| 98 // The data contains a single DER-encoded certificate, or a PEM-encoded | 92 // The data contains a single DER-encoded certificate, or a PEM-encoded |
| 99 // DER certificate with the PEM encoding block name of "CERTIFICATE". | 93 // DER certificate with the PEM encoding block name of "CERTIFICATE". |
| 100 // Any subsequent blocks will be ignored. | 94 // Any subsequent blocks will be ignored. |
| 101 FORMAT_SINGLE_CERTIFICATE = 1 << 0, | 95 FORMAT_SINGLE_CERTIFICATE = 1 << 0, |
| 102 | 96 |
| 103 // The data contains a sequence of one or more PEM-encoded, DER | 97 // The data contains a sequence of one or more PEM-encoded, DER |
| 104 // certificates, with the PEM encoding block name of "CERTIFICATE". | 98 // certificates, with the PEM encoding block name of "CERTIFICATE". |
| 105 // All PEM blocks will be parsed, until the first error is encountered. | 99 // All PEM blocks will be parsed, until the first error is encountered. |
| 106 FORMAT_PEM_CERT_SEQUENCE = 1 << 1, | 100 FORMAT_PEM_CERT_SEQUENCE = 1 << 1, |
| (...skipping 410 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 517 // based on the type of the certificate. | 511 // based on the type of the certificate. |
| 518 std::string default_nickname_; | 512 std::string default_nickname_; |
| 519 #endif | 513 #endif |
| 520 | 514 |
| 521 DISALLOW_COPY_AND_ASSIGN(X509Certificate); | 515 DISALLOW_COPY_AND_ASSIGN(X509Certificate); |
| 522 }; | 516 }; |
| 523 | 517 |
| 524 } // namespace net | 518 } // namespace net |
| 525 | 519 |
| 526 #endif // NET_BASE_X509_CERTIFICATE_H_ | 520 #endif // NET_BASE_X509_CERTIFICATE_H_ |
| OLD | NEW |