| Index: content/child/webcrypto/nss/sym_key_nss.cc
|
| diff --git a/content/child/webcrypto/nss/sym_key_nss.cc b/content/child/webcrypto/nss/sym_key_nss.cc
|
| index 5066d5d91d276bffcdb953d8ae412659518f18c8..d554154f37b9736cfda1d2b1b2e0675b8e8736d5 100644
|
| --- a/content/child/webcrypto/nss/sym_key_nss.cc
|
| +++ b/content/child/webcrypto/nss/sym_key_nss.cc
|
| @@ -26,6 +26,9 @@ Status GenerateSecretKeyNss(const blink::WebCryptoKeyAlgorithm& algorithm,
|
| GenerateKeyResult* result) {
|
| DCHECK_NE(CKM_INVALID_MECHANISM, mechanism);
|
|
|
| + if (usages == 0)
|
| + return Status::ErrorCreateKeyEmptyUsages();
|
| +
|
| crypto::ScopedPK11Slot slot(PK11_GetInternalKeySlot());
|
| if (!slot)
|
| return Status::OperationError();
|
|
|