BUG/MINOR: ssl: Missing return value check in ssl_ocsp_response_print
authorRemi Tricot-Le Breton <rlebreton@haproxy.com>
Wed, 16 Feb 2022 14:17:09 +0000 (15:17 +0100)
committerWilliam Lallemand <wlallemand@haproxy.org>
Fri, 18 Feb 2022 15:48:41 +0000 (16:48 +0100)
commit8fb9119de7e44ee9abe1f3c1f3ed234037abbf12
treec9b9824fb4782476e4dc3f543db8d1e328d7b823
parent132fe2f259465d59df013afdda4eb5247976e3f4
BUG/MINOR: ssl: Missing return value check in ssl_ocsp_response_print

When calling ssl_ocsp_response_print which is used to display an OCSP
response's details when calling the "show ssl ocsp-response" on the CLI,
we use the BIO_read function that copies an OpenSSL BIO into a trash.
The return value was not checked though, which could lead to some
crashes since BIO_read can return a negative value in case of error.

This patch should be backported to 2.5.

(cherry picked from commit 1b01b7f2eff33ca9bd1da9fa628fd07a48c5a7cc)
Signed-off-by: William Lallemand <wlallemand@haproxy.org>
src/ssl_sock.c