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

Side by Side Diff: remoting/host/support_access_verifier.cc

Issue 8604001: Move SSL layer initialization into ChannelAuthenticator implementations. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: - Created 9 years, 1 month 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « no previous file | remoting/protocol/auth_token_utils.h » ('j') | remoting/protocol/auth_util.h » ('J')
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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 #include "remoting/host/support_access_verifier.h" 5 #include "remoting/host/support_access_verifier.h"
6 6
7 #include <stdlib.h> 7 #include <stdlib.h>
8 #include <vector> 8 #include <vector>
9 9
10 #include "base/logging.h" 10 #include "base/logging.h"
11 #include "base/rand_util.h" 11 #include "base/rand_util.h"
12 #include "base/string_util.h" 12 #include "base/string_util.h"
13 #include "remoting/host/host_config.h" 13 #include "remoting/host/host_config.h"
14 #include "remoting/protocol/auth_token_utils.h" 14 #include "remoting/protocol/auth_util.h"
15 15
16 namespace remoting { 16 namespace remoting {
17 17
18 namespace { 18 namespace {
19 // 5 digits means 100K possible host secrets with uniform distribution, which 19 // 5 digits means 100K possible host secrets with uniform distribution, which
20 // should be enough for short-term passwords, given that we rate-limit guesses 20 // should be enough for short-term passwords, given that we rate-limit guesses
21 // in the cloud and expire access codes after a small number of attempts. 21 // in the cloud and expire access codes after a small number of attempts.
22 const int kHostSecretLength = 5; 22 const int kHostSecretLength = 5;
23 const char kHostSecretAlphabet[] = "0123456789"; 23 const char kHostSecretAlphabet[] = "0123456789";
24 24
(...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after
60 void SupportAccessVerifier::OnIT2MeHostRegistered( 60 void SupportAccessVerifier::OnIT2MeHostRegistered(
61 bool successful, const std::string& support_id) { 61 bool successful, const std::string& support_id) {
62 if (successful) { 62 if (successful) {
63 support_id_ = support_id; 63 support_id_ = support_id;
64 } else { 64 } else {
65 LOG(ERROR) << "Failed to register support host"; 65 LOG(ERROR) << "Failed to register support host";
66 } 66 }
67 } 67 }
68 68
69 } // namespace remoting 69 } // namespace remoting
OLDNEW
« no previous file with comments | « no previous file | remoting/protocol/auth_token_utils.h » ('j') | remoting/protocol/auth_util.h » ('J')

Powered by Google App Engine
This is Rietveld 408576698