MINOR: sample: Validate the number of bits for the sha2 converter
authorTim Duesterhus <tim@bastelstu.be>
Tue, 17 Dec 2019 11:31:20 +0000 (12:31 +0100)
committerWilly Tarreau <w@1wt.eu>
Thu, 19 Dec 2019 08:17:23 +0000 (09:17 +0100)
commitd4286388c0b4ea6b8c719bc0b9c68ccf7dc4c227
tree09c11b5b32f76b77a608816d2ae93f5833d0c419
parent4a25605ab4475130b56e9b25d3ce1d071b796e2a
MINOR: sample: Validate the number of bits for the sha2 converter

Instead of failing the conversion when an invalid number of bits is
given the sha2 converter now fails with an appropriate error message
during startup.

The sha2 converter was introduced in d4376302377e4f51f43a183c2c91d929b27e1ae3,
which is in 2.1 and higher.

(cherry picked from commit cd3732456bda55d4cde9d20651560496c0ab9322)
Signed-off-by: Willy Tarreau <w@1wt.eu>
reg-tests/converter/sha2.vtc
src/sample.c