diff options
Diffstat (limited to 'remoting/protocol')
-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; |