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

Unified Diff: remoting/protocol/me2me_host_authenticator_factory.h

Issue 9270031: Enable V2 authentication for Me2Me host. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: - Created 8 years, 11 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/host/simple_host_process.cc ('k') | remoting/protocol/me2me_host_authenticator_factory.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: remoting/protocol/me2me_host_authenticator_factory.h
diff --git a/remoting/protocol/me2me_host_authenticator_factory.h b/remoting/protocol/me2me_host_authenticator_factory.h
index e20cea6f10cb4937b5fead68cbd111f65f6df48f..a2cf3e5c5b0c66a3a7c4c275448e70e03c41bd0a 100644
--- a/remoting/protocol/me2me_host_authenticator_factory.h
+++ b/remoting/protocol/me2me_host_authenticator_factory.h
@@ -10,6 +10,7 @@
#include "base/basictypes.h"
#include "base/compiler_specific.h"
#include "base/memory/scoped_ptr.h"
+#include "remoting/protocol/authentication_method.h"
#include "remoting/protocol/authenticator.h"
namespace crypto {
@@ -19,13 +20,25 @@ class RSAPrivateKey;
namespace remoting {
namespace protocol {
+// SharedSecretHash stores hash of a host secret paired with the type
+// of the hashing function.
+struct SharedSecretHash {
+ AuthenticationMethod::HashFunction hash_function;
+ std::string value;
+
+ // Parse string representation of a shared secret hash. The |as_string|
+ // must be in form "<hash_function>:<hash_value_base64>".
+ bool Parse(const std::string& as_string);
+};
+
class Me2MeHostAuthenticatorFactory : public AuthenticatorFactory {
public:
// Doesn't take ownership of |local_private_key|.
- Me2MeHostAuthenticatorFactory(const std::string& local_jid,
- const std::string& local_cert,
- const crypto::RSAPrivateKey& local_private_key,
- const std::string& shared_secret);
+ Me2MeHostAuthenticatorFactory(
+ const std::string& local_jid,
+ const std::string& local_cert,
+ const crypto::RSAPrivateKey& local_private_key,
+ const SharedSecretHash& shared_secret_hash);
virtual ~Me2MeHostAuthenticatorFactory();
// AuthenticatorFactory interface.
@@ -37,7 +50,7 @@ class Me2MeHostAuthenticatorFactory : public AuthenticatorFactory {
std::string local_jid_prefix_;
std::string local_cert_;
scoped_ptr<crypto::RSAPrivateKey> local_private_key_;
- std::string shared_secret_;
+ SharedSecretHash shared_secret_hash_;
DISALLOW_COPY_AND_ASSIGN(Me2MeHostAuthenticatorFactory);
};
« no previous file with comments | « remoting/host/simple_host_process.cc ('k') | remoting/protocol/me2me_host_authenticator_factory.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698