summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--remoting/client/chromoting_client.cc5
-rw-r--r--remoting/protocol/me2me_host_authenticator_factory.cc9
2 files changed, 9 insertions, 5 deletions
diff --git a/remoting/client/chromoting_client.cc b/remoting/client/chromoting_client.cc
index 1f7165a..eedd1c9 100644
--- a/remoting/client/chromoting_client.cc
+++ b/remoting/client/chromoting_client.cc
@@ -21,6 +21,7 @@
#include "remoting/protocol/transport_context.h"
#include "remoting/protocol/video_renderer.h"
#include "remoting/protocol/webrtc_connection_to_host.h"
+#include "remoting/signaling/jid_util.h"
namespace remoting {
@@ -61,7 +62,7 @@ void ChromotingClient::Start(
DCHECK(thread_checker_.CalledOnValidThread());
DCHECK(!session_manager_); // Start must be called more than once.
- host_jid_ = host_jid;
+ host_jid_ = NormalizeJid(host_jid);
local_capabilities_ = capabilities;
if (!protocol_config_)
@@ -216,7 +217,7 @@ void ChromotingClient::StartConnection() {
session_manager_->Connect(
host_jid_,
make_scoped_ptr(new protocol::NegotiatingClientAuthenticator(
- signal_strategy_->GetLocalJid(), host_jid_,
+ NormalizeJid(signal_strategy_->GetLocalJid()), host_jid_,
client_auth_config_))),
transport_context_, this);
}
diff --git a/remoting/protocol/me2me_host_authenticator_factory.cc b/remoting/protocol/me2me_host_authenticator_factory.cc
index a4a5639..d66fd8d 100644
--- a/remoting/protocol/me2me_host_authenticator_factory.cc
+++ b/remoting/protocol/me2me_host_authenticator_factory.cc
@@ -116,15 +116,18 @@ scoped_ptr<Authenticator> Me2MeHostAuthenticatorFactory::CreateAuthenticator(
}
if (!local_cert_.empty() && key_pair_.get()) {
+ std::string normalized_local_jid = NormalizeJid(local_jid);
+ std::string normalized_remote_jid = NormalizeJid(remote_jid);
+
if (token_validator_factory_) {
return NegotiatingHostAuthenticator::CreateWithThirdPartyAuth(
- local_jid, remote_jid, local_cert_, key_pair_,
+ normalized_local_jid, normalized_remote_jid, local_cert_, key_pair_,
token_validator_factory_);
}
return NegotiatingHostAuthenticator::CreateWithPin(
- local_jid, remote_jid, local_cert_, key_pair_, pin_hash_,
- pairing_registry_);
+ normalized_local_jid, normalized_remote_jid, local_cert_, key_pair_,
+ pin_hash_, pairing_registry_);
}
return make_scoped_ptr(