SSL_LOAD_CLIENT_CA_FILE - Online Linux Manual PageSection : 3ossl
Updated : 2022-03-15
Source : 3.0.2
Note : OpenSSL

NAMESSL_load_client_CA_file_ex, SSL_load_client_CA_file, SSL_add_file_cert_subjects_to_stack, SSL_add_dir_cert_subjects_to_stack, SSL_add_store_cert_subjects_to_stack ​− load certificate names

SYNOPSIS​ #include <openssl/ssl.h> ​ ​ STACK_OF(X509_NAME) *SSL_load_client_CA_file_ex(const char *file, ​ OSSL_LIB_CTX *libctx, ​ const char *propq); ​ STACK_OF(X509_NAME) *SSL_load_client_CA_file(const char *file); ​ ​ int SSL_add_file_cert_subjects_to_stack(STACK_OF(X509_NAME) *stack, ​ const char *file); ​ int SSL_add_dir_cert_subjects_to_stack(STACK_OF(X509_NAME) *stack, ​ const char *dir); ​ int SSL_add_store_cert_subjects_to_stack(STACK_OF(X509_NAME) *stack, ​ const char *store);

DESCRIPTIONSSL_load_client_CA_file_ex() reads certificates from file and returns a STACK_OF(X509_NAME) with the subject names found. The library context libctx and property query propq are used when fetching algorithms from providers. SSL_load_client_CA_file() is similar to SSL_load_client_CA_file_ex() but uses NULL for the library context libctx and property query propq. SSL_add_file_cert_subjects_to_stack() reads certificates from file, and adds their subject name to the already existing stack. SSL_add_dir_cert_subjects_to_stack() reads certificates from every file in the directory dir, and adds their subject name to the already existing stack. SSL_add_store_cert_subjects_to_stack() loads certificates from the ​store URI, and adds their subject name to the already existing ​stack.

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

RETURN VALUESThe following return values can occur: NULL The operation failed, check out the error stack for the reason. Pointer to STACK_OF(X509_NAME) Pointer to the subject names of the successfully read certificates.

EXAMPLESLoad names of CAs from 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 */ ​ ...

SEE ALSOssl(7), ​ossl_store(7), ​SSL_CTX_set_client_CA_list(3)

HISTORYSSL_load_client_CA_file_ex() and SSL_add_store_cert_subjects_to_stack() were added in OpenSSL 3.0.

COPYRIGHTCopyright 2000−2021 The OpenSSL Project Authors. All Rights Reserved. Licensed under the Apache License 2.0 (the License). You may not use this file except in compliance with the License. You can obtain a copy in the file LICENSE in the source distribution or at <https://www.openssl.org/source/license.html>.
0
Johanes Gumabo
Data Size   :   11,287 byte
man-SSL_load_client_CA_file_ex.3osslBuild   :   2024-12-29, 07:25   :  
Visitor Screen   :   x
Visitor Counter ( page / site )   :   3 / 260,206
Visitor ID   :     :  
Visitor IP   :   52.14.49.59   :  
Visitor Provider   :   AMAZON-02   :  
Provider Position ( lat x lon )   :   39.962500 x -83.006100   :   x
Provider Accuracy Radius ( km )   :   1000   :  
Provider City   :   Columbus   :  
Provider Province   :   Ohio ,   :   ,
Provider Country   :   United States   :  
Provider Continent   :   North America   :  
Visitor Recorder   :   Version   :  
Visitor Recorder   :   Library   :  
Online Linux Manual Page   :   Version   :   Online Linux Manual Page - Fedora.40 - march=x86-64 - mtune=generic - 24.12.29
Online Linux Manual Page   :   Library   :   lib_c - 24.10.03 - march=x86-64 - mtune=generic - Fedora.40
Online Linux Manual Page   :   Library   :   lib_m - 24.10.03 - march=x86-64 - mtune=generic - Fedora.40
Data Base   :   Version   :   Online Linux Manual Page Database - 24.04.13 - march=x86-64 - mtune=generic - fedora-38
Data Base   :   Library   :   lib_c - 23.02.07 - march=x86-64 - mtune=generic - fedora.36

Very long time ago, I have the best tutor, Wenzel Svojanovsky . If someone knows the email address of Wenzel Svojanovsky , please send an email to johanes_gumabo@yahoo.co.id .
If error, please print screen and send to johanes_gumabo@yahoo.co.id
Under development. Support me via PayPal.

ERROR : Need New Coding :         (parse_manual_page_|252|S___SL_add_dir_cert_subjects_to_stack.3ossl|36/37|el══─{─══.|.el══─{─══. ds -- \|\(em\| )         (htmlprn|149|S___SL_add_dir_cert_subjects_to_stack.3ossl|36/37|.el══─{─══. ds --  —  |.el══─{─══. ds -- \|\(em\| )         (parse_manual_page_|252|S___SL_add_dir_cert_subjects_to_stack.3ossl|43|br══─}─══|'br══─}─══ )         (htmlprn|149|S___SL_add_dir_cert_subjects_to_stack.3ossl|43|'br══─}─══ |'br══─}─══ )