NAME
SSLloadclientCAfile - load certificate names from file
SYNOPSIS
#include
STACKOF(X509NAME) *SSLloadclientCAfile(const char *file);
DESCRIPTION
SSLloadclientCAfile() reads certificates from ffiillee and returns aSTACKOF(X509NAME) with the subject names found.
NNOOTTEESS SSLloadclientCAfile() reads a file of PEM formatted certificatesand extracts the X509NAMES of the certificates found. While the name
suggests the specific usage as support function for SSLCTXsetclientCAlist(3), it is not limited to CA certificates. EEXXAAMMPPLLEESS Load names of CAs from file and use it as a client CA list: SSLCTX *ctx;STACKOF(X509NAME) *certnames;
... certnames = SSLloadclientCAfile("/path/to/CAfile.pem"); if (certnames != NULL) SSLCTXsetclientCAlist(ctx, certnames); else errorhandling(); ...RETURN VALUES
The following return values can occur: NULL The operation failed, check out the error stack for the reason.Pointer to STACKOF(X509NAME)
Pointer to the subject names of the successfully read certificates.SEE ALSO
ssl(3), SSLCTXsetclientCAlist(3)0.9.7l 2000-10-03 SSLloadclientCAfile(3)