Make sure we call ssl3_digest_cached_records() when necessary
authorMatt Caswell <matt@openssl.org>
Wed, 22 Jun 2016 13:37:57 +0000 (14:37 +0100)
committerMatt Caswell <matt@openssl.org>
Mon, 18 Jul 2016 13:30:14 +0000 (14:30 +0100)
commit149c2ef5ec64f246de978c5c917405dafc6983dc
treefda70f2359140cc342a96e724527d2f8229a8479
parent672f3337c36d932bf214edf0a1a65fd069142282
Make sure we call ssl3_digest_cached_records() when necessary

Having received a ClientKeyExchange message instead of a Certificate we
know that we are not going to receive a CertificateVerify message. This
means we can free up the handshake_buffer. However we better call
ssl3_digest_cached_records() instead of just freeing it up, otherwise we
later try and use it anyway and a core dump results. This could happen,
for example, in SSLv3 where we send a CertificateRequest but the client
sends no Certificate message at all. This is valid in SSLv3 (in TLS
clients are required to send an empty Certificate message).

Found using the BoringSSL test suite.

Reviewed-by: Emilia Käsper <emilia@openssl.org>
ssl/statem/statem_srvr.c