BUG/MEDIUM: dumpstats: undefined behavior in stats_tlskeys_list()
The function stats_tlskeys_list() can meet an undefined behavior when
called with appctx->st2 == STAT_ST_LIST, indeed the ref pointer is used
uninitialized.
However this function was using NULL in appctx->ctx.tlskeys.ref as a
flag to dump every tickets from every references. A real flag
appctx->ctx.tlskeys.dump_all is now used for this behavior.
This patch delete the 'ref' variable and use appctx->ctx.tlskeys.ref
directly.
diff --git a/include/types/applet.h b/include/types/applet.h
index eb15456..0543f94 100644
--- a/include/types/applet.h
+++ b/include/types/applet.h
@@ -106,6 +106,7 @@
} map;
#if (defined SSL_CTRL_SET_TLSEXT_TICKET_KEY_CB && TLS_TICKETS_NO > 0)
struct {
+ int dump_all;
struct tls_keys_ref *ref;
} tlskeys;
#endif