MINOR: sample: Add sha2([<bits>]) converter
authorTim Duesterhus <tim@bastelstu.be>
Mon, 17 Jun 2019 10:41:44 +0000 (12:41 +0200)
committerWilly Tarreau <w@1wt.eu>
Mon, 17 Jun 2019 11:36:42 +0000 (13:36 +0200)
commitd4376302377e4f51f43a183c2c91d929b27e1ae3
tree0f79637e905aa55dca3c6e4031ae5e0d3acf9089
parent24915a55da26e9ab17d8aaa63c50ac0ad8b91ff4
MINOR: sample: Add sha2([<bits>]) converter

This adds a converter for the SHA-2 family, supporting SHA-224, SHA-256
SHA-384 and SHA-512.

The converter relies on the OpenSSL implementation, thus only being available
when HAProxy is compiled with USE_OPENSSL.

See GitHub issue #123. The hypothetical `ssl_?_sha256` fetch can then be
simulated using `ssl_?_der,sha2(256)`:

  http-response set-header Server-Cert-FP %[ssl_f_der,sha2(256),hex]
doc/configuration.txt
reg-tests/converter/sha2.vtc [new file with mode: 0644]
src/sample.c