Index: content/child/webcrypto/openssl/rsa_key_openssl.cc |
diff --git a/content/child/webcrypto/openssl/rsa_key_openssl.cc b/content/child/webcrypto/openssl/rsa_key_openssl.cc |
index e849f0d81babbe9c0ae1834975f3c96a4ba8b564..d3c38e8e2f51ad2e562a87ab2f4fc7f67680ec6c 100644 |
--- a/content/child/webcrypto/openssl/rsa_key_openssl.cc |
+++ b/content/child/webcrypto/openssl/rsa_key_openssl.cc |
@@ -167,6 +167,9 @@ Status RsaHashedAlgorithm::GenerateKey( |
const blink::WebCryptoKeyUsageMask private_usages = |
combined_usages & all_private_key_usages_; |
+ if (private_usages == 0) |
+ return Status::ErrorCreateKeyEmptyUsages(); |
+ |
const blink::WebCryptoRsaHashedKeyGenParams* params = |
algorithm.rsaHashedKeyGenParams(); |