void myqtt_tls_listener_set_certificate_handlers ( MyQttCtx ctx,
MyQttTlsCertificateFileLocator  certificate_handler,
MyQttTlsPrivateKeyFileLocator  private_key_handler,
MyQttTlsChainCertificateFileLocator  chain_handler,
axlPointer  user_data 
)

Allows to configure the set of functions that will help the engine to find the appropriate certificate/key/chain according to the serverName announced by the SNI indication.

By default, certificates set myqtt_tls_set_certificate or myqtt_tls_opts_set_ssl_certs are used.

However, in the case SNI indication is received, you can use this function to install a set of handlers that are called to find the right certificate according to the serverName. If these handlers aren't configured and a SNI indication is received, the serverName is attached to the connection to be used by myqtt_conn_get_server_name

Parameters
ctxThe context that is going to be configured.
certificate_handlerThe certificate locator handler to find the suitable file or content according to the serverName.
private_key_handlerThe private key locator handler to find the suitable file or content according to the serverName.
chain_handlerOptiona handler that allows to find the suitable file or content according to the serverName to provide the chain certificate.
user_dataUser defined pointer that is passed to all handlers configured at this function.

References myqtt_ctx_get_data(), and myqtt_tls_init().