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_CERT_VERIFY_RESULT_H_ | 5 #ifndef NET_CERT_CERT_VERIFY_RESULT_H_ |
6 #define NET_CERT_CERT_VERIFY_RESULT_H_ | 6 #define NET_CERT_CERT_VERIFY_RESULT_H_ |
7 | 7 |
8 #include <vector> | 8 #include <vector> |
9 | 9 |
10 #include "base/memory/ref_counted.h" | 10 #include "base/memory/ref_counted.h" |
11 #include "net/base/net_export.h" | 11 #include "net/base/net_export.h" |
12 #include "net/cert/cert_status_flags.h" | 12 #include "net/cert/cert_status_flags.h" |
13 #include "net/cert/x509_cert_types.h" | 13 #include "net/cert/x509_cert_types.h" |
14 | 14 |
15 namespace net { | 15 namespace net { |
16 | 16 |
17 class X509Certificate; | 17 class X509Certificate; |
18 | 18 |
19 // The result of certificate verification. | 19 // The result of certificate verification. |
20 class NET_EXPORT CertVerifyResult { | 20 class NET_EXPORT CertVerifyResult { |
21 public: | 21 public: |
22 CertVerifyResult(); | 22 CertVerifyResult(); |
23 CertVerifyResult(const CertVerifyResult& other); | 23 CertVerifyResult(const CertVerifyResult& other); |
24 ~CertVerifyResult(); | 24 ~CertVerifyResult(); |
25 | 25 |
26 void Reset(); | 26 void Reset(); |
27 | 27 |
| 28 bool operator==(const CertVerifyResult& other) const; |
| 29 |
28 // The certificate and chain that was constructed during verification. | 30 // The certificate and chain that was constructed during verification. |
29 // Note that the though the verified certificate will match the originally | 31 // Note that the though the verified certificate will match the originally |
30 // supplied certificate, the intermediate certificates stored within may | 32 // supplied certificate, the intermediate certificates stored within may |
31 // be substantially different. In the event of a verification failure, this | 33 // be substantially different. In the event of a verification failure, this |
32 // will contain the chain as supplied by the server. This may be NULL if | 34 // will contain the chain as supplied by the server. This may be NULL if |
33 // running within the sandbox. | 35 // running within the sandbox. |
34 scoped_refptr<X509Certificate> verified_cert; | 36 scoped_refptr<X509Certificate> verified_cert; |
35 | 37 |
36 // Bitmask of CERT_STATUS_* from net/cert/cert_status_flags.h. Note that | 38 // Bitmask of CERT_STATUS_* from net/cert/cert_status_flags.h. Note that |
37 // these status flags apply to the certificate chain returned in | 39 // these status flags apply to the certificate chain returned in |
(...skipping 24 matching lines...) Expand all Loading... |
62 bool is_issued_by_additional_trust_anchor; | 64 bool is_issued_by_additional_trust_anchor; |
63 | 65 |
64 // True if a fallback to the common name was used when matching the host | 66 // True if a fallback to the common name was used when matching the host |
65 // name, rather than using the subjectAltName. | 67 // name, rather than using the subjectAltName. |
66 bool common_name_fallback_used; | 68 bool common_name_fallback_used; |
67 }; | 69 }; |
68 | 70 |
69 } // namespace net | 71 } // namespace net |
70 | 72 |
71 #endif // NET_CERT_CERT_VERIFY_RESULT_H_ | 73 #endif // NET_CERT_CERT_VERIFY_RESULT_H_ |
OLD | NEW |