Adds certificates to the list of trusted certificates.
#include <ldap_ssl.h> int ldapssl_add_trusted_cert ( void *cert, int type);
(IN) Points to the trusted root certificate to add.
(IN) Certificate type. This must be one of the following values:
LDAPSSL_CERT_FILETYPE_B64
LDAPSSL_CERT_FILETYPE_DER
LDAPSSL_CERT_BUFFTYPE_B64
LDAPSSL_CERT_BUFFTYPE_DER
This function can be called repeatedly to build a group of trusted certificates. It supports certificates encoded as DER and B64 (PEM) formats.
When one of the "FILETYPE" types is specified (see the type parameter), the cert parameter must be a pointer to a character array containing the fully qualified filename of the file containing the certificate. When one of the "BUFFTYPE" types are specified, the cert parameter must be a pointer an LDAPSSL_Cert structure.
For sample code, see sslbind.c, sslbind_interactive.c.