Add error handling for EVP_DigestInit_ex().
authordoug <doug@openbsd.org>
Mon, 15 Dec 2014 00:46:53 +0000 (00:46 +0000)
committerdoug <doug@openbsd.org>
Mon, 15 Dec 2014 00:46:53 +0000 (00:46 +0000)
commitc3782ab635167098e7c9266c2ca490c0e6181f27
tree9d94cbd21a621ea5d67d93c859d424edd051fe4c
parent3994116b136fe7bd8dabca284c67a63c436a0595
Add error handling for EVP_DigestInit_ex().

A few EVP_DigestInit_ex() calls were left alone since reporting an
error would change the public API.

Changed internal ssl3_cbc_digest_record() to return a value due to the above
change.  It will also now set md_out_size=0 on failure.

This is based on part of BoringSSL's commit to fix malloc crashes:
https://boringssl.googlesource.com/boringssl/+/69a01608f33ab6fe2c3485d94aef1fe9eacf5364

ok miod@
15 files changed:
lib/libssl/d1_srvr.c
lib/libssl/s3_cbc.c
lib/libssl/s3_clnt.c
lib/libssl/s3_srvr.c
lib/libssl/src/ssl/d1_srvr.c
lib/libssl/src/ssl/s3_cbc.c
lib/libssl/src/ssl/s3_clnt.c
lib/libssl/src/ssl/s3_enc.c
lib/libssl/src/ssl/s3_srvr.c
lib/libssl/src/ssl/ssl_lib.c
lib/libssl/src/ssl/ssl_locl.h
lib/libssl/src/ssl/t1_enc.c
lib/libssl/ssl_lib.c
lib/libssl/ssl_locl.h
lib/libssl/t1_enc.c