Chromium Code Reviews| 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/base64.h" | 7 #include "base/base64.h" |
| 8 #include "base/bind.h" | 8 #include "base/bind.h" |
| 9 #include "base/file_util.h" | 9 #include "base/file_util.h" |
| 10 #include "base/files/file_path.h" | 10 #include "base/files/file_path.h" |
| (...skipping 93 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 104 // called. | 104 // called. |
| 105 base::Timer shutdown_timer(false, false); | 105 base::Timer shutdown_timer(false, false); |
| 106 shutdown_timer.Start(FROM_HERE, | 106 shutdown_timer.Start(FROM_HERE, |
| 107 TestTimeouts::action_timeout(), | 107 TestTimeouts::action_timeout(), |
| 108 base::MessageLoop::QuitClosure()); | 108 base::MessageLoop::QuitClosure()); |
| 109 message_loop_.Run(); | 109 message_loop_.Run(); |
| 110 } | 110 } |
| 111 | 111 |
| 112 void OnHostConnected(net::Error error, | 112 void OnHostConnected(net::Error error, |
| 113 scoped_ptr<net::StreamSocket> socket) { | 113 scoped_ptr<net::StreamSocket> socket) { |
| 114 host_auth_.reset(); | |
|
Wez
2014/09/10 02:29:27
Why's this change required?
Sergey Ulanov
2014/09/10 21:50:59
Previously SslHmacChannelAuthenticator wasn't call
Wez
2014/09/10 22:19:42
Acknowledged.
| |
| 114 host_callback_.OnDone(error, socket.get()); | 115 host_callback_.OnDone(error, socket.get()); |
| 115 host_socket_ = socket.Pass(); | 116 host_socket_ = socket.Pass(); |
| 116 } | 117 } |
| 117 | 118 |
| 118 void OnClientConnected(net::Error error, | 119 void OnClientConnected(net::Error error, |
| 119 scoped_ptr<net::StreamSocket> socket) { | 120 scoped_ptr<net::StreamSocket> socket) { |
| 121 client_auth_.reset(); | |
| 120 client_callback_.OnDone(error, socket.get()); | 122 client_callback_.OnDone(error, socket.get()); |
| 121 client_socket_ = socket.Pass(); | 123 client_socket_ = socket.Pass(); |
| 122 } | 124 } |
| 123 | 125 |
| 124 base::MessageLoop message_loop_; | 126 base::MessageLoop message_loop_; |
| 125 | 127 |
| 126 scoped_refptr<RsaKeyPair> key_pair_; | 128 scoped_refptr<RsaKeyPair> key_pair_; |
| 127 std::string host_cert_; | 129 std::string host_cert_; |
| 128 scoped_ptr<FakeSocket> client_fake_socket_; | 130 scoped_ptr<FakeSocket> client_fake_socket_; |
| 129 scoped_ptr<FakeSocket> host_fake_socket_; | 131 scoped_ptr<FakeSocket> host_fake_socket_; |
| (...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 164 host_auth_ = SslHmacChannelAuthenticator::CreateForHost( | 166 host_auth_ = SslHmacChannelAuthenticator::CreateForHost( |
| 165 host_cert_, key_pair_, kTestSharedSecret); | 167 host_cert_, key_pair_, kTestSharedSecret); |
| 166 | 168 |
| 167 RunChannelAuth(true); | 169 RunChannelAuth(true); |
| 168 | 170 |
| 169 ASSERT_TRUE(host_socket_.get() == NULL); | 171 ASSERT_TRUE(host_socket_.get() == NULL); |
| 170 } | 172 } |
| 171 | 173 |
| 172 } // namespace protocol | 174 } // namespace protocol |
| 173 } // namespace remoting | 175 } // namespace remoting |
| OLD | NEW |