42329a828b
This was a mess. HMAC_CTX_copy_ex would avoid having to cleanup and init the HMAC_CTX repeatedly, but even that is unnecessary. hctx_tpl was just to reuse the key. Instead, HMAC_CTX already can be reset with the same key. (Alas, with a slightly odd API, but so it goes.) Do that, and use goto err to cleanup the error-handling. Thanks to upstream's b98530d6e09f4cb34c791b8840e936c1fc1467cf for drawing attention to this. (Though we've diverged significantly from upstream with all the heap-allocated bits, so I didn't use the change itself.) While I'm here, tidy up some variable names and cite the newer RFC. Change-Id: Ic1259f46b7c5a14dc341b8cee385be5508ac4daf Reviewed-on: https://boringssl-review.googlesource.com/14605 Reviewed-by: Steven Valdez <svaldez@google.com> Commit-Queue: Steven Valdez <svaldez@google.com> CQ-Verified: CQ bot account: commit-bot@chromium.org <commit-bot@chromium.org> |
||
---|---|---|
.. | ||
CMakeLists.txt | ||
digestsign.c | ||
evp_asn1.c | ||
evp_ctx.c | ||
evp_extra_test.cc | ||
evp_test.cc | ||
evp_tests.txt | ||
evp.c | ||
internal.h | ||
p_dsa_asn1.c | ||
p_ec_asn1.c | ||
p_ec.c | ||
p_rsa_asn1.c | ||
p_rsa.c | ||
pbkdf_test.cc | ||
pbkdf.c | ||
print.c | ||
sign.c |