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

Unified Diff: components/webcrypto/algorithms/ecdsa.cc

Issue 2239863002: Remove some unnecessary refcount increments in WebCrypto's EC code. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@ec_raw
Patch Set: Created 4 years, 4 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 | « components/webcrypto/algorithms/ecdh.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: components/webcrypto/algorithms/ecdsa.cc
diff --git a/components/webcrypto/algorithms/ecdsa.cc b/components/webcrypto/algorithms/ecdsa.cc
index a77e77dd39c37d0014e5d8d8a08462207853fae0..0b829a8d2129e53285e955eb01df137ebe4654f5 100644
--- a/components/webcrypto/algorithms/ecdsa.cc
+++ b/components/webcrypto/algorithms/ecdsa.cc
@@ -46,11 +46,11 @@ Status GetPKeyAndDigest(const blink::WebCryptoAlgorithm& algorithm,
Status GetEcGroupOrderSize(EVP_PKEY* pkey, size_t* order_size_bytes) {
crypto::OpenSSLErrStackTracer err_tracer(FROM_HERE);
- crypto::ScopedEC_KEY ec(EVP_PKEY_get1_EC_KEY(pkey));
- if (!ec.get())
+ EC_KEY* ec = EVP_PKEY_get0_EC_KEY(pkey);
+ if (!ec)
return Status::ErrorUnexpected();
- const EC_GROUP* group = EC_KEY_get0_group(ec.get());
+ const EC_GROUP* group = EC_KEY_get0_group(ec);
crypto::ScopedBIGNUM order(BN_new());
if (!EC_GROUP_get_order(group, order.get(), NULL))
« no previous file with comments | « components/webcrypto/algorithms/ecdh.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698