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

Unified Diff: remoting/protocol/it2me_host_authenticator_factory.cc

Issue 10453080: Revert 139424 - Remove V1 authenticators. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 8 years, 7 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/it2me_host_authenticator_factory.cc
===================================================================
--- remoting/protocol/it2me_host_authenticator_factory.cc (revision 139575)
+++ remoting/protocol/it2me_host_authenticator_factory.cc (working copy)
@@ -6,6 +6,7 @@
#include "base/logging.h"
#include "crypto/rsa_private_key.h"
+#include "remoting/protocol/v1_authenticator.h"
#include "remoting/protocol/negotiating_authenticator.h"
namespace remoting {
@@ -27,9 +28,14 @@
const std::string& local_jid,
const std::string& remote_jid,
const buzz::XmlElement* first_message) {
- return NegotiatingAuthenticator::CreateForHost(
- local_cert_, *local_private_key_, shared_secret_,
- AuthenticationMethod::NONE);
+ if (NegotiatingAuthenticator::IsNegotiableMessage(first_message)) {
+ return NegotiatingAuthenticator::CreateForHost(
+ local_cert_, *local_private_key_, shared_secret_,
+ AuthenticationMethod::NONE);
+ }
+
+ return scoped_ptr<Authenticator>(new V1HostAuthenticator(
+ local_cert_, *local_private_key_, shared_secret_, remote_jid));
}
} // namespace protocol
« no previous file with comments | « remoting/client/plugin/chromoting_scriptable_object.cc ('k') | remoting/protocol/me2me_host_authenticator_factory.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698