BUG/MINOR: ssl: always check for ssl connection before getting its XPRT context
In several SSL functions, the XPRT context is retrieved before any check on the
connection. In the function ssl_sock_is_ssl(), a test suggests the connection
may be null. So, it is safer to test the ssl connection before retrieving its
XPRT context. It removes any ambiguities and prevents possible null pointer
dereferences.
This patch fixes the issue #265. It must be backported to 2.0.
(cherry picked from commit 82004145d495bc3f159af06acad333fa6da4b58d)
Signed-off-by: Christopher Faulet <cfaulet@haproxy.com>
1 file changed