nopoll_bool nopoll_listener_set_certificate ( noPollConn listener,
const char *  certificate,
const char *  private_key,
const char *  chain_file 
)

Allows to configure the TLS certificate and key to be used on the provided connection.

Parameters
listenerThe listener that is going to be configured with the providing certificate and key.
certificateThe path to the public certificate file (PEM format) to be used for every TLS connection received under the provided listener.
private_keyThe path to the key file (PEM format) to be used for every TLS connection received under the provided listener.
chain_fileThe path to additional chain certificates (PEM format). You can safely pass here a NULL value.
Returns
nopoll_true if the certificates were configured, otherwise nopoll_false is returned.

References nopoll_false, NOPOLL_LEVEL_CRITICAL, NOPOLL_LEVEL_DEBUG, nopoll_strdup(), and nopoll_true.