SSL_load_client_CA_file.pod revision 72613
172613Skris=pod 272613Skris 372613Skris=head1 NAME 472613Skris 572613SkrisSSL_load_client_CA_file - load certificate names from file 672613Skris 772613Skris=head1 SYNOPSIS 872613Skris 972613Skris #include <openssl/ssl.h> 1072613Skris 1172613Skris STACK_OF(X509_NAME) *SSL_load_client_CA_file(const char *file); 1272613Skris 1372613Skris=head1 DESCRIPTION 1472613Skris 1572613SkrisSSL_load_client_CA_file() reads certificates from B<file> and returns 1672613Skrisa STACK_OF(X509_NAME) with the subject names found. 1772613Skris 1872613Skris=head1 NOTES 1972613Skris 2072613SkrisSSL_load_client_CA_file() reads a file of PEM formatted certificates and 2172613Skrisextracts the X509_NAMES of the certificates found. While the name suggests 2272613Skristhe specific usage as support function for 2372613SkrisL<SSL_CTX_set_client_CA_list(3)|SSL_CTX_set_client_CA_list(3)>, 2472613Skrisit is not limited to CA certificates. 2572613Skris 2672613Skris=head1 EXAMPLES 2772613Skris 2872613SkrisLoad names of CAs from file and use it as a client CA list: 2972613Skris 3072613Skris SSL_CTX *ctx; 3172613Skris STACK_OF(X509_NAME) *cert_names; 3272613Skris 3372613Skris ... 3472613Skris cert_names = SSL_load_client_CA_file("/path/to/CAfile.pem"); 3572613Skris if (cert_names != NULL) 3672613Skris SSL_CTX_set_client_CA_list(ctx, cert_names); 3772613Skris else 3872613Skris error_handling(); 3972613Skris ... 4072613Skris 4172613Skris=head1 RETURN VALUES 4272613Skris 4372613SkrisThe following return values can occur: 4472613Skris 4572613Skris=over 4 4672613Skris 4772613Skris=item NULL 4872613Skris 4972613SkrisThe operation failed, check out the error stack for the reason. 5072613Skris 5172613Skris=item Pointer to STACK_OF(X509_NAME) 5272613Skris 5372613SkrisPointer to the subject names of the successfully read certificates. 5472613Skris 5572613Skris=back 5672613Skris 5772613Skris=head1 SEE ALSO 5872613Skris 5972613SkrisL<ssl(3)|ssl(3)>, 6072613SkrisL<SSL_CTX_set_client_CA_list(3)|SSL_CTX_set_client_CA_list(3)> 6172613Skris 6272613Skris=cut 63