| 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/callback_helpers.h" | 9 #include "base/callback_helpers.h" |
| 10 #include "base/logging.h" | 10 #include "base/logging.h" |
| (...skipping 25 matching lines...) Expand all Loading... |
| 36 FailingCertVerifier() {} | 36 FailingCertVerifier() {} |
| 37 ~FailingCertVerifier() override {} | 37 ~FailingCertVerifier() override {} |
| 38 | 38 |
| 39 int Verify(net::X509Certificate* cert, | 39 int Verify(net::X509Certificate* cert, |
| 40 const std::string& hostname, | 40 const std::string& hostname, |
| 41 const std::string& ocsp_response, | 41 const std::string& ocsp_response, |
| 42 int flags, | 42 int flags, |
| 43 net::CRLSet* crl_set, | 43 net::CRLSet* crl_set, |
| 44 net::CertVerifyResult* verify_result, | 44 net::CertVerifyResult* verify_result, |
| 45 const net::CompletionCallback& callback, | 45 const net::CompletionCallback& callback, |
| 46 RequestHandle* out_req, | 46 scoped_ptr<Request>* out_req, |
| 47 const net::BoundNetLog& net_log) override { | 47 const net::BoundNetLog& net_log) override { |
| 48 verify_result->verified_cert = cert; | 48 verify_result->verified_cert = cert; |
| 49 verify_result->cert_status = net::CERT_STATUS_INVALID; | 49 verify_result->cert_status = net::CERT_STATUS_INVALID; |
| 50 return net::ERR_CERT_INVALID; | 50 return net::ERR_CERT_INVALID; |
| 51 } | 51 } |
| 52 | |
| 53 void CancelRequest(RequestHandle req) override { | |
| 54 NOTIMPLEMENTED(); | |
| 55 } | |
| 56 }; | 52 }; |
| 57 | 53 |
| 58 } // namespace | 54 } // namespace |
| 59 | 55 |
| 60 // static | 56 // static |
| 61 scoped_ptr<SslHmacChannelAuthenticator> | 57 scoped_ptr<SslHmacChannelAuthenticator> |
| 62 SslHmacChannelAuthenticator::CreateForClient( | 58 SslHmacChannelAuthenticator::CreateForClient( |
| 63 const std::string& remote_cert, | 59 const std::string& remote_cert, |
| 64 const std::string& auth_key) { | 60 const std::string& auth_key) { |
| 65 scoped_ptr<SslHmacChannelAuthenticator> result( | 61 scoped_ptr<SslHmacChannelAuthenticator> result( |
| (...skipping 252 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 318 base::ResetAndReturn(&done_callback_).Run(net::OK, socket_.Pass()); | 314 base::ResetAndReturn(&done_callback_).Run(net::OK, socket_.Pass()); |
| 319 } | 315 } |
| 320 } | 316 } |
| 321 | 317 |
| 322 void SslHmacChannelAuthenticator::NotifyError(int error) { | 318 void SslHmacChannelAuthenticator::NotifyError(int error) { |
| 323 base::ResetAndReturn(&done_callback_).Run(error, nullptr); | 319 base::ResetAndReturn(&done_callback_).Run(error, nullptr); |
| 324 } | 320 } |
| 325 | 321 |
| 326 } // namespace protocol | 322 } // namespace protocol |
| 327 } // namespace remoting | 323 } // namespace remoting |
| OLD | NEW |