Chromium Code Reviews| Index: remoting/host/remoting_me2me_host.cc |
| diff --git a/remoting/host/remoting_me2me_host.cc b/remoting/host/remoting_me2me_host.cc |
| index 6dcad1bd8b18cb7069577d009b931c3596b9da23..1e518af2dbf6c976db7cae98cb99b56c11b58845 100644 |
| --- a/remoting/host/remoting_me2me_host.cc |
| +++ b/remoting/host/remoting_me2me_host.cc |
| @@ -255,10 +255,17 @@ class HostProcess |
| void CreateAuthenticatorFactory() { |
| DCHECK(context_->network_task_runner()->BelongsToCurrentThread()); |
| + |
| + std::string local_certificate = key_pair_.GenerateCertificate(); |
| + if (local_certificate.empty()) { |
| + LOG(ERROR) << "Failed to generate host certificate."; |
| + Shutdown(kHostInitializationFailed); |
| + return; |
| + } |
| + |
| scoped_ptr<protocol::AuthenticatorFactory> factory( |
| new protocol::Me2MeHostAuthenticatorFactory( |
| - key_pair_.GenerateCertificate(), |
| - *key_pair_.private_key(), host_secret_hash_)); |
| + local_certificate, *key_pair_.private_key(), host_secret_hash_)); |
|
alexeypa (please no reviews)
2012/09/13 23:09:25
nit: There is similar code in remoting_simple_host
Sergey Ulanov
2012/09/13 23:25:18
Nah - it's there for debugging, it's ok if it cras
|
| host_->SetAuthenticatorFactory(factory.Pass()); |
| } |