 Chromium Code Reviews
 Chromium Code Reviews Issue 9270031:
  Enable V2 authentication for Me2Me host.  (Closed) 
  Base URL: svn://svn.chromium.org/chrome/trunk/src
    
  
    Issue 9270031:
  Enable V2 authentication for Me2Me host.  (Closed) 
  Base URL: svn://svn.chromium.org/chrome/trunk/src| 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..025ee73f0917a1ea97af14bbb9d4045757741707 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 { | 
| 
Wez
2012/01/23 23:53:49
nit: SharedSecretHash -> HostSharedSecret?
 
Sergey Ulanov
2012/01/24 06:32:22
IMHO SharedSecretHash better reflects the purpose
 | 
| + 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>". | 
| 
Wez
2012/01/23 23:53:49
nit: ":" rather than ";" - ";" tends to get used w
 
Sergey Ulanov
2012/01/24 06:32:22
Done.
 | 
| + 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); | 
| }; |