boringssl/crypto/fipsmodule/digest
Adam Langley 6b35262272 Maintain EVP_MD_CTX invariants.
Thanks to Lennart Beringer for pointing that that malloc failures could
lead to invalid EVP_MD_CTX states. This change cleans up the code in
general so that fallible operations are all performed before mutating
objects. Thus failures should leave objects in a valid state.

Also, |ctx_size| is never zero and a hash with no context is not
sensible, so stop handling that case and simply assert that it doesn't
occur.

Change-Id: Ia60c3796dcf2f772f55e12e49431af6475f64d52
Reviewed-on: https://boringssl-review.googlesource.com/20544
Reviewed-by: Adam Langley <agl@google.com>
Commit-Queue: Adam Langley <agl@google.com>
2017-09-20 18:43:21 +00:00
..
digest.c Maintain EVP_MD_CTX invariants. 2017-09-20 18:43:21 +00:00
digests.c Be less clever about .rel.ro avoidance. 2017-04-07 15:20:26 +00:00
internal.h Run the comment converter on libcrypto. 2017-08-18 21:49:04 +00:00
md32_common.h Run the comment converter on libcrypto. 2017-08-18 21:49:04 +00:00