MINOR: ssl: Add error if a crt-list might be truncated
authorTim Duesterhus <tim@bastelstu.be>
Tue, 29 Sep 2020 16:00:28 +0000 (18:00 +0200)
committerWilliam Lallemand <wlallemand@haproxy.org>
Fri, 2 Oct 2020 10:29:03 +0000 (12:29 +0200)
commitb9f6accc9eee2cd1bd6d63b23e818d6edf2bb245
treef385ca3c874619f79d9df3c70e7e0bc268a850a2
parent6d07fae3c0f8bca9bb91bec44471664b6934dc77
MINOR: ssl: Add error if a crt-list might be truncated

Similar to warning during the parsing of the regular configuration file
that was added in 2fd5bdb439da29f15381aeb57c51327ba57674fc this patch adds
a warning to the parsing of a crt-list if the file does not end in a
newline (and thus might have been truncated).

The logic essentially just was copied over. It might be good to refactor
this in the future, allowing easy re-use within all line-based config
parsers.

see https://github.com/haproxy/haproxy/issues/860#issuecomment-693422936
see 0354b658f061d00d5ab4b728d7deeff2c8f1503a

This should be backported as a warning to 2.2.
src/ssl_crtlist.c