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

Unified Diff: crypto/ec_private_key.h

Issue 2332473002: Use new BoringSSL scopers in //crypto (Closed)
Patch Set: rebase Created 4 years, 3 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
« no previous file with comments | « crypto/BUILD.gn ('k') | crypto/ec_private_key.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: crypto/ec_private_key.h
diff --git a/crypto/ec_private_key.h b/crypto/ec_private_key.h
index 9cdb453e1d3de1913a58492468155eabf08fb225..917f8e1e50350c81c4b9dc1b10a90a7ee4fd6a30 100644
--- a/crypto/ec_private_key.h
+++ b/crypto/ec_private_key.h
@@ -5,6 +5,7 @@
#ifndef CRYPTO_EC_PRIVATE_KEY_H_
#define CRYPTO_EC_PRIVATE_KEY_H_
+#include <openssl/base.h>
#include <stddef.h>
#include <stdint.h>
@@ -16,9 +17,6 @@
#include "build/build_config.h"
#include "crypto/crypto_export.h"
-// Forward declaration for openssl/*.h
-typedef struct evp_pkey_st EVP_PKEY;
-
namespace crypto {
// Encapsulates an elliptic curve (EC) private key. Can be used to generate new
@@ -56,7 +54,7 @@ class CRYPTO_EXPORT ECPrivateKey {
// Returns a copy of the object.
std::unique_ptr<ECPrivateKey> Copy() const;
- EVP_PKEY* key() { return key_; }
+ EVP_PKEY* key() { return key_.get(); }
// Exports the private key to a PKCS #8 PrivateKeyInfo block.
bool ExportPrivateKey(std::vector<uint8_t>* output) const;
@@ -83,7 +81,7 @@ class CRYPTO_EXPORT ECPrivateKey {
// Constructor is private. Use one of the Create*() methods above instead.
ECPrivateKey();
- EVP_PKEY* key_;
+ bssl::UniquePtr<EVP_PKEY> key_;
DISALLOW_COPY_AND_ASSIGN(ECPrivateKey);
};
« no previous file with comments | « crypto/BUILD.gn ('k') | crypto/ec_private_key.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698