diff options
author | eroman <eroman@chromium.org> | 2015-01-29 14:42:08 -0800 |
---|---|---|
committer | Commit bot <commit-bot@chromium.org> | 2015-01-29 22:43:19 +0000 |
commit | 31e76e425a6efee2670fbcebdaaa500441630383 (patch) | |
tree | dc42b5cda1577019559e16120cf6b3323ca52a95 | |
parent | 4de5f63c8b909b5b7d38803a357227ac8d7bb6af (diff) | |
download | chromium_src-31e76e425a6efee2670fbcebdaaa500441630383.zip chromium_src-31e76e425a6efee2670fbcebdaaa500441630383.tar.gz chromium_src-31e76e425a6efee2670fbcebdaaa500441630383.tar.bz2 |
Allow PBKDF2 key derivation using an empty password.
BUG=449409
Review URL: https://codereview.chromium.org/889493002
Cr-Commit-Position: refs/heads/master@{#313811}
-rw-r--r-- | content/child/webcrypto/openssl/pbkdf2_openssl.cc | 8 | ||||
-rw-r--r-- | content/child/webcrypto/status.cc | 5 | ||||
-rw-r--r-- | content/child/webcrypto/status.h | 3 |
3 files changed, 0 insertions, 16 deletions
diff --git a/content/child/webcrypto/openssl/pbkdf2_openssl.cc b/content/child/webcrypto/openssl/pbkdf2_openssl.cc index 9f3017b..d7ce485 100644 --- a/content/child/webcrypto/openssl/pbkdf2_openssl.cc +++ b/content/child/webcrypto/openssl/pbkdf2_openssl.cc @@ -75,14 +75,6 @@ class Pbkdf2Implementation : public AlgorithmImplementation { const std::vector<uint8_t>& password = SymKeyOpenSsl::Cast(base_key)->raw_key_data(); - // TODO(xun.sun): Empty password would derive random keys with - // PKCS5_PBKDF2_HMAC(). - // https://code.google.com/p/chromium/issues/detail?id=449409 - // - // Rejecting them until it is addressed in BoringSSL. - if (password.empty()) - return Status::ErrorPbkdf2EmptyPassword(); - if (keylen_bytes == 0) return Status::Success(); diff --git a/content/child/webcrypto/status.cc b/content/child/webcrypto/status.cc index 6bd385d..861d27b 100644 --- a/content/child/webcrypto/status.cc +++ b/content/child/webcrypto/status.cc @@ -353,11 +353,6 @@ Status Status::ErrorPbkdf2DeriveBitsLengthNotSpecified() { "No length was specified for the PBKDF2 Derive Bits operation."); } -Status Status::ErrorPbkdf2EmptyPassword() { - return Status(blink::WebCryptoErrorTypeOperation, - "The password for PBKDF2 must not be empty."); -} - Status::Status(blink::WebCryptoErrorType error_type, const std::string& error_details_utf8) : type_(TYPE_ERROR), diff --git a/content/child/webcrypto/status.h b/content/child/webcrypto/status.h index 9e0082b..a021555 100644 --- a/content/child/webcrypto/status.h +++ b/content/child/webcrypto/status.h @@ -268,9 +268,6 @@ class CONTENT_EXPORT Status { // No length parameter was provided for PBKDF2's Derive Bits operation. static Status ErrorPbkdf2DeriveBitsLengthNotSpecified(); - // An empty password was provided for PBKDF2 - static Status ErrorPbkdf2EmptyPassword(); - private: enum Type { TYPE_ERROR, TYPE_SUCCESS }; |