Clean up and harden TLSv1.2 master key derivation.
authorjsing <jsing@openbsd.org>
Fri, 30 Apr 2021 19:26:44 +0000 (19:26 +0000)
committerjsing <jsing@openbsd.org>
Fri, 30 Apr 2021 19:26:44 +0000 (19:26 +0000)
commit155a0ed0ec011dccabcba32a7663e78ba9204ebd
treec093b42a8effd3b9379dee38d3b9a5eac38b6383
parenta80d07add50e6f405e991f95fdee67ce85feff9b
Clean up and harden TLSv1.2 master key derivation.

The master key and its length are only stored in one location, so it makes
no sense to handle these outside of the derivation function (the current
'out' argument is unused). This simplifies the various call sites.

If derivation fails for some reason, fail hard rather than continuing on
and hoping that something deals with this correctly later.

ok inoguchi@ tb@
lib/libssl/ssl_clnt.c
lib/libssl/ssl_locl.h
lib/libssl/ssl_srvr.c
lib/libssl/t1_enc.c
lib/libssl/tls12_lib.c