5 SSL_load_client_CA_file - load certificate names from file
9 #include <openssl/ssl.h>
11 STACK_OF(X509_NAME) *SSL_load_client_CA_file(const char *file);
15 SSL_load_client_CA_file() reads certificates from B<file> and returns
16 a STACK_OF(X509_NAME) with the subject names found.
20 SSL_load_client_CA_file() reads a file of PEM formatted certificates and
21 extracts the X509_NAMES of the certificates found. While the name suggests
22 the specific usage as support function for
23 L<SSL_CTX_set_client_CA_list(3)|SSL_CTX_set_client_CA_list(3)>,
24 it is not limited to CA certificates.
28 Load names of CAs from file and use it as a client CA list:
31 STACK_OF(X509_NAME) *cert_names;
34 cert_names = SSL_load_client_CA_file("/path/to/CAfile.pem");
35 if (cert_names != NULL)
36 SSL_CTX_set_client_CA_list(ctx, cert_names);
43 The following return values can occur:
49 The operation failed, check out the error stack for the reason.
51 =item Pointer to STACK_OF(X509_NAME)
53 Pointer to the subject names of the successfully read certificates.
60 L<SSL_CTX_set_client_CA_list(3)|SSL_CTX_set_client_CA_list(3)>