Add error checking to tls_session_secret_cb() calls
authortb <tb@openbsd.org>
Tue, 7 Jun 2022 17:14:17 +0000 (17:14 +0000)
committertb <tb@openbsd.org>
Tue, 7 Jun 2022 17:14:17 +0000 (17:14 +0000)
commit573b2ffa241b22968e4f09c84acd0cd50905d4c0
tree5eaeaa00200c9c5b371dc59a4c7216f661395486
parent0d9d5b2291da2602e509e587b2ada053e1fec393
Add error checking to tls_session_secret_cb() calls

Failure of this undocumented callback was previously silently ignored.
Follow OpenSSL's behavior and throw an internal error (for lack of a
better choice) if the callback failed or if it set the master_key_length
to a negative number.

Unindent the success path and clean up some strange idioms.

ok jsing
lib/libssl/ssl_clnt.c
lib/libssl/ssl_srvr.c