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

Unified Diff: net/quic/crypto/p256_key_exchange_openssl.cc

Issue 361193003: Eliminate ScopedOpenSSL in favour of scoped_ptr<> specializations. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rebase Created 6 years, 5 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 | « net/quic/crypto/p256_key_exchange.h ('k') | net/quic/test_tools/crypto_test_utils_openssl.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/quic/crypto/p256_key_exchange_openssl.cc
diff --git a/net/quic/crypto/p256_key_exchange_openssl.cc b/net/quic/crypto/p256_key_exchange_openssl.cc
index 197df6a1b91b349b62713a22eccdfeee3e8b8f80..086e9cc36f959792c5747a6f0aad96212e062b79 100644
--- a/net/quic/crypto/p256_key_exchange_openssl.cc
+++ b/net/quic/crypto/p256_key_exchange_openssl.cc
@@ -30,8 +30,7 @@ P256KeyExchange* P256KeyExchange::New(StringPiece key) {
}
const uint8* keyp = reinterpret_cast<const uint8*>(key.data());
- crypto::ScopedOpenSSL<EC_KEY, EC_KEY_free> private_key(
- d2i_ECPrivateKey(NULL, &keyp, key.size()));
+ crypto::ScopedEC_KEY private_key(d2i_ECPrivateKey(NULL, &keyp, key.size()));
if (!private_key.get() || !EC_KEY_check_key(private_key.get())) {
DVLOG(1) << "Private key is invalid.";
return NULL;
@@ -51,8 +50,7 @@ P256KeyExchange* P256KeyExchange::New(StringPiece key) {
// static
string P256KeyExchange::NewPrivateKey() {
- crypto::ScopedOpenSSL<EC_KEY, EC_KEY_free> key(
- EC_KEY_new_by_curve_name(NID_X9_62_prime256v1));
+ crypto::ScopedEC_KEY key(EC_KEY_new_by_curve_name(NID_X9_62_prime256v1));
if (!key.get() || !EC_KEY_generate_key(key.get())) {
DVLOG(1) << "Can't generate a new private key.";
return string();
@@ -85,7 +83,7 @@ bool P256KeyExchange::CalculateSharedKey(const StringPiece& peer_public_value,
return false;
}
- crypto::ScopedOpenSSL<EC_POINT, EC_POINT_free> point(
+ crypto::ScopedOpenSSL<EC_POINT, EC_POINT_free>::Type point(
EC_POINT_new(EC_KEY_get0_group(private_key_.get())));
if (!point.get() ||
!EC_POINT_oct2point( /* also test if point is on curve */
« no previous file with comments | « net/quic/crypto/p256_key_exchange.h ('k') | net/quic/test_tools/crypto_test_utils_openssl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698