BUG/MINOR: ssl: Fix crash in 'update ssl ocsp-response' CLI command
authorRemi Tricot-Le Breton <rlebreton@haproxy.com>
Mon, 9 Jan 2023 11:02:41 +0000 (12:02 +0100)
committerWilliam Lallemand <wlallemand@haproxy.org>
Mon, 9 Jan 2023 14:43:41 +0000 (15:43 +0100)
commit15dc0e2a1cf2d5f637c5ec92100104a4d6782601
tree08a2be80ad17596f93a3fdf225359fba259fd885
parent2fb47afb1c1b908b805cb089fa2000afcabf872e
BUG/MINOR: ssl: Fix crash in 'update ssl ocsp-response' CLI command

This CLI command crashed when called for a certificate which did not
have an OCSP response during startup because it assumed that the
ocsp_issuer pointer of the ckch_data object would be valid. It was only
true for already known OCSP responses though.
The ocsp issuer certificate is now taken either from the ocsp_issuer
pointer or looked for in the certificate chain. This is the same logic
as the one in ssl_sock_load_ocsp.

This patch does not need to be backported.
src/ssl_ocsp.c