| Index: content/child/webcrypto/openssl/ec_key_openssl.cc
|
| diff --git a/content/child/webcrypto/openssl/ec_key_openssl.cc b/content/child/webcrypto/openssl/ec_key_openssl.cc
|
| index 81e233701f42767301e104023301db12f4942f6f..a04be160c7c8d941fa2d06acf8c8955281b913cb 100644
|
| --- a/content/child/webcrypto/openssl/ec_key_openssl.cc
|
| +++ b/content/child/webcrypto/openssl/ec_key_openssl.cc
|
| @@ -208,19 +208,15 @@ Status EcAlgorithm::GenerateKey(const blink::WebCryptoAlgorithm& algorithm,
|
| bool extractable,
|
| blink::WebCryptoKeyUsageMask combined_usages,
|
| GenerateKeyResult* result) const {
|
| - Status status = CheckKeyCreationUsages(
|
| - all_public_key_usages_ | all_private_key_usages_, combined_usages);
|
| + blink::WebCryptoKeyUsageMask public_usages = 0;
|
| + blink::WebCryptoKeyUsageMask private_usages = 0;
|
| +
|
| + Status status = GetUsagesForGenerateAsymmetricKey(
|
| + all_public_key_usages_, all_private_key_usages_, combined_usages,
|
| + &public_usages, &private_usages);
|
| if (status.IsError())
|
| return status;
|
|
|
| - const blink::WebCryptoKeyUsageMask public_usages =
|
| - combined_usages & all_public_key_usages_;
|
| - const blink::WebCryptoKeyUsageMask private_usages =
|
| - combined_usages & all_private_key_usages_;
|
| -
|
| - if (private_usages == 0)
|
| - return Status::ErrorCreateKeyEmptyUsages();
|
| -
|
| const blink::WebCryptoEcKeyGenParams* params = algorithm.ecKeyGenParams();
|
|
|
| crypto::OpenSSLErrStackTracer err_tracer(FROM_HERE);
|
|
|