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

Unified Diff: net/quic/core/crypto/channel_id.cc

Issue 2400033005: Use BoringSSL scopers in //net. (Closed)
Patch Set: eroman comments Created 4 years, 2 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/chromium/crypto/proof_source_chromium.cc ('k') | net/quic/core/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/core/crypto/channel_id.cc
diff --git a/net/quic/core/crypto/channel_id.cc b/net/quic/core/crypto/channel_id.cc
index 0d989c84e5f21a4c5e32eefa5bcdeaacc09d3911..65a5e2ee7f0cf875b14dc4cd9d2cefd649a84d16 100644
--- a/net/quic/core/crypto/channel_id.cc
+++ b/net/quic/core/crypto/channel_id.cc
@@ -6,12 +6,12 @@
#include <openssl/bn.h>
#include <openssl/ec.h>
+#include <openssl/ec_key.h>
#include <openssl/ecdsa.h>
-#include <openssl/obj_mac.h>
+#include <openssl/nid.h>
#include <openssl/sha.h>
#include "crypto/openssl_util.h"
-#include "crypto/scoped_openssl_types.h"
using base::StringPiece;
@@ -38,12 +38,13 @@ bool ChannelIDVerifier::VerifyRaw(StringPiece key,
return false;
}
- crypto::ScopedEC_GROUP p256(EC_GROUP_new_by_curve_name(NID_X9_62_prime256v1));
+ bssl::UniquePtr<EC_GROUP> p256(
+ EC_GROUP_new_by_curve_name(NID_X9_62_prime256v1));
if (!p256) {
return false;
}
- crypto::ScopedBIGNUM x(BN_new()), y(BN_new()), r(BN_new()), s(BN_new());
+ bssl::UniquePtr<BIGNUM> x(BN_new()), y(BN_new()), r(BN_new()), s(BN_new());
ECDSA_SIG sig;
sig.r = r.get();
@@ -60,14 +61,14 @@ bool ChannelIDVerifier::VerifyRaw(StringPiece key,
return false;
}
- crypto::ScopedEC_POINT point(EC_POINT_new(p256.get()));
+ bssl::UniquePtr<EC_POINT> point(EC_POINT_new(p256.get()));
if (!point ||
!EC_POINT_set_affine_coordinates_GFp(p256.get(), point.get(), x.get(),
y.get(), nullptr)) {
return false;
}
- crypto::ScopedEC_KEY ecdsa_key(EC_KEY_new());
+ bssl::UniquePtr<EC_KEY> ecdsa_key(EC_KEY_new());
if (ecdsa_key.get() == nullptr ||
!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/quic/chromium/crypto/proof_source_chromium.cc ('k') | net/quic/core/crypto/p256_key_exchange.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698