]> git.ipfire.org Git - thirdparty/haproxy.git/commit
BUG/MEDIUM: ssl_ckch: Rework 'commit ssl ca-file' to handle full buffer cases
authorChristopher Faulet <cfaulet@haproxy.com>
Tue, 31 May 2022 15:51:06 +0000 (17:51 +0200)
committerChristopher Faulet <cfaulet@haproxy.com>
Wed, 1 Jun 2022 15:20:57 +0000 (17:20 +0200)
commite9c3bd13957470d0daf31ebc31171c088e69f81e
tree14a3547ec9107ac4efa489a5bedfd97e4e476a55
parent9d56e248a63b053b7c78ca9075fa5ce713599941
BUG/MEDIUM: ssl_ckch: Rework 'commit ssl ca-file' to handle full buffer cases

'commit ssl crl-file' command is also concerned. This patch is similar to
the previous one. Full buffer cases when we try to push the reply are not
properly handled. To fix the issue, the functions responsible to commit CA
or CRL entry changes were reworked.

First, the error message is now part of the service context. This way, if we
cannot push the error message in the reponse buffer, we may retry later. To
do so, a dedicated state was created (CACRL_ST_ERROR). Then, the success
message is also handled in a dedicated state (CACRL_ST_SUCCESS). This way we
are able to retry to push it if necessary. Finally, the dot displayed for
each updated CKCH instance is now immediatly pushed in the response buffer,
and before the update. This way, we are able to retry too if necessary.

This patch should fix the issue #1722. It must be backported as far as
2.5. But a massive refactoring was performed in 2.6. So, for the 2.5, the
patch will have to be adapted.
src/ssl_ckch.c