BUG/MINOR: ssl: we may only ignore the first 64 errors
authorWilly Tarreau <w@1wt.eu>
Tue, 4 Feb 2020 13:02:02 +0000 (14:02 +0100)
committerWilly Tarreau <w@1wt.eu>
Tue, 4 Feb 2020 13:04:36 +0000 (14:04 +0100)
commit731248f0dbba03688e433789790f65580a472151
tree6f768328c6e4c16263e75bc16f4d35284f070a11
parente77a13aa3f82f70e9f82e712287390d500bd0c8b
BUG/MINOR: ssl: we may only ignore the first 64 errors

We have the ability per bind option to ignore certain errors (CA, crt, ...),
and for this we use a 64-bit field. In issue #479 coverity reports a risk of
too large a left shift. For now as of OpenSSL 1.1.1 the highest error value
that may be reported by X509_STORE_CTX_get_error() seems to be around 50 so
there should be no risk yet, but it's enough of a warning to add a check so
that we don't accidently hide random errors in the future.

This may be backported to relevant stable branches.
src/ssl_sock.c