| Index: net/cert/jwk_serializer.cc
|
| diff --git a/net/cert/jwk_serializer.cc b/net/cert/jwk_serializer.cc
|
| index 3a6a86d3e7c982df3ae38487a62c78467a7c1f72..bcd9545de3692ea419170fe7a56a09b42b3d2fd6 100644
|
| --- a/net/cert/jwk_serializer.cc
|
| +++ b/net/cert/jwk_serializer.cc
|
| @@ -15,7 +15,6 @@
|
| #include "base/strings/string_util.h"
|
| #include "base/values.h"
|
| #include "crypto/openssl_util.h"
|
| -#include "crypto/scoped_openssl_types.h"
|
|
|
| namespace net {
|
|
|
| @@ -26,10 +25,10 @@ namespace {
|
| bool ConvertEcKeyToJwk(EVP_PKEY* pkey,
|
| base::DictionaryValue* public_key_jwk,
|
| const crypto::OpenSSLErrStackTracer& err_tracer) {
|
| - crypto::ScopedEC_KEY ec_key(EVP_PKEY_get1_EC_KEY(pkey));
|
| + EC_KEY* ec_key = EVP_PKEY_get0_EC_KEY(pkey);
|
| if (!ec_key)
|
| return false;
|
| - const EC_GROUP* ec_group = EC_KEY_get0_group(ec_key.get());
|
| + const EC_GROUP* ec_group = EC_KEY_get0_group(ec_key);
|
| if (!ec_group)
|
| return false;
|
|
|
| @@ -47,12 +46,12 @@ bool ConvertEcKeyToJwk(EVP_PKEY* pkey,
|
|
|
| int degree_bytes = (EC_GROUP_get_degree(ec_group) + 7) / 8;
|
|
|
| - const EC_POINT* ec_point = EC_KEY_get0_public_key(ec_key.get());
|
| + const EC_POINT* ec_point = EC_KEY_get0_public_key(ec_key);
|
| if (!ec_point)
|
| return false;
|
|
|
| - crypto::ScopedBIGNUM x(BN_new());
|
| - crypto::ScopedBIGNUM y(BN_new());
|
| + bssl::UniquePtr<BIGNUM> x(BN_new());
|
| + bssl::UniquePtr<BIGNUM> y(BN_new());
|
| if (!EC_POINT_get_affine_coordinates_GFp(ec_group, ec_point, x.get(), y.get(),
|
| NULL)) {
|
| return false;
|
| @@ -98,7 +97,7 @@ bool ConvertSpkiFromDerToJwk(const base::StringPiece& spki_der,
|
| CBS cbs;
|
| CBS_init(&cbs, reinterpret_cast<const uint8_t*>(spki_der.data()),
|
| spki_der.size());
|
| - crypto::ScopedEVP_PKEY pubkey(EVP_parse_public_key(&cbs));
|
| + bssl::UniquePtr<EVP_PKEY> pubkey(EVP_parse_public_key(&cbs));
|
| if (!pubkey || CBS_len(&cbs) != 0)
|
| return false;
|
|
|
|
|