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

Unified Diff: crypto/rsa_private_key_ios.cc

Issue 10830183: Built crypto and crypto_unittests 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
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..2913a4ae3dcb725b48d89b552610b5ac63693332
--- /dev/null
+++ b/crypto/rsa_private_key_ios.cc
@@ -0,0 +1,69 @@
+// 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 {
+
+// TODO(ios): see Apple's CryptoExercise sample code,
+// Classes/SecKeyWrapper.{h,m} and Jens Alfke's MYCrypto, MYPrivateKey.m for
+// ideas.
stuartmorgan 2012/08/06 16:07:31 Remove this from the CL, and start a discussion ab
msarda 2012/08/07 08:39:44 Done.
+
+// static
+RSAPrivateKey* RSAPrivateKey::Create(uint16 num_bits) {
+ // TODO(ios): call SecKeyGeneratePair.
+ 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 {
+ // TODO(ios): call SecKeychainItemExport with kSecFormatOpenSSL.
+ NOTIMPLEMENTED();
+ return false;
+}
+
+} // namespace base

Powered by Google App Engine
This is Rietveld 408576698