Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(713)

Unified Diff: content/child/webcrypto/nss/aes_key_nss.cc

Issue 777403004: [WebCrypto] Throw syntaxError if keyUsage is empty in ImportKey (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Updated issues in ecdh tests and other review comments. Created 6 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | content/child/webcrypto/nss/hmac_nss.cc » ('j') | content/test/data/webcrypto/ecdh.json » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/child/webcrypto/nss/aes_key_nss.cc
diff --git a/content/child/webcrypto/nss/aes_key_nss.cc b/content/child/webcrypto/nss/aes_key_nss.cc
index 283ae37ba2890f7d968fb40bb768b106db667f78..242ee4c14f0af5918c144d7c9e194d4983910385 100644
--- a/content/child/webcrypto/nss/aes_key_nss.cc
+++ b/content/child/webcrypto/nss/aes_key_nss.cc
@@ -39,7 +39,7 @@ Status AesAlgorithm::GenerateKey(const blink::WebCryptoAlgorithm& algorithm,
bool extractable,
blink::WebCryptoKeyUsageMask usages,
GenerateKeyResult* result) const {
- Status status = CheckKeyCreationUsages(all_key_usages_, usages);
+ Status status = CheckKeyCreationUsages(all_key_usages_, usages, false);
if (status.IsError())
return status;
@@ -59,7 +59,7 @@ Status AesAlgorithm::VerifyKeyUsagesBeforeImportKey(
switch (format) {
case blink::WebCryptoKeyFormatRaw:
case blink::WebCryptoKeyFormatJwk:
- return CheckKeyCreationUsages(all_key_usages_, usages);
+ return CheckKeyCreationUsages(all_key_usages_, usages, false);
default:
return Status::ErrorUnsupportedImportKeyFormat();
}
« no previous file with comments | « no previous file | content/child/webcrypto/nss/hmac_nss.cc » ('j') | content/test/data/webcrypto/ecdh.json » ('J')

Powered by Google App Engine
This is Rietveld 408576698