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

Unified Diff: net/quic/crypto/channel_id_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/net.gypi ('k') | net/quic/crypto/p256_key_exchange.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/quic/crypto/channel_id_openssl.cc
diff --git a/net/quic/crypto/channel_id_openssl.cc b/net/quic/crypto/channel_id_openssl.cc
index 241acae4941fd0df80a2b4755add13ed6b0ea6d9..130f3bd3d0eb7f023af891bc38bc69f7adc966de 100644
--- a/net/quic/crypto/channel_id_openssl.cc
+++ b/net/quic/crypto/channel_id_openssl.cc
@@ -11,6 +11,7 @@
#include <openssl/sha.h>
#include "crypto/openssl_util.h"
+#include "crypto/scoped_openssl_types.h"
using base::StringPiece;
@@ -33,14 +34,13 @@ bool ChannelIDVerifier::VerifyRaw(StringPiece key,
return false;
}
- crypto::ScopedOpenSSL<EC_GROUP, EC_GROUP_free> p256(
+ crypto::ScopedOpenSSL<EC_GROUP, EC_GROUP_free>::Type p256(
EC_GROUP_new_by_curve_name(NID_X9_62_prime256v1));
if (p256.get() == NULL) {
return false;
}
- crypto::ScopedOpenSSL<BIGNUM, BN_free> x(BN_new()), y(BN_new()),
- r(BN_new()), s(BN_new());
+ crypto::ScopedBIGNUM x(BN_new()), y(BN_new()), r(BN_new()), s(BN_new());
ECDSA_SIG sig;
sig.r = r.get();
@@ -57,7 +57,7 @@ bool ChannelIDVerifier::VerifyRaw(StringPiece key,
return false;
}
- crypto::ScopedOpenSSL<EC_POINT, EC_POINT_free> point(
+ crypto::ScopedOpenSSL<EC_POINT, EC_POINT_free>::Type point(
EC_POINT_new(p256.get()));
if (point.get() == NULL ||
!EC_POINT_set_affine_coordinates_GFp(p256.get(), point.get(), x.get(),
@@ -65,7 +65,7 @@ bool ChannelIDVerifier::VerifyRaw(StringPiece key,
return false;
}
- crypto::ScopedOpenSSL<EC_KEY, EC_KEY_free> ecdsa_key(EC_KEY_new());
+ crypto::ScopedEC_KEY ecdsa_key(EC_KEY_new());
if (ecdsa_key.get() == NULL ||
!EC_KEY_set_group(ecdsa_key.get(), p256.get()) ||
!EC_KEY_set_public_key(ecdsa_key.get(), point.get())) {
« no previous file with comments | « net/net.gypi ('k') | net/quic/crypto/p256_key_exchange.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698