Ensure that handshake hash is non-NULL in tls1_transcript_hash_value().
authorjsing <jsing@openbsd.org>
Sun, 2 May 2021 16:00:33 +0000 (16:00 +0000)
committerjsing <jsing@openbsd.org>
Sun, 2 May 2021 16:00:33 +0000 (16:00 +0000)
commiteda45bbcab28a97ef3e6bb07e5de8aab7abd0c33
tree203ed7ee6c30fea31f9c000ba005a5561a56859c
parentf55f2bcfa8ecd36582506743c67f10f1d06e41c8
Ensure that handshake hash is non-NULL in tls1_transcript_hash_value().

There are several paths where a subtle bug could result in
tls1_transcript_hash_value() being called with a NULL handshake hash - add
an explicit check for this case. As noted by tb@, due to the wonders of
the libcrypto EVP APIs, combined with integer promotion, we already have
a NULL check - this one is just more obvious.

ok tb@
lib/libssl/ssl_transcript.c