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

Unified Diff: content/child/webcrypto/status.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: 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
Index: content/child/webcrypto/status.cc
diff --git a/content/child/webcrypto/status.cc b/content/child/webcrypto/status.cc
index fa5f464641fa14461a79e228ddc3cfbc3e286d09..6d781abd359bf8865245196e02a694f4ab3012d9 100644
--- a/content/child/webcrypto/status.cc
+++ b/content/child/webcrypto/status.cc
@@ -273,6 +273,11 @@ Status Status::ErrorCreateKeyEmptyUsages() {
"Usages cannot be empty when creating a key.");
}
+Status Status::ErrorImportKeyEmptyUsages() {
+ return Status(blink::WebCryptoErrorTypeSyntax,
+ "Usages cannot be empty when importing a key.");
+}
+
Status Status::ErrorImportedEcKeyIncorrectCurve() {
return Status(
blink::WebCryptoErrorTypeData,

Powered by Google App Engine
This is Rietveld 408576698