BUG/MINOR: ssl: trailing slashes in directory names wrongly cached
authorWilliam Lallemand <wlallemand@haproxy.com>
Wed, 8 Apr 2020 11:15:18 +0000 (13:15 +0200)
committerWilliam Lallemand <wlallemand@haproxy.org>
Wed, 8 Apr 2020 11:28:07 +0000 (13:28 +0200)
commit41ca930e58bba05eb50ac5e265cb0ef8f4533000
treef98afdcdc6f567d026f487cefb3d9db850daca80
parent419e6349f6d64c8b4999a930e127452a6d7763eb
BUG/MINOR: ssl: trailing slashes in directory names wrongly cached

The crtlist_load_cert_dir() caches the directory name without trailing
slashes when ssl_sock_load_cert_list_file() tries to lookup without
cleaning the trailing slashes.

This bug leads to creating the crtlist twice and prevents to remove
correctly a crtlist_entry since it exists in the serveral crtlists
created by accident.

Move the trailing slashes cleanup in ssl_sock_load_cert_list_file() to
fix the problem.

This bug was introduced by 6be66ec ("MINOR: ssl: directories are loaded
like crt-list")
src/ssl_sock.c