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

Unified Diff: crypto/rsa_private_key_ios.cc

Issue 10823309: Add RSAPrivateKey stub implementation for iOS. (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Created 8 years, 4 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
« crypto/crypto.gyp ('K') | « crypto/crypto.gyp ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: crypto/rsa_private_key_ios.cc
diff --git a/crypto/rsa_private_key_ios.cc b/crypto/rsa_private_key_ios.cc
new file mode 100644
index 0000000000000000000000000000000000000000..9dc2e54415734db9b1e893c9f53df035a8c93c8e
--- /dev/null
+++ b/crypto/rsa_private_key_ios.cc
@@ -0,0 +1,68 @@
+// Copyright (c) 2011 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.
+
+#include "crypto/rsa_private_key.h"
+
+#include "base/logging.h"
+
+namespace crypto {
+
+// |RSAPrivateKey| is not used on iOS. This implementation was written so that
+// it would compile. It may be possible to use the NSS implementation as a real
+// implementation, but given it's lack of use, that seems like doing more work
stuartmorgan 2012/08/14 10:00:39 Change everything from "given it's lack" on to jus
msarda 2012/08/14 12:55:16 Done.
+// for unclear value.
+
+// static
+RSAPrivateKey* RSAPrivateKey::Create(uint16 num_bits) {
+ NOTIMPLEMENTED();
+ return NULL;
+}
+
+// static
+RSAPrivateKey* RSAPrivateKey::CreateSensitive(uint16 num_bits) {
+ NOTIMPLEMENTED();
+ return NULL;
+}
+
+// static
+RSAPrivateKey* RSAPrivateKey::CreateFromPrivateKeyInfo(
+ const std::vector<uint8>& input) {
+ NOTIMPLEMENTED();
+ return NULL;
+}
+
+// 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() : key_(NULL), public_key_(NULL) {}
+
+RSAPrivateKey::~RSAPrivateKey() {
+ if (public_key_)
+ CFRelease(public_key_);
+ if (key_)
+ CFRelease(key_);
+}
+
+bool RSAPrivateKey::ExportPrivateKey(std::vector<uint8>* output) const {
+ NOTIMPLEMENTED();
+ return false;
+}
+
+bool RSAPrivateKey::ExportPublicKey(std::vector<uint8>* output) const {
+ NOTIMPLEMENTED();
+ return false;
+}
+
+} // namespace base
« crypto/crypto.gyp ('K') | « crypto/crypto.gyp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698