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

Unified Diff: remoting/protocol/negotiating_authenticator.h

Issue 12316083: Move HostKeyPair into protocol::KeyPair. (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Rebase Created 7 years, 9 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/negotiating_authenticator.h
diff --git a/remoting/protocol/negotiating_authenticator.h b/remoting/protocol/negotiating_authenticator.h
index 61b471b559053aee70e74a1b2e5ddf534cb4001e..a87d543e3ca98606ea4265013c0e39cff0056f50 100644
--- a/remoting/protocol/negotiating_authenticator.h
+++ b/remoting/protocol/negotiating_authenticator.h
@@ -9,15 +9,15 @@
#include <vector>
#include "base/basictypes.h"
+#include "base/memory/ref_counted.h"
#include "base/memory/scoped_ptr.h"
#include "remoting/protocol/authenticator.h"
#include "remoting/protocol/authentication_method.h"
-namespace crypto {
-class RSAPrivateKey;
-} // namespace crypto
-
namespace remoting {
+
+class RsaKeyPair;
+
namespace protocol {
class NegotiatingAuthenticator : public Authenticator {
@@ -26,14 +26,16 @@ class NegotiatingAuthenticator : public Authenticator {
static bool IsNegotiableMessage(const buzz::XmlElement* message);
+ // Creates a client authenticator for the given methods.
static scoped_ptr<Authenticator> CreateForClient(
const std::string& authentication_tag,
const std::string& shared_secret,
const std::vector<AuthenticationMethod>& methods);
+ // Creates a host authenticator, using a fixed shared secret/PIN hash.
static scoped_ptr<Authenticator> CreateForHost(
const std::string& local_cert,
- const crypto::RSAPrivateKey& local_private_key,
+ scoped_refptr<RsaKeyPair> key_pair,
const std::string& shared_secret_hash,
AuthenticationMethod::HashFunction hash_function);
@@ -57,12 +59,10 @@ class NegotiatingAuthenticator : public Authenticator {
// Used only for host authenticators.
std::string local_cert_;
- scoped_ptr<crypto::RSAPrivateKey> local_private_key_;
- bool certificate_sent_;
+ scoped_refptr<RsaKeyPair> local_key_pair_;
std::string shared_secret_hash_;
// Used only for client authenticators.
- std::string remote_cert_;
std::string authentication_tag_;
std::string shared_secret_;
« no previous file with comments | « remoting/protocol/me2me_host_authenticator_factory.cc ('k') | remoting/protocol/negotiating_authenticator.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698