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 67 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
78 kPublicKeyTypeRSA, | 78 kPublicKeyTypeRSA, |
79 kPublicKeyTypeDSA, | 79 kPublicKeyTypeDSA, |
80 kPublicKeyTypeECDSA, | 80 kPublicKeyTypeECDSA, |
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()(const scoped_refptr<X509Certificate>& lhs, |
| 89 const scoped_refptr<X509Certificate>& rhs) const; |
89 }; | 90 }; |
90 | 91 |
91 enum Format { | 92 enum Format { |
92 // The data contains a single DER-encoded certificate, or a PEM-encoded | 93 // The data contains a single DER-encoded certificate, or a PEM-encoded |
93 // DER certificate with the PEM encoding block name of "CERTIFICATE". | 94 // DER certificate with the PEM encoding block name of "CERTIFICATE". |
94 // Any subsequent blocks will be ignored. | 95 // Any subsequent blocks will be ignored. |
95 FORMAT_SINGLE_CERTIFICATE = 1 << 0, | 96 FORMAT_SINGLE_CERTIFICATE = 1 << 0, |
96 | 97 |
97 // The data contains a sequence of one or more PEM-encoded, DER | 98 // The data contains a sequence of one or more PEM-encoded, DER |
98 // certificates, with the PEM encoding block name of "CERTIFICATE". | 99 // certificates, with the PEM encoding block name of "CERTIFICATE". |
(...skipping 399 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
498 // based on the type of the certificate. | 499 // based on the type of the certificate. |
499 std::string default_nickname_; | 500 std::string default_nickname_; |
500 #endif | 501 #endif |
501 | 502 |
502 DISALLOW_COPY_AND_ASSIGN(X509Certificate); | 503 DISALLOW_COPY_AND_ASSIGN(X509Certificate); |
503 }; | 504 }; |
504 | 505 |
505 } // namespace net | 506 } // namespace net |
506 | 507 |
507 #endif // NET_CERT_X509_CERTIFICATE_H_ | 508 #endif // NET_CERT_X509_CERTIFICATE_H_ |
OLD | NEW |