OLD | NEW |
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #include "crypto/rsa_private_key.h" | 5 #include "crypto/rsa_private_key.h" |
6 | 6 |
7 #include <cryptohi.h> | 7 #include <cryptohi.h> |
8 #include <keyhi.h> | 8 #include <keyhi.h> |
9 #include <pk11pub.h> | 9 #include <pk11pub.h> |
10 #include <stdint.h> | 10 #include <stdint.h> |
11 | 11 |
12 #include <list> | 12 #include <list> |
| 13 #include <memory> |
13 | 14 |
14 #include "base/debug/leak_annotations.h" | 15 #include "base/debug/leak_annotations.h" |
15 #include "base/logging.h" | 16 #include "base/logging.h" |
16 #include "base/memory/scoped_ptr.h" | |
17 #include "base/strings/string_util.h" | 17 #include "base/strings/string_util.h" |
18 #include "crypto/nss_key_util.h" | 18 #include "crypto/nss_key_util.h" |
19 #include "crypto/nss_util.h" | 19 #include "crypto/nss_util.h" |
20 #include "crypto/scoped_nss_types.h" | 20 #include "crypto/scoped_nss_types.h" |
21 | 21 |
22 // Helper for error handling during key import. | 22 // Helper for error handling during key import. |
23 #define READ_ASSERT(truth) \ | 23 #define READ_ASSERT(truth) \ |
24 if (!(truth)) { \ | 24 if (!(truth)) { \ |
25 NOTREACHED(); \ | 25 NOTREACHED(); \ |
26 return false; \ | 26 return false; \ |
(...skipping 597 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
624 | 624 |
625 output->assign(der_pubkey->data, der_pubkey->data + der_pubkey->len); | 625 output->assign(der_pubkey->data, der_pubkey->data + der_pubkey->len); |
626 return true; | 626 return true; |
627 } | 627 } |
628 | 628 |
629 RSAPrivateKey::RSAPrivateKey() : key_(NULL), public_key_(NULL) { | 629 RSAPrivateKey::RSAPrivateKey() : key_(NULL), public_key_(NULL) { |
630 EnsureNSSInit(); | 630 EnsureNSSInit(); |
631 } | 631 } |
632 | 632 |
633 } // namespace crypto | 633 } // namespace crypto |
OLD | NEW |