summaryrefslogtreecommitdiffstats
path: root/base/crypto/rsa_private_key_mac.cc
diff options
context:
space:
mode:
authorcmasone@google.com <cmasone@google.com@0039d316-1c4b-4281-b951-d872f2087c98>2010-08-10 19:37:51 +0000
committercmasone@google.com <cmasone@google.com@0039d316-1c4b-4281-b951-d872f2087c98>2010-08-10 19:37:51 +0000
commit746480537e2c6043d8f5d5dac624aee812a39991 (patch)
tree9cfc16140c0ff8a8053bbbbd772c384e9a683c0b /base/crypto/rsa_private_key_mac.cc
parent76951557d48f011a54c4f30852a69da172af194e (diff)
downloadchromium_src-746480537e2c6043d8f5d5dac624aee812a39991.zip
chromium_src-746480537e2c6043d8f5d5dac624aee812a39991.tar.gz
chromium_src-746480537e2c6043d8f5d5dac624aee812a39991.tar.bz2
On NSS-using platforms, add a way to use an existing keypair given only the pubkey
I'm reworking Chrome OS' OwnerManager class to leverage code in base/crypto. For my code, I need a way to get at a keypair that was previously generated and stored in the user's NSSDB, given only the public half of the keypair. Given that, I should be able to toss most of the code in chrome/browser/chromeos/login/owner_key_utils.* and just use RSAPrivateKey and the signature generation/verification code here in base/crypto BUG=chromium-os:4485 TEST=base_unittests Review URL: http://codereview.chromium.org/3032060 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@55604 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'base/crypto/rsa_private_key_mac.cc')
-rw-r--r--base/crypto/rsa_private_key_mac.cc20
1 files changed, 20 insertions, 0 deletions
diff --git a/base/crypto/rsa_private_key_mac.cc b/base/crypto/rsa_private_key_mac.cc
index 6dc6a42..e46e93e 100644
--- a/base/crypto/rsa_private_key_mac.cc
+++ b/base/crypto/rsa_private_key_mac.cc
@@ -49,6 +49,12 @@ RSAPrivateKey* RSAPrivateKey::Create(uint16 num_bits) {
}
// static
+RSAPrivateKey* RSAPrivateKey::CreateSensitive(uint16 num_bits) {
+ NOTIMPLEMENTED();
+ return NULL;
+}
+
+// static
RSAPrivateKey* RSAPrivateKey::CreateFromPrivateKeyInfo(
const std::vector<uint8>& input) {
if (input.empty())
@@ -103,6 +109,20 @@ RSAPrivateKey* RSAPrivateKey::CreateFromPrivateKeyInfo(
return result.release();
}
+// static
+RSAPrivateKey* RSAPrivateKey::CreateSensitiveFromPrivateKeyInfo(
+ const std::vector<uint8>& input) {
+ NOTIMPLEMENTED();
+ return NULL;
+}
+
+// static
+RSAPrivateKey* RSAPrivateKey::FindFromPublicKeyInfo(
+ const std::vector<uint8>& input) {
+ NOTIMPLEMENTED();
+ return NULL;
+}
+
RSAPrivateKey::RSAPrivateKey() {
memset(&key_, 0, sizeof(key_));