MINOR: ssl: add debug traces
authorThierry FOURNIER / OZON.IO <thierry.fournier@ozon.io>
Mon, 10 Oct 2016 09:59:50 +0000 (11:59 +0200)
committerWilly Tarreau <w@1wt.eu>
Mon, 24 Oct 2016 17:13:12 +0000 (19:13 +0200)
commit8b068c2993b2483e32ee66eb7498ae16f0692906
tree0c8b333e9b2b794b408197063901d689fbc0cfe4
parent4f614290db221f390678e9e4377e4c5060817c75
MINOR: ssl: add debug traces

Add some debug trace when haproxy is configured in debug & verbose mode.
This is useful for openssl tests. Typically, the error "SSL handshake
failure" can be caused by a lot of protocol error. This patch details
the encountered error. For exemple:

   OpenSSL error 0x1408a0c1: ssl3_get_client_hello: no shared cipher

Note that my compilator (gcc-4.7) refuse to considers the function
ssl_sock_dump_errors() as inline. The condition "if" ensure that the
content of the function is not executed in normal case. It should be
a pity to call a function just for testing its execution condition, so
I use the macro "forceinline".
src/ssl_sock.c