diff options
author | wez@chromium.org <wez@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-08-09 04:34:00 +0000 |
---|---|---|
committer | wez@chromium.org <wez@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-08-09 04:34:00 +0000 |
commit | b0635957c25c6dce41ba66b8c70f5b40ba250c7b (patch) | |
tree | 61ca1d9554ab169752c55925c090d524221ab03e /remoting | |
parent | ec7f48d579d31ef2407236463b5bd710e85c8305 (diff) | |
download | chromium_src-b0635957c25c6dce41ba66b8c70f5b40ba250c7b.zip chromium_src-b0635957c25c6dce41ba66b8c70f5b40ba250c7b.tar.gz chromium_src-b0635957c25c6dce41ba66b8c70f5b40ba250c7b.tar.bz2 |
Use HMAC SHA-256, since SHA-1 won't work inside the Windows sandbox.
BUG=91878
TEST=Can connect remoting Client on Windows, with sandbox active, to a Host.
Review URL: http://codereview.chromium.org/7528015
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@95946 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'remoting')
-rw-r--r-- | remoting/protocol/channel_authenticator.cc | 10 | ||||
-rw-r--r-- | remoting/protocol/jingle_session_manager.cc | 2 | ||||
-rw-r--r-- | remoting/protocol/session_config.cc | 4 |
3 files changed, 8 insertions, 8 deletions
diff --git a/remoting/protocol/channel_authenticator.cc b/remoting/protocol/channel_authenticator.cc index fefab18..2e427a9 100644 --- a/remoting/protocol/channel_authenticator.cc +++ b/remoting/protocol/channel_authenticator.cc @@ -21,21 +21,21 @@ namespace { // Labels for use when exporting the SSL master keys. const char kClientSslExporterLabel[] = "EXPORTER-remoting-channel-auth-client"; -// Size of the HMAC-SHA-1 authentication digest. -const size_t kAuthDigestLength = 20; +// Size of the HMAC-SHA-256 authentication digest. +const size_t kAuthDigestLength = 32; // static bool GetAuthBytes(const std::string& shared_secret, const std::string& key_material, std::string* auth_bytes) { // Generate auth digest based on the keying material and shared secret. - crypto::HMAC response(crypto::HMAC::SHA1); - if (!response.Init(shared_secret)) { + crypto::HMAC response(crypto::HMAC::SHA256); + if (!response.Init(key_material)) { NOTREACHED() << "HMAC::Init failed"; return false; } unsigned char out_bytes[kAuthDigestLength]; - if (!response.Sign(key_material, out_bytes, kAuthDigestLength)) { + if (!response.Sign(shared_secret, out_bytes, kAuthDigestLength)) { NOTREACHED() << "HMAC::Sign failed"; return false; } diff --git a/remoting/protocol/jingle_session_manager.cc b/remoting/protocol/jingle_session_manager.cc index c1a684c..9629285 100644 --- a/remoting/protocol/jingle_session_manager.cc +++ b/remoting/protocol/jingle_session_manager.cc @@ -183,7 +183,7 @@ void JingleSessionManager::OnSessionCreate( // Allow local connections if neccessary. cricket_session->set_allow_local_ips(allow_local_ips_); - // If this is an outcoming session the session object is already created. + // If this is an incoming session, create a JingleSession on top of it. if (incoming) { DCHECK(!certificate_.empty()); DCHECK(private_key_.get()); diff --git a/remoting/protocol/session_config.cc b/remoting/protocol/session_config.cc index c173418..57dbe28 100644 --- a/remoting/protocol/session_config.cc +++ b/remoting/protocol/session_config.cc @@ -1,4 +1,4 @@ -// Copyright (c) 2010 The Chromium Authors. All rights reserved. +// Copyright (c) 2011 The Chromium Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. @@ -9,7 +9,7 @@ namespace remoting { namespace protocol { -const int kDefaultStreamVersion = 1; +const int kDefaultStreamVersion = 2; namespace { const int kDefaultWidth = 800; |