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

Unified Diff: remoting/host/simple_host_process.cc

Issue 9270031: Enable V2 authentication for Me2Me host. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: - Created 8 years, 11 months 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
« no previous file with comments | « remoting/host/remoting_me2me_host.cc ('k') | remoting/protocol/me2me_host_authenticator_factory.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: remoting/host/simple_host_process.cc
diff --git a/remoting/host/simple_host_process.cc b/remoting/host/simple_host_process.cc
index 053c394b3ff7b37c7fda75f98017afa89b23b1a1..d16e829accd8404c34937aaa433496926b682166 100644
--- a/remoting/host/simple_host_process.cc
+++ b/remoting/host/simple_host_process.cc
@@ -121,6 +121,17 @@ class SimpleHost {
return 1;
}
+ std::string host_secret_hash_string;
+ if (!config->GetString(kHostSecretHashConfigPath,
+ &host_secret_hash_string)) {
+ host_secret_hash_string = "plain:";
+ }
+
+ if (!host_secret_hash_.Parse(host_secret_hash_string)) {
+ LOG(ERROR) << "Invalid host_secret_hash.";
+ return false;
+ }
+
// Use an XMPP connection to the Talk network for session signalling.
if (!config->GetString(kXmppLoginConfigPath, &xmpp_login_) ||
!config->GetString(kXmppAuthTokenConfigPath, &xmpp_auth_token_)) {
@@ -242,14 +253,11 @@ class SimpleHost {
host_->Start();
// Create a Me2Me authenticator factory.
- //
- // TODO(sergeyu): Currently empty PIN is used. This is a temporary
- // hack pending us adding a way to set a PIN. crbug.com/105214 .
if (!is_it2me_) {
scoped_ptr<protocol::AuthenticatorFactory> factory(
new protocol::Me2MeHostAuthenticatorFactory(
xmpp_login_, key_pair_.GenerateCertificate(),
- *key_pair_.private_key(), ""));
+ *key_pair_.private_key(), host_secret_hash_));
host_->SetAuthenticatorFactory(factory.Pass());
}
}
@@ -267,6 +275,7 @@ class SimpleHost {
std::string host_id_;
HostKeyPair key_pair_;
+ protocol::SharedSecretHash host_secret_hash_;
std::string xmpp_login_;
std::string xmpp_auth_token_;
std::string xmpp_auth_service_;
« no previous file with comments | « remoting/host/remoting_me2me_host.cc ('k') | remoting/protocol/me2me_host_authenticator_factory.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698