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

Unified Diff: crypto/rsa_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/openssl_bio_string_unittest.cc ('k') | crypto/rsa_private_key.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: crypto/rsa_private_key.h
diff --git a/crypto/rsa_private_key.h b/crypto/rsa_private_key.h
index f0b9efaa58fbd2bf3f1659a01be6790f16ae6787..987b3bfc70134e32df966bc3bd936874a68b89b8 100644
--- a/crypto/rsa_private_key.h
+++ b/crypto/rsa_private_key.h
@@ -5,6 +5,7 @@
#ifndef CRYPTO_RSA_PRIVATE_KEY_H_
#define CRYPTO_RSA_PRIVATE_KEY_H_
+#include <openssl/base.h>
#include <stddef.h>
#include <stdint.h>
@@ -15,9 +16,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 RSA private key. Can be used to generate new keys, export
@@ -41,7 +39,7 @@ class CRYPTO_EXPORT RSAPrivateKey {
// failure.
static std::unique_ptr<RSAPrivateKey> CreateFromKey(EVP_PKEY* key);
- EVP_PKEY* key() { return key_; }
+ EVP_PKEY* key() { return key_.get(); }
// Creates a copy of the object.
std::unique_ptr<RSAPrivateKey> Copy() const;
@@ -56,7 +54,7 @@ class CRYPTO_EXPORT RSAPrivateKey {
// Constructor is private. Use one of the Create*() methods above instead.
RSAPrivateKey();
- EVP_PKEY* key_;
+ bssl::UniquePtr<EVP_PKEY> key_;
DISALLOW_COPY_AND_ASSIGN(RSAPrivateKey);
};
« no previous file with comments | « crypto/openssl_bio_string_unittest.cc ('k') | crypto/rsa_private_key.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698