Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(157)

Side by Side Diff: net/cert/mock_cert_verifier.h

Issue 1115903002: Refactor the API for CertVerifier::Verify() and the implementation of MultiThreadedCertVerifier::Ver (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebase onto master Created 5 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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_MOCK_CERT_VERIFIER_H_ 5 #ifndef NET_CERT_MOCK_CERT_VERIFIER_H_
6 #define NET_CERT_MOCK_CERT_VERIFIER_H_ 6 #define NET_CERT_MOCK_CERT_VERIFIER_H_
7 7
8 #include <list> 8 #include <list>
9 9
10 #include "net/cert/cert_verifier.h" 10 #include "net/cert/cert_verifier.h"
(...skipping 14 matching lines...) Expand all
25 ~MockCertVerifier() override; 25 ~MockCertVerifier() override;
26 26
27 // CertVerifier implementation 27 // CertVerifier implementation
28 int Verify(X509Certificate* cert, 28 int Verify(X509Certificate* cert,
29 const std::string& hostname, 29 const std::string& hostname,
30 const std::string& ocsp_response, 30 const std::string& ocsp_response,
31 int flags, 31 int flags,
32 CRLSet* crl_set, 32 CRLSet* crl_set,
33 CertVerifyResult* verify_result, 33 CertVerifyResult* verify_result,
34 const CompletionCallback& callback, 34 const CompletionCallback& callback,
35 RequestHandle* out_req, 35 scoped_ptr<Request>* out_req,
36 const BoundNetLog& net_log) override; 36 const BoundNetLog& net_log) override;
37 void CancelRequest(RequestHandle req) override;
38 37
39 // Sets the default return value for Verify() for certificates/hosts that do 38 // Sets the default return value for Verify() for certificates/hosts that do
40 // not have explicit results added via the AddResult*() methods. 39 // not have explicit results added via the AddResult*() methods.
41 void set_default_result(int default_result) { 40 void set_default_result(int default_result) {
42 default_result_ = default_result; 41 default_result_ = default_result;
43 } 42 }
44 43
45 // Adds a rule that will cause any call to Verify() for |cert| to return rv, 44 // Adds a rule that will cause any call to Verify() for |cert| to return rv,
46 // copying |verify_result| into the verified result. 45 // copying |verify_result| into the verified result.
47 // Note: Only the primary certificate of |cert| is checked. Any intermediate 46 // Note: Only the primary certificate of |cert| is checked. Any intermediate
(...skipping 13 matching lines...) Expand all
61 struct Rule; 60 struct Rule;
62 typedef std::list<Rule> RuleList; 61 typedef std::list<Rule> RuleList;
63 62
64 int default_result_; 63 int default_result_;
65 RuleList rules_; 64 RuleList rules_;
66 }; 65 };
67 66
68 } // namespace net 67 } // namespace net
69 68
70 #endif // NET_CERT_MOCK_CERT_VERIFIER_H_ 69 #endif // NET_CERT_MOCK_CERT_VERIFIER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698