BUG/MINOR: ssl: Reenable ocsp auto-update after an "add ssl crt-list"
authorRemi Tricot-Le Breton <rlebreton@haproxy.com>
Wed, 7 Feb 2024 15:38:45 +0000 (16:38 +0100)
committerChristopher Faulet <cfaulet@haproxy.com>
Wed, 14 Feb 2024 15:26:57 +0000 (16:26 +0100)
commit3cd62872458b91f37142621461ad0c844d833663
tree29581881b78f7055952034189c4b8a6e899ab19c
parentf3f36ad8f136bebf8185ae54fb92f682a5f4c8cf
BUG/MINOR: ssl: Reenable ocsp auto-update after an "add ssl crt-list"

If a certificate that has an OCSP uri is unused and gets added to a
crt-list with the ocsp auto update option "on", it would not have been
inserted into the auto update tree because this insertion was only
working on the first call of the ssl_sock_load_ocsp function.
If the configuration used a crt-list like the following:
    cert1.pem *
    cert2.pem [ocsp-update on] *

Then calling "del ssl crt-list" on the second line and then reverting
the delete by calling "add ssl crt-list" with the same line, then the
cert2.pem would not appear in the ocsp update list (can be checked
thanks to "show ssl ocsp-updates" command).

This patch ensures that in such a case we still perform the insertion in
the update tree.

This patch can be backported up to branch 2.8.

(cherry picked from commit e29ec2e64984604506a40434e1c529f8102722be)
Signed-off-by: Christopher Faulet <cfaulet@haproxy.com>
src/ssl_sock.c