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

Side by Side Diff: remoting/protocol/ssl_hmac_channel_authenticator.cc

Issue 1081913003: Route OCSP stapling through CertVerifier. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@boringnss
Patch Set: yet another CrOS-only Verify call Created 5 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
« no previous file with comments | « net/socket/ssl_client_socket_openssl.cc ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 #include "remoting/protocol/ssl_hmac_channel_authenticator.h" 5 #include "remoting/protocol/ssl_hmac_channel_authenticator.h"
6 6
7 #include "base/bind.h" 7 #include "base/bind.h"
8 #include "base/bind_helpers.h" 8 #include "base/bind_helpers.h"
9 #include "base/logging.h" 9 #include "base/logging.h"
10 #include "crypto/secure_util.h" 10 #include "crypto/secure_util.h"
(...skipping 19 matching lines...) Expand all
30 namespace { 30 namespace {
31 31
32 // A CertVerifier which rejects every certificate. 32 // A CertVerifier which rejects every certificate.
33 class FailingCertVerifier : public net::CertVerifier { 33 class FailingCertVerifier : public net::CertVerifier {
34 public: 34 public:
35 FailingCertVerifier() {} 35 FailingCertVerifier() {}
36 ~FailingCertVerifier() override {} 36 ~FailingCertVerifier() override {}
37 37
38 int Verify(net::X509Certificate* cert, 38 int Verify(net::X509Certificate* cert,
39 const std::string& hostname, 39 const std::string& hostname,
40 const std::string& ocsp_response,
40 int flags, 41 int flags,
41 net::CRLSet* crl_set, 42 net::CRLSet* crl_set,
42 net::CertVerifyResult* verify_result, 43 net::CertVerifyResult* verify_result,
43 const net::CompletionCallback& callback, 44 const net::CompletionCallback& callback,
44 RequestHandle* out_req, 45 RequestHandle* out_req,
45 const net::BoundNetLog& net_log) override { 46 const net::BoundNetLog& net_log) override {
46 verify_result->verified_cert = cert; 47 verify_result->verified_cert = cert;
47 verify_result->cert_status = net::CERT_STATUS_INVALID; 48 verify_result->cert_status = net::CERT_STATUS_INVALID;
48 return net::ERR_CERT_INVALID; 49 return net::ERR_CERT_INVALID;
49 } 50 }
(...skipping 274 matching lines...) Expand 10 before | Expand all | Expand 10 after
324 void SslHmacChannelAuthenticator::CallDoneCallback( 325 void SslHmacChannelAuthenticator::CallDoneCallback(
325 int error, 326 int error,
326 scoped_ptr<net::StreamSocket> socket) { 327 scoped_ptr<net::StreamSocket> socket) {
327 DoneCallback callback = done_callback_; 328 DoneCallback callback = done_callback_;
328 done_callback_.Reset(); 329 done_callback_.Reset();
329 callback.Run(error, socket.Pass()); 330 callback.Run(error, socket.Pass());
330 } 331 }
331 332
332 } // namespace protocol 333 } // namespace protocol
333 } // namespace remoting 334 } // namespace remoting
OLDNEW
« no previous file with comments | « net/socket/ssl_client_socket_openssl.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698