BUG/MINOR: ssl: verifyhost is case sensitive
authorWilliam Lallemand <wlallemand@haproxy.com>
Mon, 14 Sep 2020 13:20:10 +0000 (15:20 +0200)
committerWilly Tarreau <w@1wt.eu>
Tue, 22 Sep 2020 14:36:55 +0000 (16:36 +0200)
commit1d909c8ed9408da02045cda08908c3319acb9fcd
treed72ba7227e6346723528b836ec93528bd344459d
parent822e4c88e17d3ce4546e5ce4115c9db41624281d
BUG/MINOR: ssl: verifyhost is case sensitive

In bug #835, @arjenzorgdoc reported that the verifyhost option on the
server line is case-sensitive, that shouldn't be the case.

This patch fixes the issue by replacing memcmp by strncasecmp and strcmp
by strcasecmp. The patch was suggested by @arjenzorgdoc.

This must be backported in all versions supporting the verifyhost
option.

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