Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(158)

Unified Diff: remoting/protocol/jingle_session.cc

Issue 8604001: Move SSL layer initialization into ChannelAuthenticator implementations. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: - Created 9 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: remoting/protocol/jingle_session.cc
diff --git a/remoting/protocol/jingle_session.cc b/remoting/protocol/jingle_session.cc
index e0b94508ee8255c35c554e1fc20cf8e01cbc13f5..3f55c9d589f9d2efd645520e23f59688fc8a003f 100644
--- a/remoting/protocol/jingle_session.cc
+++ b/remoting/protocol/jingle_session.cc
@@ -14,6 +14,8 @@
#include "net/base/net_errors.h"
#include "net/socket/stream_socket.h"
#include "remoting/base/constants.h"
+#include "remoting/protocol/simple_client_channel_authenticator.h"
+#include "remoting/protocol/simple_host_channel_authenticator.h"
#include "remoting/protocol/jingle_datagram_connector.h"
#include "remoting/protocol/jingle_session_manager.h"
#include "remoting/protocol/jingle_stream_connector.h"
@@ -427,8 +429,15 @@ void JingleSession::AddChannelConnector(
}
channel_connectors_[name] = connector;
- connector->Connect(cricket_session_->initiator(), local_cert_,
- remote_cert_, local_private_key_.get(), raw_channel);
+ ChannelAuthenticator* authenticator;
+ if (cricket_session_->initiator()) {
+ authenticator = new SimpleClientChannelAuthenticator(
+ remote_cert_, shared_secret_);
+ } else {
+ authenticator = new SimpleHostChannelAuthenticator(
+ local_cert_, local_private_key_.get(), shared_secret_);
+ }
Wez 2011/11/22 22:29:48 Is the intent for this code to be replaced with ca
Sergey Ulanov 2011/11/23 01:23:42 Yes, and I have it cooking: http://codereview.chro
+ connector->Connect(authenticator, raw_channel);
// Workaround bug in libjingle - it doesn't connect channels if they
// are created after the session is accepted. See crbug.com/89384.

Powered by Google App Engine
This is Rietveld 408576698