OLD | NEW |
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 Loading... |
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 Loading... |
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 |
OLD | NEW |