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

Side by Side Diff: remoting/protocol/auth_util.h

Issue 1768383004: Cleanup AuthenticatorMethod usage. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 9 months 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
OLDNEW
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 #ifndef REMOTING_PROTOCOL_AUTH_UTIL_H_ 5 #ifndef REMOTING_PROTOCOL_AUTH_UTIL_H_
6 #define REMOTING_PROTOCOL_AUTH_UTIL_H_ 6 #define REMOTING_PROTOCOL_AUTH_UTIL_H_
7 7
8 #include <stddef.h> 8 #include <stddef.h>
9 9
10 #include <string> 10 #include <string>
(...skipping 13 matching lines...) Expand all
24 24
25 // Fake hostname used for SSL connections. 25 // Fake hostname used for SSL connections.
26 extern const char kSslFakeHostName[]; 26 extern const char kSslFakeHostName[];
27 27
28 // Size of the HMAC-SHA-256 hash used as shared secret in SPAKE2. 28 // Size of the HMAC-SHA-256 hash used as shared secret in SPAKE2.
29 const size_t kSharedSecretHashLength = 32; 29 const size_t kSharedSecretHashLength = 32;
30 30
31 // Size of the HMAC-SHA-256 digest used for channel authentication. 31 // Size of the HMAC-SHA-256 digest used for channel authentication.
32 const size_t kAuthDigestLength = 32; 32 const size_t kAuthDigestLength = 32;
33 33
34 // TODO(sergeyu): The following two methods are used for V1 34 // Applies the specified hash function to |shared_secret| with the
Jamie 2016/03/08 02:17:38 There is no specified hash function. Perhaps s/the
Sergey Ulanov 2016/03/08 18:32:40 Done.
35 // authentication. Remove them when we finally switch to V2 35 // specified |tag| as a key.
36 // authentication method. crbug.com/110483 . 36 std::string GetSharedSecretHash(const std::string& tag,
37 37 const std::string& shared_secret);
38 // Generates auth token for the specified |jid| and |access_code|.
39 std::string GenerateSupportAuthToken(const std::string& jid,
40 const std::string& access_code);
41
42 // Verifies validity of an |access_token|.
43 bool VerifySupportAuthToken(const std::string& jid,
44 const std::string& access_code,
45 const std::string& auth_token);
46 38
47 // Returns authentication bytes that must be used for the given 39 // Returns authentication bytes that must be used for the given
48 // |socket|. Empty string is returned in case of failure. 40 // |socket|. Empty string is returned in case of failure.
49 std::string GetAuthBytes(net::SSLSocket* socket, 41 std::string GetAuthBytes(net::SSLSocket* socket,
50 const base::StringPiece& label, 42 const base::StringPiece& label,
51 const base::StringPiece& shared_secret); 43 const base::StringPiece& shared_secret);
52 44
53 } // namespace protocol 45 } // namespace protocol
54 } // namespace remoting 46 } // namespace remoting
55 47
56 #endif // REMOTING_PROTOCOL_AUTH_UTIL_H_ 48 #endif // REMOTING_PROTOCOL_AUTH_UTIL_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698