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_BASE_CERT_VERIFIER_H_ | 5 #ifndef NET_BASE_CERT_VERIFIER_H_ |
6 #define NET_BASE_CERT_VERIFIER_H_ | 6 #define NET_BASE_CERT_VERIFIER_H_ |
7 #pragma once | 7 #pragma once |
8 | 8 |
9 #include <map> | 9 #include <map> |
10 #include <string> | 10 #include <string> |
(...skipping 53 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
64 }; | 64 }; |
65 | 65 |
66 CertVerifier(); | 66 CertVerifier(); |
67 | 67 |
68 // Used by unit tests to mock the current time. Takes ownership of | 68 // Used by unit tests to mock the current time. Takes ownership of |
69 // |time_service|. | 69 // |time_service|. |
70 explicit CertVerifier(TimeService* time_service); | 70 explicit CertVerifier(TimeService* time_service); |
71 | 71 |
72 // When the verifier is destroyed, all certificate verifications requests are | 72 // When the verifier is destroyed, all certificate verifications requests are |
73 // canceled, and their completion callbacks will not be called. | 73 // canceled, and their completion callbacks will not be called. |
74 ~CertVerifier(); | 74 virtual ~CertVerifier(); |
75 | 75 |
76 // Verifies the given certificate against the given hostname. Returns OK if | 76 // Verifies the given certificate against the given hostname. Returns OK if |
77 // successful or an error code upon failure. | 77 // successful or an error code upon failure. |
78 // | 78 // |
79 // The |*verify_result| structure, including the |verify_result->cert_status| | 79 // The |*verify_result| structure, including the |verify_result->cert_status| |
80 // bitmask, is always filled out regardless of the return value. If the | 80 // bitmask, is always filled out regardless of the return value. If the |
81 // certificate has multiple errors, the corresponding status flags are set in | 81 // certificate has multiple errors, the corresponding status flags are set in |
82 // |verify_result->cert_status|, and the error code for the most serious | 82 // |verify_result->cert_status|, and the error code for the most serious |
83 // error is returned. | 83 // error is returned. |
84 // | 84 // |
(...skipping 127 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
212 | 212 |
213 // Completion callback for when request to |cert_verifier_| completes. | 213 // Completion callback for when request to |cert_verifier_| completes. |
214 CompletionCallbackImpl<SingleRequestCertVerifier> callback_; | 214 CompletionCallbackImpl<SingleRequestCertVerifier> callback_; |
215 | 215 |
216 DISALLOW_COPY_AND_ASSIGN(SingleRequestCertVerifier); | 216 DISALLOW_COPY_AND_ASSIGN(SingleRequestCertVerifier); |
217 }; | 217 }; |
218 | 218 |
219 } // namespace net | 219 } // namespace net |
220 | 220 |
221 #endif // NET_BASE_CERT_VERIFIER_H_ | 221 #endif // NET_BASE_CERT_VERIFIER_H_ |
OLD | NEW |