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

Side by Side Diff: chrome/browser/chromeos/policy/policy_cert_verifier.h

Issue 13532005: Added a PolicyCertVerifier that uses the trust anchors from the ONC policies. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: skip tests when NSS version is too old Created 7 years, 8 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 | Annotate | Revision Log
OLDNEW
(Empty)
1 // Copyright (c) 2013 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4
5 #ifndef CHROME_BROWSER_CHROMEOS_POLICY_POLICY_CERT_VERIFIER_H_
6 #define CHROME_BROWSER_CHROMEOS_POLICY_POLICY_CERT_VERIFIER_H_
7
8 #include "base/memory/scoped_ptr.h"
9 #include "net/cert/cert_verifier.h"
10
11 namespace net {
12 class CertTrustAnchorProvider;
13 }
14
15 namespace policy {
16
17 // Wraps a MultiThreadedCertVerifier to make it use the additional trust anchors
18 // configured by the ONC user policy.
19 class PolicyCertVerifier : public net::CertVerifier {
20 public:
21 // |profile| is a handle to the Profile whose request context makes use of
22 // this verified. This object can be created on the IO thread; the handle is
23 // only used on the UI thread, if it's still valid.
24 // |trust_anchor_provider| is used to retrieve the current list of trust
25 // anchors.
26 PolicyCertVerifier(void* profile,
27 net::CertTrustAnchorProvider* trust_anchor_provider);
28 virtual ~PolicyCertVerifier();
29
30 // CertVerifier implementation:
31 // Note: |callback| can be null.
32 virtual int Verify(net::X509Certificate* cert,
33 const std::string& hostname,
34 int flags,
35 net::CRLSet* crl_set,
36 net::CertVerifyResult* verify_result,
37 const net::CompletionCallback& callback,
38 RequestHandle* out_req,
39 const net::BoundNetLog& net_log) OVERRIDE;
40
41 virtual void CancelRequest(RequestHandle req) OVERRIDE;
42
43 private:
44 void* profile_;
45 scoped_ptr<CertVerifier> delegate_;
46 };
47
48 } // namespace policy
49
50 #endif // CHROME_BROWSER_CHROMEOS_POLICY_POLICY_CERT_VERIFIER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698