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/file_path.h" | 8 #include "base/file_path.h" |
9 #include "base/file_util.h" | 9 #include "base/file_util.h" |
10 #include "base/message_loop.h" | 10 #include "base/message_loop.h" |
(...skipping 86 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
97 host_callback_.OnDone(error, socket.get()); | 97 host_callback_.OnDone(error, socket.get()); |
98 host_socket_ = socket.Pass(); | 98 host_socket_ = socket.Pass(); |
99 } | 99 } |
100 | 100 |
101 void OnClientConnected(net::Error error, | 101 void OnClientConnected(net::Error error, |
102 scoped_ptr<net::StreamSocket> socket) { | 102 scoped_ptr<net::StreamSocket> socket) { |
103 client_callback_.OnDone(error, socket.get()); | 103 client_callback_.OnDone(error, socket.get()); |
104 client_socket_ = socket.Pass(); | 104 client_socket_ = socket.Pass(); |
105 } | 105 } |
106 | 106 |
107 MessageLoop message_loop_; | 107 MessageLoopForIO message_loop_; |
108 | 108 |
109 scoped_ptr<crypto::RSAPrivateKey> private_key_; | 109 scoped_ptr<crypto::RSAPrivateKey> private_key_; |
110 std::string host_cert_; | 110 std::string host_cert_; |
111 scoped_ptr<FakeSocket> client_fake_socket_; | 111 scoped_ptr<FakeSocket> client_fake_socket_; |
112 scoped_ptr<FakeSocket> host_fake_socket_; | 112 scoped_ptr<FakeSocket> host_fake_socket_; |
113 scoped_ptr<ChannelAuthenticator> client_auth_; | 113 scoped_ptr<ChannelAuthenticator> client_auth_; |
114 scoped_ptr<ChannelAuthenticator> host_auth_; | 114 scoped_ptr<ChannelAuthenticator> host_auth_; |
115 MockChannelDoneCallback client_callback_; | 115 MockChannelDoneCallback client_callback_; |
116 MockChannelDoneCallback host_callback_; | 116 MockChannelDoneCallback host_callback_; |
117 scoped_ptr<net::StreamSocket> client_socket_; | 117 scoped_ptr<net::StreamSocket> client_socket_; |
(...skipping 29 matching lines...) Expand all Loading... |
147 host_auth_ = SslHmacChannelAuthenticator::CreateForHost( | 147 host_auth_ = SslHmacChannelAuthenticator::CreateForHost( |
148 host_cert_, private_key_.get(), kTestSharedSecret); | 148 host_cert_, private_key_.get(), kTestSharedSecret); |
149 | 149 |
150 RunChannelAuth(true); | 150 RunChannelAuth(true); |
151 | 151 |
152 EXPECT_TRUE(host_socket_.get() == NULL); | 152 EXPECT_TRUE(host_socket_.get() == NULL); |
153 } | 153 } |
154 | 154 |
155 } // namespace protocol | 155 } // namespace protocol |
156 } // namespace remoting | 156 } // namespace remoting |
OLD | NEW |