BUG/MINOR: ssl/cli: fix "show ssl ca-file <name>" not to mix cli+ssl contexts
authorWilly Tarreau <w@1wt.eu>
Wed, 4 May 2022 13:57:30 +0000 (15:57 +0200)
committerWilly Tarreau <w@1wt.eu>
Fri, 6 May 2022 16:13:35 +0000 (18:13 +0200)
commit06305798f7afb6f436b56373770bcee5d577b83a
tree77cc9f6f8c471ac0fefb07111020d2c35fca4cec
parent821c3b0b5e8e1b9f691532119ee0de8ff6b576dd
BUG/MINOR: ssl/cli: fix "show ssl ca-file <name>" not to mix cli+ssl contexts

The "show ssl ca-file <name>" command mixes some generic pointers from
the "ctx.cli" struct and context-specific ones from "ctx.ssl" while both
are in a union. The i0 integer used to store the current ca_index overlaps
with new_crlfile_entry which is thus harmless for now but is at the mercy
of any reordering or addition of these fields. Let's add dedicated fields
into the ssl structure for this.

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