MEDIUM: ssl: implement rsa/ecdsa selection with WolfSSL
authorWilliam Lallemand <wlallemand@haproxy.com>
Thu, 16 Nov 2023 17:16:53 +0000 (18:16 +0100)
committerWilliam Lallemand <wlallemand@haproxy.com>
Fri, 24 Nov 2023 19:07:27 +0000 (20:07 +0100)
commit3750442bc48d58c326eb73002536538ac98af6f7
treedb1388b7bbd1d52080d694a938e4c09c288506ea
parentd43e05d298d8f8248735113d95b69169cdc65f39
MEDIUM: ssl: implement rsa/ecdsa selection with WolfSSL

PR https://github.com/wolfSSL/wolfssl/pull/6963 implements primitives to
extract ciphers and algorithm signatures.

It allows to chose a certificate depending on the sigals and
ciphers presented by the client (RSA or ECDSA).

Since WolfSSL does not implement the clienthello callback, the patch
uses the certificate callback (SSL_CTX_set_cert_cb())

The callback is inspired by our clienthello callback, however the
extraction of client ciphers and sigalgs is simpler,
wolfSSL_get_sigalg_info() and wolfSSL_get_ciphersuite_info() are used.

This is not enabled by default yet as the PR was not merged.
src/ssl_sock.c