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

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: Moved import key empty usage to CheckKeyCreationUsages 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/child/webcrypto/nss/rsa_key_nss.cc » ('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 d6a7fd9cb514026bfdd5ae6fbc95daee87ca3ac4..8b13af7e30cab12a7999d427644ee3eaaf695801 100644
--- a/content/child/webcrypto/nss/aes_key_nss.cc
+++ b/content/child/webcrypto/nss/aes_key_nss.cc
@@ -59,10 +59,11 @@ Status AesAlgorithm::GenerateKey(const blink::WebCryptoAlgorithm& algorithm,
Status AesAlgorithm::VerifyKeyUsagesBeforeImportKey(
blink::WebCryptoKeyFormat format,
blink::WebCryptoKeyUsageMask usages) const {
+ bool checkEmptyUsage = true;
eroman 2014/12/09 17:42:55 Incorrect naming style, please read the chromium s
switch (format) {
case blink::WebCryptoKeyFormatRaw:
case blink::WebCryptoKeyFormatJwk:
- return CheckKeyCreationUsages(all_key_usages_, usages);
+ return CheckKeyCreationUsages(all_key_usages_, usages, checkEmptyUsage);
default:
return Status::ErrorUnsupportedImportKeyFormat();
}
« no previous file with comments | « no previous file | content/child/webcrypto/nss/hmac_nss.cc » ('j') | content/child/webcrypto/nss/rsa_key_nss.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698