]> git.ipfire.org Git - thirdparty/haproxy.git/commit
MINOR: ssl/cli: 'new ssl cert' command
authorWilliam Lallemand <wlallemand@haproxy.com>
Thu, 19 Mar 2020 15:48:33 +0000 (16:48 +0100)
committerWilliam Lallemand <wlallemand@haproxy.org>
Thu, 19 Mar 2020 16:44:41 +0000 (17:44 +0100)
commitea987ed78a9ee86327785351d6f68f3f3d982eb9
tree90fce875d2dc5618e36771a95203d41c21d04c70
parent899fb8abdcda90e3b3c69f6945f83c4c1107c459
MINOR: ssl/cli: 'new ssl cert' command

The CLI command "new ssl cert" allows one to create a new certificate
store in memory. It can be filed with "set ssl cert" and "commit ssl
cert".

This patch also made a small change in "show ssl cert" to handle an
empty certificate store.

Multi-certificate bundles are not supported since they will probably be
removed soon.

This feature alone is useless since there is no way to associate the
store to a crt-list yet.

Example:

  $ echo "new ssl cert foobar.pem" | socat /tmp/sock1 -
  New empty certificate store 'foobar.pem'!
  $ printf "set ssl cert foobar.pem <<\n$(cat localhost.pem.rsa)\n\n" | socat /tmp/sock1 -
  Transaction created for certificate foobar.pem!
  $ echo "commit ssl cert foobar.pem" | socat /tmp/sock1 -
  Committing foobar.pem
  Success!
  $ echo "show ssl cert foobar.pem" | socat /tmp/sock1 -
  Filename: foobar.pem
  [...]
src/ssl_sock.c