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 49f57e729e1d2a60ac3d175726a121e9a30abfcf..09e277f261f71d910379228d3f4921c0faa2160f 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(); |