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

Unified Diff: components/webcrypto/algorithms/util.cc

Issue 2163053002: [webcrypto] Check for empty key usages *after* key creation rather than before, to match the spec's… (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebase Created 4 years, 4 months 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: components/webcrypto/algorithms/util.cc
diff --git a/components/webcrypto/algorithms/util.cc b/components/webcrypto/algorithms/util.cc
index f8eb6ae2ba64daf89a149eb440a4c26832ed9e7e..de4c1bf7994a90f60f36dea1eaaf3813d4243cc2 100644
--- a/components/webcrypto/algorithms/util.cc
+++ b/components/webcrypto/algorithms/util.cc
@@ -51,13 +51,7 @@ void TruncateToBitLength(size_t length_bits, std::vector<uint8_t>* bytes) {
}
Status CheckKeyCreationUsages(blink::WebCryptoKeyUsageMask all_possible_usages,
- blink::WebCryptoKeyUsageMask actual_usages,
- EmptyUsagePolicy empty_usage_policy) {
- if (actual_usages == 0 &&
- empty_usage_policy == EmptyUsagePolicy::REJECT_EMPTY) {
- return Status::ErrorCreateKeyEmptyUsages();
- }
-
+ blink::WebCryptoKeyUsageMask actual_usages) {
if (!ContainsKeyUsages(all_possible_usages, actual_usages))
return Status::ErrorCreateKeyBadUsages();
return Status::Success();
« no previous file with comments | « components/webcrypto/algorithms/util.h ('k') | third_party/WebKit/LayoutTests/crypto/subtle/hkdf/exportKey-expected.txt » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698