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

Unified Diff: content/child/webcrypto/openssl/ec_key_openssl.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
Index: content/child/webcrypto/openssl/ec_key_openssl.cc
diff --git a/content/child/webcrypto/openssl/ec_key_openssl.cc b/content/child/webcrypto/openssl/ec_key_openssl.cc
index faba7f8f634e54703c460665b9a760b2ea7a6a61..5cd40ed15b4987512420df3f24c9bbe4f7ff7363 100644
--- a/content/child/webcrypto/openssl/ec_key_openssl.cc
+++ b/content/child/webcrypto/openssl/ec_key_openssl.cc
@@ -374,7 +374,7 @@ Status EcAlgorithm::ImportKeyJwk(const CryptoData& key_data,
// Now that the key type is known, verify the usages.
status = CheckKeyCreationUsages(
is_private_key ? all_private_key_usages_ : all_public_key_usages_,
- usages);
+ usages, !is_private_key);
if (status.IsError())
return status;

Powered by Google App Engine
This is Rietveld 408576698