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

Side by Side Diff: blimp/net/exact_match_cert_verifier.h

Issue 2632803002: Remove all blimp network code. (Closed)
Patch Set: merge from origin/master for good measure Created 3 years, 11 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
« no previous file with comments | « blimp/net/engine_connection_manager_unittest.cc ('k') | blimp/net/exact_match_cert_verifier.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
1 // Copyright 2016 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 BLIMP_NET_EXACT_MATCH_CERT_VERIFIER_H_
6 #define BLIMP_NET_EXACT_MATCH_CERT_VERIFIER_H_
7
8 #include <string>
9 #include <vector>
10
11 #include "blimp/net/blimp_net_export.h"
12 #include "net/cert/cert_verifier.h"
13
14 namespace net {
15 class HashValue;
16 } // namespace net
17
18 namespace blimp {
19
20 // Checks if the peer certificate is an exact match to the X.509 certificate
21 // |engine_cert|, which is specified at class construction time.
22 class BLIMP_NET_EXPORT ExactMatchCertVerifier : public net::CertVerifier {
23 public:
24 // |engine_cert|: The single allowable certificate.
25 explicit ExactMatchCertVerifier(
26 scoped_refptr<net::X509Certificate> engine_cert);
27
28 ~ExactMatchCertVerifier() override;
29
30 // net::CertVerifier implementation.
31 int Verify(const RequestParams& params,
32 net::CRLSet* crl_set,
33 net::CertVerifyResult* verify_result,
34 const net::CompletionCallback& callback,
35 std::unique_ptr<Request>* out_req,
36 const net::NetLogWithSource& net_log) override;
37
38 private:
39 scoped_refptr<net::X509Certificate> engine_cert_;
40 std::vector<net::HashValue> engine_cert_hashes_;
41
42 DISALLOW_COPY_AND_ASSIGN(ExactMatchCertVerifier);
43 };
44
45 } // namespace blimp
46
47 #endif // BLIMP_NET_EXACT_MATCH_CERT_VERIFIER_H_
OLDNEW
« no previous file with comments | « blimp/net/engine_connection_manager_unittest.cc ('k') | blimp/net/exact_match_cert_verifier.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698