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 */
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(7), SSL_CTX_set_client_CA_list(3)
48
50       Copyright 2000-2016 The OpenSSL Project Authors. All Rights Reserved.
51
52       Licensed under the OpenSSL license (the "License").  You may not use
53       this file except in compliance with the License.  You can obtain a copy
54       in the file LICENSE in the source distribution or at
55       <https://www.openssl.org/source/license.html>.
56
57
58
591.1.1                             2018-09-11        SSL_LOAD_CLIENT_CA_FILE(3)
Impressum