BUG/MINOR: ssl: fix usage of the various sample fetch functions
authorWilly Tarreau <w@1wt.eu>
Thu, 10 Mar 2016 16:05:28 +0000 (17:05 +0100)
committerWilly Tarreau <w@1wt.eu>
Thu, 10 Mar 2016 16:28:05 +0000 (17:28 +0100)
commite237fe1172a6e9c562617ccdd38a4a8d58f7ab6a
treeddb4574f947ed2efc157262eda45208c8705a354
parent4cefbc07529923d3d0e89fba52c2e037d70e664e
BUG/MINOR: ssl: fix usage of the various sample fetch functions

Technically speaking, many SSL sample fetch functions act on the
connection and depend on USE_L5CLI on the client side, which means
they're usable as soon as a handshake is completed on a connection.
This means that the test consisting in refusing to call them when
the stream is NULL will prevent them from working when we implement
the tcp-request session ruleset. Better fix this now. The fix consists
in using smp->sess->origin when they're called for the front connection,
and smp->strm->si[1].end when called for the back connection.

There is currently no known side effect for this issue, though it would
better be backported into 1.6 so that the code base remains consistend.
src/ssl_sock.c