Sortix cross-nightly manual
This manual documents Sortix cross-nightly. You can instead view this document in the latest official manual.
NAME
SSL_load_client_CA_file, SSL_add_file_cert_subjects_to_stack, SSL_add_dir_cert_subjects_to_stack — load certificate names from filesSYNOPSIS
#include <openssl/ssl.h>SSL_load_client_CA_file(const char *file);
SSL_add_file_cert_subjects_to_stack(STACK_OF(X509_NAME) *stack, const char *file);
SSL_add_dir_cert_subjects_to_stack(STACK_OF(X509_NAME) *stack, const char *dir);
DESCRIPTION
SSL_load_client_CA_file() reads PEM formatted certificates from file and returns a new STACK_OF(X509_NAME) with the subject names found. While the name suggests the specific usage as a support function for SSL_CTX_set_client_CA_list(3), it is not limited to CA certificates.RETURN VALUES
SSL_load_client_CA_file() returns a pointer to the new STACK_OF(X509_NAME) or NULL on failure.EXAMPLES
Load names of CAs from a file and use it as a client CA list:SSL_CTX *ctx; STACK_OF(X509_NAME) *cert_names; ... cert_names = SSL_load_client_CA_file("/path/to/CAfile.pem"); if (cert_names != NULL) SSL_CTX_set_client_CA_list(ctx, cert_names); else error_handling(); ...