summaryrefslogtreecommitdiffstats
path: root/crypto/rsa_private_key_ios.cc
blob: d96b3e917ab058cdb3595da02b6bb3c6db7a4732 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
// 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 it hasn't yet been necessary.

// 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