diff options
author | wez@chromium.org <wez@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-07-29 01:16:56 +0000 |
---|---|---|
committer | wez@chromium.org <wez@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-07-29 01:16:56 +0000 |
commit | ce3ebfadcc88c39a5fad11a012c44071cf08dba8 (patch) | |
tree | 85f8e002b8d0d7165599ddeb08b4e151f0cbb2c7 /remoting/host | |
parent | f930edd6264e33bc7a57ecc8cad52a80330cfb5e (diff) | |
download | chromium_src-ce3ebfadcc88c39a5fad11a012c44071cf08dba8.zip chromium_src-ce3ebfadcc88c39a5fad11a012c44071cf08dba8.tar.gz chromium_src-ce3ebfadcc88c39a5fad11a012c44071cf08dba8.tar.bz2 |
Add an authentication step to stream channel setup in JingleStreamConnector.
Fix JingleStreamConnector and JingleDatagramConnector tear-down semantics in case of failure.
BUG=88130,90624
TEST=
Committed: http://src.chromium.org/viewvc/chrome?view=rev&revision=94247
Review URL: http://codereview.chromium.org/7501007
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@94610 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'remoting/host')
-rw-r--r-- | remoting/host/chromoting_host.cc | 3 | ||||
-rw-r--r-- | remoting/host/chromoting_host.h | 5 | ||||
-rw-r--r-- | remoting/host/plugin/host_script_object.cc | 3 |
3 files changed, 11 insertions, 0 deletions
diff --git a/remoting/host/chromoting_host.cc b/remoting/host/chromoting_host.cc index c7c3af8..0ae98a7 100644 --- a/remoting/host/chromoting_host.cc +++ b/remoting/host/chromoting_host.cc @@ -305,6 +305,9 @@ void ChromotingHost::OnIncomingSession( session->set_receiver_token( GenerateHostAuthToken(session->initiator_token())); + // Provide the Access Code as shared secret for SSL channel authentication. + session->set_shared_secret(access_code_); + *response = protocol::SessionManager::ACCEPT; logger_->Log(logging::LOG_INFO, "Client connected: %s", diff --git a/remoting/host/chromoting_host.h b/remoting/host/chromoting_host.h index 5908432..2938b6c 100644 --- a/remoting/host/chromoting_host.h +++ b/remoting/host/chromoting_host.h @@ -135,6 +135,9 @@ class ChromotingHost : public base::RefCountedThreadSafe<ChromotingHost>, void set_it2me(bool is_it2me) { is_it2me_ = is_it2me; } + void set_access_code(const std::string& access_code) { + access_code_ = access_code; + } // Notify all active client sessions that local input has been detected, and // that remote input should be ignored for a short time. @@ -226,6 +229,8 @@ class ChromotingHost : public base::RefCountedThreadSafe<ChromotingHost>, // are pre-authenticated, and hence the local login challenge can be bypassed. bool is_it2me_; + std::string access_code_; + // Stores list of tasks that should be executed when we finish // shutdown. Used only while |state_| is set to kStopping. std::vector<Task*> shutdown_tasks_; diff --git a/remoting/host/plugin/host_script_object.cc b/remoting/host/plugin/host_script_object.cc index cfb3b9c..460655a 100644 --- a/remoting/host/plugin/host_script_object.cc +++ b/remoting/host/plugin/host_script_object.cc @@ -458,6 +458,9 @@ void HostNPScriptObject::OnReceivedSupportID( access_code_ = support_id + access_verifier->host_secret(); access_code_lifetime_ = lifetime; + // Tell the ChromotingHost the access code, to use as shared-secret. + host_->set_access_code(access_code_); + // Let the caller know that life is good. OnStateChanged(kReceivedAccessCode); } |