| 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" |
| 11 #include "crypto/secure_util.h" | 11 #include "crypto/secure_util.h" |
| 12 #include "net/base/host_port_pair.h" | 12 #include "net/base/host_port_pair.h" |
| 13 #include "net/base/io_buffer.h" | 13 #include "net/base/io_buffer.h" |
| 14 #include "net/base/net_errors.h" | 14 #include "net/base/net_errors.h" |
| 15 #include "net/cert/cert_status_flags.h" | 15 #include "net/cert/cert_status_flags.h" |
| 16 #include "net/cert/cert_verifier.h" | 16 #include "net/cert/cert_verifier.h" |
| 17 #include "net/cert/cert_verify_result.h" |
| 17 #include "net/cert/x509_certificate.h" | 18 #include "net/cert/x509_certificate.h" |
| 18 #include "net/http/transport_security_state.h" | 19 #include "net/http/transport_security_state.h" |
| 19 #include "net/socket/client_socket_factory.h" | |
| 20 #include "net/socket/client_socket_handle.h" | 20 #include "net/socket/client_socket_handle.h" |
| 21 #include "net/socket/ssl_client_socket.h" | 21 #include "net/socket/ssl_client_socket.h" |
| 22 #include "net/socket/ssl_client_socket_openssl.h" | |
| 23 #include "net/socket/ssl_server_socket.h" | 22 #include "net/socket/ssl_server_socket.h" |
| 24 #include "net/ssl/ssl_config_service.h" | 23 #include "net/ssl/ssl_config_service.h" |
| 25 #include "remoting/base/rsa_key_pair.h" | 24 #include "remoting/base/rsa_key_pair.h" |
| 26 #include "remoting/protocol/auth_util.h" | 25 #include "remoting/protocol/auth_util.h" |
| 27 | 26 |
| 27 #if defined(OS_NACL) |
| 28 #include "net/socket/ssl_client_socket_openssl.h" |
| 29 #else |
| 30 #include "net/socket/client_socket_factory.h" |
| 31 #endif |
| 32 |
| 28 namespace remoting { | 33 namespace remoting { |
| 29 namespace protocol { | 34 namespace protocol { |
| 30 | 35 |
| 31 namespace { | 36 namespace { |
| 32 | 37 |
| 33 // A CertVerifier which rejects every certificate. | 38 // A CertVerifier which rejects every certificate. |
| 34 class FailingCertVerifier : public net::CertVerifier { | 39 class FailingCertVerifier : public net::CertVerifier { |
| 35 public: | 40 public: |
| 36 FailingCertVerifier() {} | 41 FailingCertVerifier() {} |
| 37 ~FailingCertVerifier() override {} | 42 ~FailingCertVerifier() override {} |
| (...skipping 278 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 316 base::ResetAndReturn(&done_callback_).Run(net::OK, socket_.Pass()); | 321 base::ResetAndReturn(&done_callback_).Run(net::OK, socket_.Pass()); |
| 317 } | 322 } |
| 318 } | 323 } |
| 319 | 324 |
| 320 void SslHmacChannelAuthenticator::NotifyError(int error) { | 325 void SslHmacChannelAuthenticator::NotifyError(int error) { |
| 321 base::ResetAndReturn(&done_callback_).Run(error, nullptr); | 326 base::ResetAndReturn(&done_callback_).Run(error, nullptr); |
| 322 } | 327 } |
| 323 | 328 |
| 324 } // namespace protocol | 329 } // namespace protocol |
| 325 } // namespace remoting | 330 } // namespace remoting |
| OLD | NEW |