Chromium Code Reviews| Index: content/child/webcrypto/status.cc |
| diff --git a/content/child/webcrypto/status.cc b/content/child/webcrypto/status.cc |
| index abadf001eabe73128b3da19c0ce066462ea39e28..916254187769f23a2eb92c4e27402471b748dbb8 100644 |
| --- a/content/child/webcrypto/status.cc |
| +++ b/content/child/webcrypto/status.cc |
| @@ -328,6 +328,20 @@ Status Status::ErrorEcdhLengthTooBig(unsigned int max_length_bits) { |
| max_length_bits)); |
| } |
| +Status Status::ErrorHkdfLengthTooLong() { |
| + return Status(blink::WebCryptoErrorTypeOperation, |
| + "The length provided for HKDF is too large."); |
| +} |
| + |
| +Status Status::ErrorHkdfDeriveBitsLengthNotSpecified() { |
| + // TODO(nharper): The spec might change so that an OperationError should be |
| + // thrown here instead of a TypeError. |
| + // (https://www.w3.org/Bugs/Public/show_bug.cgi?id=27771) If the spec is |
|
eroman
2015/01/08 02:39:43
nit: The last sentence seems obvious, suggest remo
nharper
2015/01/09 18:35:55
Done.
|
| + // updated, this should be changed from TypeError to OperationError. |
| + return Status(blink::WebCryptoErrorTypeType, |
| + "Length must be specified for deriveBits."); |
|
eroman
2015/01/08 02:39:43
Can you suggest something better for this wording?
nharper
2015/01/09 18:35:55
How about "No length was specified for the HKDF De
eroman
2015/01/09 19:31:53
Can't you reproduce by calling deriveKey() on HKDF
|
| +} |
| + |
| Status::Status(blink::WebCryptoErrorType error_type, |
| const std::string& error_details_utf8) |
| : type_(TYPE_ERROR), |