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

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

Issue 1696563002: Blimp: add support for SSL connections. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Address wez feedback 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 #include "base/callback.h"
6 #include "base/macros.h"
7 #include "base/memory/scoped_ptr.h"
8 #include "blimp/net/exact_match_cert_verifier.h"
Ryan Sleevi 2016/02/19 22:56:08 STYLE: This should be at the top of the file, befo
Kevin M 2016/02/22 22:53:32 Done.
9 #include "net/base/net_errors.h"
10 #include "net/cert/cert_verifier.h"
11 #include "net/cert/cert_verify_result.h"
12 #include "net/cert/x509_certificate.h"
13
14 namespace blimp {
15
16 ExactMatchCertVerifier::ExactMatchCertVerifier(
17 scoped_refptr<net::X509Certificate> engine_cert)
18 : engine_cert_(engine_cert) {}
Ryan Sleevi 2016/02/19 22:56:08 STYLE: You're passing a scoped_refptr<> as non-con
Kevin M 2016/02/22 22:53:31 Done. I converted this parameter into a const refe
Ryan Sleevi 2016/02/23 02:26:26 https://groups.google.com/a/chromium.org/d/msg/chr
Kevin M 2016/02/23 20:26:46 Done.
19
20 ExactMatchCertVerifier::~ExactMatchCertVerifier() {}
21
22 int ExactMatchCertVerifier::Verify(net::X509Certificate* cert,
23 const std::string&,
24 const std::string&,
25 int,
26 net::CRLSet*,
27 net::CertVerifyResult* verify_result,
28 const net::CompletionCallback&,
29 scoped_ptr<net::CertVerifier::Request>*,
30 const net::BoundNetLog&) {
31 verify_result->Reset();
32
33 if (!cert->Equals(engine_cert_.get())) {
Ryan Sleevi 2016/02/19 22:56:08 BUG: You return an error code but fail to set the
Kevin M 2016/02/22 22:53:32 Done.
34 return net::ERR_CERT_INVALID;
35 }
36
37 verify_result->verified_cert = cert;
Ryan Sleevi 2016/02/19 22:56:08 POTENTIAL BUG: You fail to fill in public_key_hash
Kevin M 2016/02/22 22:53:31 Done.
38 return net::OK;
39 }
40
41 } // namespace blimp
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698