BUG/MEDIUM: ssl/crt-list: Rework 'add ssl crt-list' to handle full buffer cases

'add ssl crt-list' command is also concerned. This patch is similar to the
previous ones. Full buffer cases when we try to push the reply are not
properly handled. To fix the issue, the functions responsible to add a
crt-list entry 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 (ADDCRT_ST_ERROR,). Then, the success
message is also handled in a dedicated state (ADDCRT_ST_SUCCESS). This way
we are able to retry to push it if necessary. Finally, the dot displayed for
each new 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 #1724. It must be backported as far as
2.2. But a massive refactoring was performed in 2.6. So, for the 2.5 and
below, the patch will have to be adapted.

(cherry picked from commit c642d7c131fe0cc29a5cd1feedef05e27a390403)
Signed-off-by: Christopher Faulet <cfaulet@haproxy.com>
(cherry picked from commit ba2123e59358b45718afac390237a169fcb9a3b1)
[cf: As expected, the patch was highly adapted]]
Signed-off-by: Christopher Faulet <cfaulet@haproxy.com>
(cherry picked from commit 76d2b2c795d7069c2ffd9825cccd36da8d7d604a)
Signed-off-by: Christopher Faulet <cfaulet@haproxy.com>
1 file changed