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 #include "remoting/protocol/auth_util.h" | 5 #include "remoting/protocol/auth_util.h" |
6 | 6 |
7 #include "base/base64.h" | 7 #include "base/base64.h" |
8 #include "base/logging.h" | 8 #include "base/logging.h" |
9 #include "base/string_util.h" | 9 #include "base/strings/string_util.h" |
10 #include "crypto/hmac.h" | 10 #include "crypto/hmac.h" |
11 #include "crypto/sha2.h" | 11 #include "crypto/sha2.h" |
12 #include "net/base/net_errors.h" | 12 #include "net/base/net_errors.h" |
13 #include "net/socket/ssl_socket.h" | 13 #include "net/socket/ssl_socket.h" |
14 | 14 |
15 namespace remoting { | 15 namespace remoting { |
16 namespace protocol { | 16 namespace protocol { |
17 | 17 |
18 const char kClientAuthSslExporterLabel[] = | 18 const char kClientAuthSslExporterLabel[] = |
19 "EXPORTER-remoting-channel-auth-client"; | 19 "EXPORTER-remoting-channel-auth-client"; |
(...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
63 if (!response.Sign(shared_secret, out_bytes, kAuthDigestLength)) { | 63 if (!response.Sign(shared_secret, out_bytes, kAuthDigestLength)) { |
64 NOTREACHED() << "HMAC::Sign failed"; | 64 NOTREACHED() << "HMAC::Sign failed"; |
65 return std::string(); | 65 return std::string(); |
66 } | 66 } |
67 | 67 |
68 return std::string(out_bytes, out_bytes + kAuthDigestLength); | 68 return std::string(out_bytes, out_bytes + kAuthDigestLength); |
69 } | 69 } |
70 | 70 |
71 } // namespace protocol | 71 } // namespace protocol |
72 } // namespace remoting | 72 } // namespace remoting |
OLD | NEW |