nopoll_bool nopoll_ctx_find_certificate ( noPollCtx ctx,
const char *  serverName,
const char **  certificateFile,
const char **  privateKey,
const char **  optionalChainFile 
)

Allows to find the certificate associated to the provided serverName.

Parameters
ctxThe context where the operation will take place.
serverNamethe servername to use as pattern to find the right certificate. If NULL is provided the first certificate not refering to any serverName will be returned.
certificateFileIf provided a reference and the function returns nopoll_true, it will contain the certificateFile found.
privateKeyIf provided a reference and the function returns nopoll_true, it will contain the privateKey found.
optionalChainFileIf provided a reference and the function returns nopoll_true, it will contain the optionalChainFile found.
Returns
nopoll_true in the case the certificate was found, otherwise nopoll_false is returned.

References nopoll_cmp(), nopoll_false, NOPOLL_LEVEL_DEBUG, nopoll_return_val_if_fail, and nopoll_true.

Referenced by __nopoll_conn_accept_complete_common(), and nopoll_ctx_set_certificate().