| Index: net/quic/core/crypto/p256_key_exchange.cc
|
| diff --git a/net/quic/core/crypto/p256_key_exchange.cc b/net/quic/core/crypto/p256_key_exchange.cc
|
| index 6e401a6ace01211a329c4dda85930bf3657bb97a..2d48a88d92acdce46026aa53387493adcf9138ad 100644
|
| --- a/net/quic/core/crypto/p256_key_exchange.cc
|
| +++ b/net/quic/core/crypto/p256_key_exchange.cc
|
| @@ -30,7 +30,7 @@ P256KeyExchange* P256KeyExchange::New(StringPiece key) {
|
| }
|
|
|
| const uint8_t* keyp = reinterpret_cast<const uint8_t*>(key.data());
|
| - crypto::ScopedEC_KEY private_key(
|
| + bssl::UniquePtr<EC_KEY> private_key(
|
| d2i_ECPrivateKey(nullptr, &keyp, key.size()));
|
| if (!private_key.get() || !EC_KEY_check_key(private_key.get())) {
|
| DVLOG(1) << "Private key is invalid.";
|
| @@ -51,7 +51,7 @@ P256KeyExchange* P256KeyExchange::New(StringPiece key) {
|
|
|
| // static
|
| string P256KeyExchange::NewPrivateKey() {
|
| - crypto::ScopedEC_KEY key(EC_KEY_new_by_curve_name(NID_X9_62_prime256v1));
|
| + bssl::UniquePtr<EC_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();
|
| @@ -84,7 +84,7 @@ bool P256KeyExchange::CalculateSharedKey(StringPiece peer_public_value,
|
| return false;
|
| }
|
|
|
| - crypto::ScopedEC_POINT point(
|
| + bssl::UniquePtr<EC_POINT> point(
|
| EC_POINT_new(EC_KEY_get0_group(private_key_.get())));
|
| if (!point ||
|
| !EC_POINT_oct2point(/* also test if point is on curve */
|
|
|