BUG/MINOR: ssl/cli: fix "show ssl ca-file/crl-file" not to mix cli+ssl contexts
authorWilly Tarreau <w@1wt.eu>
Wed, 4 May 2022 13:47:39 +0000 (15:47 +0200)
committerWilly Tarreau <w@1wt.eu>
Fri, 6 May 2022 16:13:35 +0000 (18:13 +0200)
commit821c3b0b5e8e1b9f691532119ee0de8ff6b576dd
treee49192fc20bd18fd0698ff6ad850650f84ce44fb
parent1ae0c43244254a3cf652300413625191d6a9dd4f
BUG/MINOR: ssl/cli: fix "show ssl ca-file/crl-file" not to mix cli+ssl contexts

The "show ca-file" and "show crl-file" commands mix some generic pointers
from the "ctx.cli" struct and context-specific ones from "ctx.ssl" while
both are in a union. It's fortunate that the p0 pointer in use is located
immediately before the first one used (it overlaps with next_ckchi_link,
and old_cafile_entry is safe). But should these fields be reordered or
slightly updated this will break.

Comments were added on top of the affected functions to indicate what they
use.

This needs to be backported to 2.5.
include/haproxy/applet-t.h
src/ssl_ckch.c