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

Unified Diff: remoting/protocol/pairing_client_authenticator.cc

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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « remoting/protocol/pairing_client_authenticator.h ('k') | remoting/remoting_srcs.gypi » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: remoting/protocol/pairing_client_authenticator.cc
diff --git a/remoting/protocol/pairing_client_authenticator.cc b/remoting/protocol/pairing_client_authenticator.cc
index 747654c07835fcaa780e7618bddade9c836a55f4..c4e0b291bb63a6d33be683365bcac280e42e19ca 100644
--- a/remoting/protocol/pairing_client_authenticator.cc
+++ b/remoting/protocol/pairing_client_authenticator.cc
@@ -7,8 +7,7 @@
#include "base/bind.h"
#include "base/logging.h"
#include "remoting/base/constants.h"
-#include "remoting/base/rsa_key_pair.h"
-#include "remoting/protocol/authentication_method.h"
+#include "remoting/protocol/auth_util.h"
#include "remoting/protocol/channel_authenticator.h"
#include "third_party/webrtc/libjingle/xmllite/xmlelement.h"
@@ -20,12 +19,12 @@ PairingClientAuthenticator::PairingClientAuthenticator(
const std::string& paired_secret,
const CreateBaseAuthenticatorCallback& create_base_authenticator_callback,
const FetchSecretCallback& fetch_pin_callback,
- const std::string& authentication_tag)
+ const std::string& host_id)
: client_id_(client_id),
paired_secret_(paired_secret),
create_base_authenticator_callback_(create_base_authenticator_callback),
fetch_pin_callback_(fetch_pin_callback),
- authentication_tag_(authentication_tag),
+ host_id_(host_id),
weak_factory_(this) {
spake2_authenticator_ =
create_base_authenticator_callback_.Run(paired_secret_, MESSAGE_READY);
@@ -72,9 +71,7 @@ void PairingClientAuthenticator::OnPinFetched(
DCHECK(!spake2_authenticator_);
waiting_for_pin_ = false;
spake2_authenticator_ = create_base_authenticator_callback_.Run(
- ApplySharedSecretHashFunction(HashFunction::HMAC_SHA256,
- authentication_tag_, pin),
- initial_state);
+ GetSharedSecretHash(host_id_, pin), initial_state);
resume_callback.Run();
}
« no previous file with comments | « remoting/protocol/pairing_client_authenticator.h ('k') | remoting/remoting_srcs.gypi » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698