OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 // | 4 // |
5 // This file implements a standalone host process for Me2Me. | 5 // This file implements a standalone host process for Me2Me. |
6 | 6 |
7 #include <string> | 7 #include <string> |
8 | 8 |
9 #include "base/at_exit.h" | 9 #include "base/at_exit.h" |
10 #include "base/bind.h" | 10 #include "base/bind.h" |
(...skipping 615 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
626 return false; | 626 return false; |
627 } | 627 } |
628 | 628 |
629 std::string key_base64; | 629 std::string key_base64; |
630 if (!config->GetString(kPrivateKeyConfigPath, &key_base64)) { | 630 if (!config->GetString(kPrivateKeyConfigPath, &key_base64)) { |
631 LOG(ERROR) << "Private key couldn't be read from the config file."; | 631 LOG(ERROR) << "Private key couldn't be read from the config file."; |
632 return false; | 632 return false; |
633 } | 633 } |
634 | 634 |
635 key_pair_ = RsaKeyPair::FromString(key_base64); | 635 key_pair_ = RsaKeyPair::FromString(key_base64); |
636 if (!key_pair_) { | 636 if (!key_pair_.get()) { |
637 LOG(ERROR) << "Invalid private key in the config file."; | 637 LOG(ERROR) << "Invalid private key in the config file."; |
638 return false; | 638 return false; |
639 } | 639 } |
640 | 640 |
641 std::string host_secret_hash_string; | 641 std::string host_secret_hash_string; |
642 if (!config->GetString(kHostSecretHashConfigPath, | 642 if (!config->GetString(kHostSecretHashConfigPath, |
643 &host_secret_hash_string)) { | 643 &host_secret_hash_string)) { |
644 host_secret_hash_string = "plain:"; | 644 host_secret_hash_string = "plain:"; |
645 } | 645 } |
646 | 646 |
(...skipping 422 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1069 return exit_code; | 1069 return exit_code; |
1070 } | 1070 } |
1071 | 1071 |
1072 } // namespace remoting | 1072 } // namespace remoting |
1073 | 1073 |
1074 #if !defined(OS_WIN) | 1074 #if !defined(OS_WIN) |
1075 int main(int argc, char** argv) { | 1075 int main(int argc, char** argv) { |
1076 return remoting::HostMain(argc, argv); | 1076 return remoting::HostMain(argc, argv); |
1077 } | 1077 } |
1078 #endif // !defined(OS_WIN) | 1078 #endif // !defined(OS_WIN) |
OLD | NEW |