MINOR: ssl: provide a "show fd" helper to report important SSL information
authorWilly Tarreau <w@1wt.eu>
Wed, 20 Jan 2021 13:41:29 +0000 (14:41 +0100)
committerWilly Tarreau <w@1wt.eu>
Thu, 28 Jan 2021 17:13:36 +0000 (18:13 +0100)
commitdaad3c836aee5bbf7d123f1ac7e6f655d62d07f0
treef33c11706c561b39d82e4666338ded2bb7f8860e
parente0150e7888d298207a843ed427160697350fd14b
MINOR: ssl: provide a "show fd" helper to report important SSL information

The SSL context contains a lot of important details that are currently
missing from debug outputs. Now that we detect ssl_sock, we can perform
some sanity checks, print the next xprt, the subscriber callback's context,
handler and number of calls. The process function is also resolved. This
now gives for example on an H2 connection:

   1029 : st=0x21(R:rA W:Ra) ev=0x01(heopI) [lc] tmask=0x2 umask=0x2 owner=0x7fc714881700 iocb=0x65b528(sock_conn_iocb) back=0 cflg=0x00001300 fe=recv mux=H2 ctx=0x7fc734545e50 h2c.st0=FRH .err=0 .maxid=217 .lastid=-1 .flg=0x0000 .nbst=0 .nbcs=0 .fctl_cnt=0 .send_cnt=0 .tree_cnt=0 .orph_cnt=0 .sub=1 .dsi=217 .dbuf=0@(nil)+0/0 .msi=-1 .mbuf=[1..1|32],h=[0@(nil)+0/0],t=[0@(nil)+0/0] xprt=SSL xprt_ctx=0x7fc73478f230 xctx.st=0 .xprt=RAW .wait.ev=1 .subs=0x7fc734546350(ev=1 tl=0x7fc7346702e0 tl.calls=278 tl.ctx=0x7fc734545e50 tl.fct=main-0x144efa) .sent_early=0 .early_in=0

(cherry picked from commit de5675a38c50a5c5d79c261f303c52ff9df241b3)
[wt: context adjustment]
Signed-off-by: Willy Tarreau <w@1wt.eu>
src/ssl_sock.c