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 <stdint.h> | 7 #include <stdint.h> |
8 | 8 |
9 #include <utility> | 9 #include <utility> |
10 | 10 |
11 #include "base/bind.h" | 11 #include "base/bind.h" |
12 #include "base/bind_helpers.h" | 12 #include "base/bind_helpers.h" |
13 #include "base/callback_helpers.h" | 13 #include "base/callback_helpers.h" |
14 #include "base/logging.h" | 14 #include "base/logging.h" |
15 #include "build/build_config.h" | 15 #include "build/build_config.h" |
16 #include "crypto/secure_util.h" | 16 #include "crypto/secure_util.h" |
17 #include "net/base/host_port_pair.h" | 17 #include "net/base/host_port_pair.h" |
18 #include "net/base/io_buffer.h" | 18 #include "net/base/io_buffer.h" |
| 19 #include "net/base/ip_address.h" |
19 #include "net/base/net_errors.h" | 20 #include "net/base/net_errors.h" |
20 #include "net/cert/cert_status_flags.h" | 21 #include "net/cert/cert_status_flags.h" |
21 #include "net/cert/cert_verifier.h" | 22 #include "net/cert/cert_verifier.h" |
22 #include "net/cert/cert_verify_result.h" | 23 #include "net/cert/cert_verify_result.h" |
23 #include "net/cert/x509_certificate.h" | 24 #include "net/cert/x509_certificate.h" |
24 #include "net/http/transport_security_state.h" | 25 #include "net/http/transport_security_state.h" |
25 #include "net/socket/client_socket_handle.h" | 26 #include "net/socket/client_socket_handle.h" |
26 #include "net/socket/ssl_client_socket.h" | 27 #include "net/socket/ssl_client_socket.h" |
27 #include "net/socket/ssl_server_socket.h" | 28 #include "net/socket/ssl_server_socket.h" |
28 #include "net/ssl/ssl_config_service.h" | 29 #include "net/ssl/ssl_config_service.h" |
(...skipping 63 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
92 | 93 |
93 int Connect(const net::CompletionCallback& callback) override { | 94 int Connect(const net::CompletionCallback& callback) override { |
94 NOTREACHED(); | 95 NOTREACHED(); |
95 return net::ERR_FAILED; | 96 return net::ERR_FAILED; |
96 } | 97 } |
97 void Disconnect() override { socket_.reset(); } | 98 void Disconnect() override { socket_.reset(); } |
98 bool IsConnected() const override { return true; } | 99 bool IsConnected() const override { return true; } |
99 bool IsConnectedAndIdle() const override { return true; } | 100 bool IsConnectedAndIdle() const override { return true; } |
100 int GetPeerAddress(net::IPEndPoint* address) const override { | 101 int GetPeerAddress(net::IPEndPoint* address) const override { |
101 // SSL sockets call this function so it must return some result. | 102 // SSL sockets call this function so it must return some result. |
102 net::IPAddressNumber ip_address(net::kIPv4AddressSize); | 103 *address = net::IPEndPoint(net::IPAddress::IPv4AllZeros(), 0); |
103 *address = net::IPEndPoint(ip_address, 0); | |
104 return net::OK; | 104 return net::OK; |
105 } | 105 } |
106 int GetLocalAddress(net::IPEndPoint* address) const override { | 106 int GetLocalAddress(net::IPEndPoint* address) const override { |
107 NOTREACHED(); | 107 NOTREACHED(); |
108 return net::ERR_FAILED; | 108 return net::ERR_FAILED; |
109 } | 109 } |
110 const net::BoundNetLog& NetLog() const override { return net_log_; } | 110 const net::BoundNetLog& NetLog() const override { return net_log_; } |
111 void SetSubresourceSpeculation() override { NOTREACHED(); } | 111 void SetSubresourceSpeculation() override { NOTREACHED(); } |
112 void SetOmniboxSpeculation() override { NOTREACHED(); } | 112 void SetOmniboxSpeculation() override { NOTREACHED(); } |
113 bool WasEverUsed() const override { | 113 bool WasEverUsed() const override { |
(...skipping 324 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
438 std::move(socket_), std::move(server_context_)))); | 438 std::move(socket_), std::move(server_context_)))); |
439 } | 439 } |
440 } | 440 } |
441 | 441 |
442 void SslHmacChannelAuthenticator::NotifyError(int error) { | 442 void SslHmacChannelAuthenticator::NotifyError(int error) { |
443 base::ResetAndReturn(&done_callback_).Run(error, nullptr); | 443 base::ResetAndReturn(&done_callback_).Run(error, nullptr); |
444 } | 444 } |
445 | 445 |
446 } // namespace protocol | 446 } // namespace protocol |
447 } // namespace remoting | 447 } // namespace remoting |
OLD | NEW |