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

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

Issue 1696563002: Blimp: add support for SSL connections. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 10 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
(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_BLIMP_CERT_VERIFIER_H_
6 #define BLIMP_NET_BLIMP_CERT_VERIFIER_H_
7
8 #include <string>
9
10 #include "blimp/net/blimp_net_export.h"
11 #include "net/cert/cert_verifier.h"
12
13 namespace blimp {
14
15 // Checks if the peer certificate is an exact match to the X509 certificate
16 // supplied out-of-band by the Blimp Assigner.
17 // Rejects all other certificates.
Wez 2016/02/12 02:31:14 Suggest: "Rejects all certificates other than the
Kevin M 2016/02/13 00:44:18 Done.
18 class BLIMP_NET_EXPORT BlimpCertVerifier : public net::CertVerifier {
Wez 2016/02/12 21:42:38 Is there anything actually Blimp specific about th
Kevin M 2016/02/13 00:44:18 Done.
19 public:
20 // |assigned_cert|: The one allowable certificate.
21 explicit BlimpCertVerifier(scoped_refptr<net::X509Certificate> assigned_cert);
22
23 ~BlimpCertVerifier() override;
24
25 // net::CertVerifier implementation.
26 int Verify(net::X509Certificate* cert,
27 const std::string&,
28 const std::string&,
29 int,
30 net::CRLSet*,
31 net::CertVerifyResult* verify_result,
32 const net::CompletionCallback&,
33 scoped_ptr<net::CertVerifier::Request>*,
34 const net::BoundNetLog&) override;
35
36 private:
37 scoped_refptr<net::X509Certificate> assigned_cert_;
38
39 DISALLOW_COPY_AND_ASSIGN(BlimpCertVerifier);
40 };
41
42 } // namespace blimp
43
44 #endif // BLIMP_NET_BLIMP_CERT_VERIFIER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698