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

Side by Side Diff: crypto/ec_private_key.h

Issue 1133303003: Add support for crypto::ECPrivateKey::Copy when built with BoringSSL (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: switch back to dup; remove unnecessary check Created 5 years, 7 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 unified diff | Download patch
« no previous file with comments | « no previous file | crypto/ec_private_key_openssl.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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 #ifndef CRYPTO_EC_PRIVATE_KEY_H_ 5 #ifndef CRYPTO_EC_PRIVATE_KEY_H_
6 #define CRYPTO_EC_PRIVATE_KEY_H_ 6 #define CRYPTO_EC_PRIVATE_KEY_H_
7 7
8 #include <string> 8 #include <string>
9 #include <vector> 9 #include <vector>
10 10
(...skipping 48 matching lines...) Expand 10 before | Expand all | Expand 10 after
59 static bool ImportFromEncryptedPrivateKeyInfo( 59 static bool ImportFromEncryptedPrivateKeyInfo(
60 PK11SlotInfo* slot, 60 PK11SlotInfo* slot,
61 const std::string& password, 61 const std::string& password,
62 const uint8* encrypted_private_key_info, 62 const uint8* encrypted_private_key_info,
63 size_t encrypted_private_key_info_len, 63 size_t encrypted_private_key_info_len,
64 CERTSubjectPublicKeyInfo* decoded_spki, 64 CERTSubjectPublicKeyInfo* decoded_spki,
65 bool permanent, 65 bool permanent,
66 bool sensitive, 66 bool sensitive,
67 SECKEYPrivateKey** key, 67 SECKEYPrivateKey** key,
68 SECKEYPublicKey** public_key); 68 SECKEYPublicKey** public_key);
69 #endif
69 70
70 // Returns a copy of the object. 71 // Returns a copy of the object.
71 ECPrivateKey* Copy() const; 72 ECPrivateKey* Copy() const;
72 #endif
73 73
74 #if defined(USE_OPENSSL) 74 #if defined(USE_OPENSSL)
75 EVP_PKEY* key() { return key_; } 75 EVP_PKEY* key() { return key_; }
76 #else 76 #else
77 SECKEYPrivateKey* key() { return key_; } 77 SECKEYPrivateKey* key() { return key_; }
78 SECKEYPublicKey* public_key() { return public_key_; } 78 SECKEYPublicKey* public_key() { return public_key_; }
79 #endif 79 #endif
80 80
81 // Exports the private key as an ASN.1-encoded PKCS #8 EncryptedPrivateKeyInfo 81 // Exports the private key as an ASN.1-encoded PKCS #8 EncryptedPrivateKeyInfo
82 // block and the public key as an X.509 SubjectPublicKeyInfo block. 82 // block and the public key as an X.509 SubjectPublicKeyInfo block.
(...skipping 26 matching lines...) Expand all
109 SECKEYPublicKey* public_key_; 109 SECKEYPublicKey* public_key_;
110 #endif 110 #endif
111 111
112 DISALLOW_COPY_AND_ASSIGN(ECPrivateKey); 112 DISALLOW_COPY_AND_ASSIGN(ECPrivateKey);
113 }; 113 };
114 114
115 115
116 } // namespace crypto 116 } // namespace crypto
117 117
118 #endif // CRYPTO_EC_PRIVATE_KEY_H_ 118 #endif // CRYPTO_EC_PRIVATE_KEY_H_
OLDNEW
« no previous file with comments | « no previous file | crypto/ec_private_key_openssl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698