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

Unified Diff: remoting/protocol/negotiating_client_authenticator.cc

Issue 1944553002: Fix IT2Me protocol error connecting to old hosts. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Reviewer feedback. Created 4 years, 8 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 side-by-side diff with in-line comments
Download patch
Index: remoting/protocol/negotiating_client_authenticator.cc
diff --git a/remoting/protocol/negotiating_client_authenticator.cc b/remoting/protocol/negotiating_client_authenticator.cc
index fc19c39373285814e2f765a0f0f5757011e16d42..9906b941882a1d4a7ef8956fcc5f246b540a9f5d 100644
--- a/remoting/protocol/negotiating_client_authenticator.cc
+++ b/remoting/protocol/negotiating_client_authenticator.cc
@@ -42,6 +42,8 @@ NegotiatingClientAuthenticator::NegotiatingClientAuthenticator(
AddMethod(Method::SHARED_SECRET_SPAKE2_CURVE25519);
AddMethod(Method::SHARED_SECRET_SPAKE2_P224);
+
+ AddMethod(Method::SHARED_SECRET_PLAIN_SPAKE2_P224);
}
NegotiatingClientAuthenticator::~NegotiatingClientAuthenticator() {}
@@ -164,6 +166,7 @@ void NegotiatingClientAuthenticator::CreateAuthenticatorForCurrentMethod(
break;
}
+ case Method::SHARED_SECRET_PLAIN_SPAKE2_P224:
case Method::SHARED_SECRET_SPAKE2_P224:
case Method::SHARED_SECRET_SPAKE2_CURVE25519:
config_.fetch_secret_callback.Run(
@@ -194,7 +197,10 @@ void NegotiatingClientAuthenticator::CreateSharedSecretAuthenticator(
const base::Closure& resume_callback,
const std::string& shared_secret) {
std::string shared_secret_hash =
- GetSharedSecretHash(config_.host_id, shared_secret);
+ (current_method_ == Method::SHARED_SECRET_PLAIN_SPAKE2_P224)
+ ? shared_secret
+ : GetSharedSecretHash(config_.host_id, shared_secret);
+
if (current_method_ == Method::SHARED_SECRET_SPAKE2_CURVE25519) {
current_authenticator_ = Spake2Authenticator::CreateForClient(
local_id_, remote_id_, shared_secret_hash, initial_state);
« no previous file with comments | « remoting/protocol/negotiating_authenticator_base.cc ('k') | remoting/protocol/negotiating_host_authenticator.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698