| 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..bcf208f592b04bdf56ce0b97f2589472db829eaf 100644
|
| --- a/remoting/host/simple_host_process.cc
|
| +++ b/remoting/host/simple_host_process.cc
|
| @@ -62,6 +62,7 @@ HMODULE g_hModule = NULL;
|
|
|
| using remoting::protocol::CandidateSessionConfig;
|
| using remoting::protocol::ChannelConfig;
|
| +using remoting::protocol::SharedSecretHash;
|
| using remoting::protocol::NetworkSettings;
|
|
|
| namespace {
|
| @@ -121,6 +122,18 @@ class SimpleHost {
|
| return 1;
|
| }
|
|
|
| + std::string host_secret_hash_string;
|
| + if (!config->GetString(kHostSecretHashConfigPath,
|
| + &host_secret_hash_string)) {
|
| + LOG(ERROR) << "host_secret_hash is not defined in the config.";
|
| + return false;
|
| + }
|
| +
|
| + 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 +255,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 +277,7 @@ class SimpleHost {
|
|
|
| std::string host_id_;
|
| HostKeyPair key_pair_;
|
| + SharedSecretHash host_secret_hash_;
|
| std::string xmpp_login_;
|
| std::string xmpp_auth_token_;
|
| std::string xmpp_auth_service_;
|
|
|