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

Unified Diff: remoting/host/host_key_pair.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
« no previous file with comments | « remoting/host/heartbeat_sender_unittest.cc ('k') | remoting/host/host_key_pair.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: remoting/host/host_key_pair.h
diff --git a/remoting/host/host_key_pair.h b/remoting/host/host_key_pair.h
deleted file mode 100644
index f7aa651a8d3d3f1db33e375fcb8ecfb957342ad3..0000000000000000000000000000000000000000
--- a/remoting/host/host_key_pair.h
+++ /dev/null
@@ -1,51 +0,0 @@
-// Copyright (c) 2012 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#ifndef REMOTING_HOST_HOST_KEY_PAIR_H_
-#define REMOTING_HOST_HOST_KEY_PAIR_H_
-
-#include <string>
-
-#include "base/memory/ref_counted.h"
-#include "base/memory/scoped_ptr.h"
-
-namespace crypto {
-class RSAPrivateKey;
-} // namespace base
-
-namespace remoting {
-
-class HostConfig;
-class MutableHostConfig;
-
-class HostKeyPair {
- public:
- HostKeyPair();
- ~HostKeyPair();
-
- void Generate();
- bool LoadFromString(const std::string& key_base64);
- bool Load(const HostConfig& host_config);
- void Save(MutableHostConfig* host_config);
-
- crypto::RSAPrivateKey* private_key() { return key_.get(); }
-
- std::string GetAsString() const;
- std::string GetPublicKey() const;
- std::string GetSignature(const std::string& message) const;
-
- // Make a new copy of private key. Caller will own the generated private key.
- crypto::RSAPrivateKey* CopyPrivateKey() const;
-
- // Generates self-signed certificate using the key pair. Returns empty string
- // if cert generation fails (e.g. it may happen when the system clock is off).
- std::string GenerateCertificate() const;
-
- private:
- scoped_ptr<crypto::RSAPrivateKey> key_;
-};
-
-} // namespace remoting
-
-#endif // REMOTING_HOST_HOST_KEY_PAIR_H_
« no previous file with comments | « remoting/host/heartbeat_sender_unittest.cc ('k') | remoting/host/host_key_pair.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698