1SSL_load_client_CA_file(3)          OpenSSL         SSL_load_client_CA_file(3)
2
3
4

NAME

6       SSL_load_client_CA_file - load certificate names from file
7

SYNOPSIS

9        #include <openssl/ssl.h>
10
11        STACK_OF(X509_NAME) *SSL_load_client_CA_file(const char *file);
12

DESCRIPTION

14       SSL_load_client_CA_file() reads certificates from file and returns a
15       STACK_OF(X509_NAME) with the subject names found.
16

NOTES

18       SSL_load_client_CA_file() reads a file of PEM formatted certificates
19       and extracts the X509_NAMES of the certificates found. While the name
20       suggests the specific usage as support function for
21       SSL_CTX_set_client_CA_list(3), it is not limited to CA certificates.
22

EXAMPLES

24       Load names of CAs from file and use it as a client CA list:
25
26        SSL_CTX *ctx;
27        STACK_OF(X509_NAME) *cert_names;
28
29        ...
30        cert_names = SSL_load_client_CA_file("/path/to/CAfile.pem");
31        if (cert_names != NULL)
32          SSL_CTX_set_client_CA_list(ctx, cert_names);
33        else
34          error_handling();
35        ...
36

RETURN VALUES

38       The following return values can occur:
39
40       NULL
41           The operation failed, check out the error stack for the reason.
42
43       Pointer to STACK_OF(X509_NAME)
44           Pointer to the subject names of the successfully read certificates.
45

SEE ALSO

47       ssl(3), SSL_CTX_set_client_CA_list(3)
48
49
50
511.0.0e                            2000-10-03        SSL_load_client_CA_file(3)
Impressum