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

Unified Diff: components/webcrypto/status.cc

Issue 2164753002: Reject deriveBits() for PBKDF2 when given a length of 0. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 5 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
« no previous file with comments | « components/webcrypto/status.h ('k') | third_party/WebKit/LayoutTests/crypto/subtle/pbkdf2/deriveBits.html » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: components/webcrypto/status.cc
diff --git a/components/webcrypto/status.cc b/components/webcrypto/status.cc
index 4747a7f0864ab35fda0d8c76c5215302686da670..f0d25ff435ecdceeece001934160b511b2607b43 100644
--- a/components/webcrypto/status.cc
+++ b/components/webcrypto/status.cc
@@ -351,6 +351,12 @@ Status Status::ErrorPbkdf2DeriveBitsLengthNotSpecified() {
"No length was specified for the PBKDF2 Derive Bits operation.");
}
+Status Status::ErrorPbkdf2DeriveBitsLengthZero() {
+ return Status(
+ blink::WebCryptoErrorTypeOperation,
+ "A length of 0 was specified for PBKDF2's Derive Bits operation.");
+}
+
Status Status::ErrorPbkdf2Iterations0() {
return Status(blink::WebCryptoErrorTypeOperation,
"PBKDF2 requires iterations > 0");
« no previous file with comments | « components/webcrypto/status.h ('k') | third_party/WebKit/LayoutTests/crypto/subtle/pbkdf2/deriveBits.html » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698