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 |