Index: remoting/host/remoting_me2me_host.cc |
diff --git a/remoting/host/remoting_me2me_host.cc b/remoting/host/remoting_me2me_host.cc |
index d676b8f93d1707624ea4e19c1002e5cbc6c76023..6ad94bd5c509c51546b7a1980d10b5688bcaf9d4 100644 |
--- a/remoting/host/remoting_me2me_host.cc |
+++ b/remoting/host/remoting_me2me_host.cc |
@@ -291,7 +291,7 @@ class HostProcess |
std::string host_id_; |
protocol::SharedSecretHash host_secret_hash_; |
- HostKeyPair key_pair_; |
+ protocol::KeyPair key_pair_; |
std::string oauth_refresh_token_; |
std::string serialized_config_; |
std::string xmpp_login_; |
@@ -523,7 +523,7 @@ void HostProcess::CreateAuthenticatorFactory() { |
scoped_ptr<protocol::AuthenticatorFactory> factory( |
new protocol::Me2MeHostAuthenticatorFactory( |
- local_certificate, *key_pair_.private_key(), host_secret_hash_)); |
+ local_certificate, key_pair_.Copy(), host_secret_hash_)); |
#if defined(OS_POSIX) |
// On Linux and Mac, perform a PAM authorization step after authentication. |
factory.reset(new PamAuthorizationFactory(factory.Pass())); |
@@ -685,7 +685,13 @@ bool HostProcess::ApplyConfig(scoped_ptr<JsonHostConfig> config) { |
return false; |
} |
- if (!key_pair_.Load(*config)) { |
+ std::string key_base64; |
+ if (!config->GetString(kPrivateKeyConfigPath, &key_base64)) { |
+ LOG(ERROR) << "Private key wasn't found in the config file."; |
+ return false; |
+ } |
+ |
+ if (!key_pair_.LoadFromString(key_base64)) { |
Wez
2013/02/23 03:43:20
nit: Merge this with the line above w/ logging e.g
rmsousa
2013/02/26 02:38:52
Done.
|
return false; |
} |