summaryrefslogtreecommitdiffstats
path: root/remoting/protocol/jingle_stream_connector.h
diff options
context:
space:
mode:
authorsergeyu@chromium.org <sergeyu@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-11-23 03:58:43 +0000
committersergeyu@chromium.org <sergeyu@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-11-23 03:58:43 +0000
commit8d1f875d17695b508b8ac6ada9cef468f6fd181e (patch)
tree71dd26ccb18e60b4e569c738715a3153e5e91042 /remoting/protocol/jingle_stream_connector.h
parent313b80bd2c5b7257d8daa2ef4aef0ee5b6e1555c (diff)
downloadchromium_src-8d1f875d17695b508b8ac6ada9cef468f6fd181e.zip
chromium_src-8d1f875d17695b508b8ac6ada9cef468f6fd181e.tar.gz
chromium_src-8d1f875d17695b508b8ac6ada9cef468f6fd181e.tar.bz2
Move SSL layer initialization into ChannelAuthenticator implementations.
Also separate client and host authenticators into separate files. Review URL: http://codereview.chromium.org/8604001 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@111311 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'remoting/protocol/jingle_stream_connector.h')
-rw-r--r--remoting/protocol/jingle_stream_connector.h25
1 files changed, 3 insertions, 22 deletions
diff --git a/remoting/protocol/jingle_stream_connector.h b/remoting/protocol/jingle_stream_connector.h
index 27103de..f37a691 100644
--- a/remoting/protocol/jingle_stream_connector.h
+++ b/remoting/protocol/jingle_stream_connector.h
@@ -41,24 +41,14 @@ class JingleStreamConnector : public JingleChannelConnector {
const Session::StreamChannelCallback& callback);
virtual ~JingleStreamConnector();
- // Starts connection process for the channel. |local_private_key| is
- // owned by the caller, and must exist until this object is
- // destroyed.
- virtual void Connect(bool initiator,
- const std::string& local_cert,
- const std::string& remote_cert,
- crypto::RSAPrivateKey* local_private_key,
+ // JingleChannelConnector implementation.
+ virtual void Connect(ChannelAuthenticator* authenticator,
cricket::TransportChannel* raw_channel) OVERRIDE;
private:
bool EstablishTCPConnection(net::Socket* socket);
void OnTCPConnect(int result);
-
- bool EstablishSSLConnection();
- void OnSSLConnect(int result);
-
- void AuthenticateChannel();
- void OnAuthenticationDone(ChannelAuthenticator::Result result);
+ void OnAuthenticationDone(net::Error error, net::StreamSocket* socket);
void NotifyDone(net::StreamSocket* socket);
void NotifyError();
@@ -67,23 +57,14 @@ class JingleStreamConnector : public JingleChannelConnector {
std::string name_;
Session::StreamChannelCallback callback_;
- bool initiator_;
- std::string local_cert_;
- std::string remote_cert_;
- crypto::RSAPrivateKey* local_private_key_;
-
cricket::TransportChannel* raw_channel_;
scoped_ptr<net::StreamSocket> tcp_socket_;
scoped_ptr<net::SSLSocket> socket_;
- // Used to verify the certificate received in SSLClientSocket.
- scoped_ptr<net::CertVerifier> cert_verifier_;
-
scoped_ptr<ChannelAuthenticator> authenticator_;
// Callback called by the TCP and SSL layers.
net::OldCompletionCallbackImpl<JingleStreamConnector> tcp_connect_callback_;
- net::OldCompletionCallbackImpl<JingleStreamConnector> ssl_connect_callback_;
DISALLOW_COPY_AND_ASSIGN(JingleStreamConnector);
};