commit | d3bcf13165899ba1a2acfbe57cf4a1365010de39 | [log] [tgz] |
---|---|---|
author | Nick Harper <nharper@chromium.org> | Thu Dec 18 15:47:37 2014 -0800 |
committer | Adam Langley <agl@google.com> | Fri Dec 19 18:18:08 2014 +0000 |
tree | c7a7d94692e1f29c7169d4e6b6c781342ad14ef3 | |
parent | fcf25833bc4d057377da1ea755f57b2f5126e555 [diff] |
Properly handle key_len=0 for HMAC The expectation when calling HMAC with key=NULL and keylen=0 is to compute HMAC on the provided data with a key of length 0 instead of using the "previous" key, which in the case of HMAC() is whatever bytes happen to be left on the stack when the HMAC_CTX struct is allocated. Change-Id: I52a95e262ee4e15f1af3136cb9c07f42f40ce122 Reviewed-on: https://boringssl-review.googlesource.com/2660 Reviewed-by: Adam Langley <agl@google.com>