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

RETURN VALUES

24       The following return values can occur:
25
26       NULL
27           The operation failed, check out the error stack for the reason.
28
29       Pointer to STACK_OF(X509_NAME)
30           Pointer to the subject names of the successfully read certificates.
31

EXAMPLES

33       Load names of CAs from file and use it as a client CA list:
34
35        SSL_CTX *ctx;
36        STACK_OF(X509_NAME) *cert_names;
37
38        ...
39        cert_names = SSL_load_client_CA_file("/path/to/CAfile.pem");
40        if (cert_names != NULL)
41            SSL_CTX_set_client_CA_list(ctx, cert_names);
42        else
43            /* error */
44        ...
45

SEE ALSO

47       ssl(7), SSL_CTX_set_client_CA_list(3)
48
50       Copyright 2000-2019 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.1c                            2019-05-28        SSL_LOAD_CLIENT_CA_FILE(3)
Impressum