Check function return value in libtls
authorinoguchi <inoguchi@openbsd.org>
Wed, 19 Jan 2022 11:10:55 +0000 (11:10 +0000)
committerinoguchi <inoguchi@openbsd.org>
Wed, 19 Jan 2022 11:10:55 +0000 (11:10 +0000)
commitbcc534f91bf0fc77f85efb634bc5ae6eb6030659
tree4073b817e86cfd89030ae783cb03055438c25c2a
parent1a7071c57395d89570877f98babf7b624ff6e824
Check function return value in libtls

EVP_EncryptInit_ex, EVP_DecryptInit_ex and HMAC_Init_ex are possible to
fail and return error.
Error from these functions will be fatal for the callback, and I choose to
return -1.
SSL_CTX_set_tlsext_ticket_key_cb.3 explains the return value of callback.

This also could fix Coverity CID 345319.

ok jsing@ tb@
lib/libtls/tls_server.c