| Index: remoting/protocol/channel_authenticator.h
|
| diff --git a/remoting/protocol/channel_authenticator.h b/remoting/protocol/channel_authenticator.h
|
| index 4d2dc0591a8fbb09d0babe5598cd158b6993aad9..a95fd3d543ad4e78b0e054e49bcd94c60b0e86a1 100644
|
| --- a/remoting/protocol/channel_authenticator.h
|
| +++ b/remoting/protocol/channel_authenticator.h
|
| @@ -15,8 +15,7 @@
|
| namespace net {
|
| class DrainableIOBuffer;
|
| class GrowableIOBuffer;
|
| -class SSLClientSocket;
|
| -class SSLServerSocket;
|
| +class SSLSocket;
|
| } // namespace net
|
|
|
| namespace remoting {
|
| @@ -38,7 +37,7 @@ class ChannelAuthenticator : public base::NonThreadSafe {
|
| // when authentication is finished. Caller retains ownership of
|
| // |socket|. |shared_secret| is a shared secret that we use to
|
| // authenticate the channel.
|
| - virtual void Authenticate(const std::string& shared_secret,
|
| + virtual void Authenticate(net::SSLSocket* socket,
|
| const DoneCallback& done_callback) = 0;
|
|
|
| private:
|
| @@ -47,11 +46,11 @@ class ChannelAuthenticator : public base::NonThreadSafe {
|
|
|
| class HostChannelAuthenticator : public ChannelAuthenticator {
|
| public:
|
| - HostChannelAuthenticator(net::SSLServerSocket* socket);
|
| + HostChannelAuthenticator(const std::string& shared_secret);
|
| virtual ~HostChannelAuthenticator();
|
|
|
| // ChannelAuthenticator overrides.
|
| - virtual void Authenticate(const std::string& shared_secret,
|
| + virtual void Authenticate(net::SSLSocket* socket,
|
| const DoneCallback& done_callback) OVERRIDE;
|
|
|
| private:
|
| @@ -60,8 +59,9 @@ class HostChannelAuthenticator : public ChannelAuthenticator {
|
| bool HandleAuthBytesRead(int result);
|
| bool VerifyAuthBytes(const std::string& received_auth_bytes);
|
|
|
| + std::string shared_secret_;
|
| std::string auth_bytes_;
|
| - net::SSLServerSocket* socket_;
|
| + net::SSLSocket* socket_;
|
| DoneCallback done_callback_;
|
|
|
| scoped_refptr<net::GrowableIOBuffer> auth_read_buf_;
|
| @@ -73,11 +73,11 @@ class HostChannelAuthenticator : public ChannelAuthenticator {
|
|
|
| class ClientChannelAuthenticator : public ChannelAuthenticator {
|
| public:
|
| - ClientChannelAuthenticator(net::SSLClientSocket* socket);
|
| + ClientChannelAuthenticator(const std::string& shared_secret);
|
| virtual ~ClientChannelAuthenticator();
|
|
|
| // ChannelAuthenticator overrides.
|
| - virtual void Authenticate(const std::string& shared_secret,
|
| + virtual void Authenticate(net::SSLSocket* socket,
|
| const DoneCallback& done_callback);
|
|
|
| private:
|
| @@ -85,12 +85,14 @@ class ClientChannelAuthenticator : public ChannelAuthenticator {
|
| void OnAuthBytesWritten(int result);
|
| bool HandleAuthBytesWritten(int result);
|
|
|
| - net::SSLClientSocket* socket_;
|
| + std::string shared_secret_;
|
| + net::SSLSocket* socket_;
|
| DoneCallback done_callback_;
|
|
|
| scoped_refptr<net::DrainableIOBuffer> auth_write_buf_;
|
|
|
| - net::OldCompletionCallbackImpl<ClientChannelAuthenticator> auth_write_callback_;
|
| + net::OldCompletionCallbackImpl<ClientChannelAuthenticator>
|
| + auth_write_callback_;
|
|
|
| DISALLOW_COPY_AND_ASSIGN(ClientChannelAuthenticator);
|
| };
|
|
|