| 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 "base/pickle.h" |
| 11 #include "net/base/net_export.h" | 12 #include "net/base/net_export.h" |
| 12 #include "net/cert/cert_status_flags.h" | 13 #include "net/cert/cert_status_flags.h" |
| 13 #include "net/cert/x509_cert_types.h" | 14 #include "net/cert/x509_cert_types.h" |
| 14 | 15 |
| 15 namespace net { | 16 namespace net { |
| 16 | 17 |
| 17 class X509Certificate; | 18 class X509Certificate; |
| 18 | 19 |
| 19 // The result of certificate verification. | 20 // The result of certificate verification. |
| 20 class NET_EXPORT CertVerifyResult { | 21 class NET_EXPORT CertVerifyResult { |
| 21 public: | 22 public: |
| 22 CertVerifyResult(); | 23 CertVerifyResult(); |
| 23 CertVerifyResult(const CertVerifyResult& other); | 24 CertVerifyResult(const CertVerifyResult& other); |
| 24 ~CertVerifyResult(); | 25 ~CertVerifyResult(); |
| 25 | 26 |
| 27 // Appends a representation of this object to the given pickle. |
| 28 bool Persist(base::Pickle* pickle) const; |
| 29 |
| 30 // Create an CertVerifyResult from the representation stored in the given |
| 31 // pickle. The data for this object is found relative to the given |
| 32 // pickle_iter, which should be passed to the pickle's various Read* methods. |
| 33 // Returns false on failure. |
| 34 static bool CreateFromPickle(base::PickleIterator* iter, |
| 35 CertVerifyResult* result); |
| 36 |
| 26 void Reset(); | 37 void Reset(); |
| 27 | 38 |
| 28 // Copies from |other| to |this|. | 39 // Copies from |other| to |this|. |
| 29 void CopyFrom(const CertVerifyResult& other) { | 40 void CopyFrom(const CertVerifyResult& other) { |
| 30 *this = other; | 41 *this = other; |
| 31 } | 42 } |
| 32 | 43 |
| 33 // The certificate and chain that was constructed during verification. | 44 // The certificate and chain that was constructed during verification. |
| 34 // Note that the though the verified certificate will match the originally | 45 // Note that the though the verified certificate will match the originally |
| 35 // supplied certificate, the intermediate certificates stored within may | 46 // supplied certificate, the intermediate certificates stored within may |
| (...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 67 bool is_issued_by_additional_trust_anchor; | 78 bool is_issued_by_additional_trust_anchor; |
| 68 | 79 |
| 69 // True if a fallback to the common name was used when matching the host | 80 // True if a fallback to the common name was used when matching the host |
| 70 // name, rather than using the subjectAltName. | 81 // name, rather than using the subjectAltName. |
| 71 bool common_name_fallback_used; | 82 bool common_name_fallback_used; |
| 72 }; | 83 }; |
| 73 | 84 |
| 74 } // namespace net | 85 } // namespace net |
| 75 | 86 |
| 76 #endif // NET_CERT_CERT_VERIFY_RESULT_H_ | 87 #endif // NET_CERT_CERT_VERIFY_RESULT_H_ |
| OLD | NEW |