From 82b7f378b6907ab315a6e50322d2a0a8794a0aa9 Mon Sep 17 00:00:00 2001 From: bentley <> Date: Sun, 12 Oct 2014 09:33:04 +0000 Subject: Convert libssl manpages from pod to mdoc(7). libcrypto has not been started yet. ok schwarze@ miod@ --- src/lib/libssl/doc/SSL_load_client_CA_file.3 | 50 ++++++++++++++++++++++++++++ 1 file changed, 50 insertions(+) create mode 100644 src/lib/libssl/doc/SSL_load_client_CA_file.3 (limited to 'src/lib/libssl/doc/SSL_load_client_CA_file.3') diff --git a/src/lib/libssl/doc/SSL_load_client_CA_file.3 b/src/lib/libssl/doc/SSL_load_client_CA_file.3 new file mode 100644 index 0000000000..52d21e8e31 --- /dev/null +++ b/src/lib/libssl/doc/SSL_load_client_CA_file.3 @@ -0,0 +1,50 @@ +.Dd $Mdocdate: October 12 2014 $ +.Dt SSL_LOAD_CLIENT_CA_FILE 3 +.Os +.Sh NAME +.Nm SSL_load_client_CA_file +.Nd load certificate names from file +.Sh SYNOPSIS +.In openssl/ssl.h +.Ft STACK_OF(X509_NAME) * +.Fn SSL_load_client_CA_file "const char *file" +.Sh DESCRIPTION +.Fn SSL_load_client_CA_file +reads certificates from +.Fa file +and returns a +.Dv STACK_OF Ns +.Pq Vt X509_NAME +with the subject names found. +.Sh NOTES +.Fn SSL_load_client_CA_file +reads a file of PEM formatted certificates and extracts the +.Vt X509_NAME Ns s +of the certificates found. +While the name suggests the specific usage as support function for +.Xr SSL_CTX_set_client_CA_list 3 , +it is not limited to CA certificates. +.Sh RETURN VALUES +The following return values can occur: +.Bl -tag -width Ds +.It Dv NULL +The operation failed, check out the error stack for the reason. +.It Pointer to Dv STACK_OF Ns Po Vt X509_NAME Pc +Pointer to the subject names of the successfully read certificates. +.El +.Sh EXAMPLES +Load names of CAs from file and use it as a client CA list: +.Bd -literal +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_handling(); +\&... +.Ed +.Sh SEE ALSO +.Xr ssl 3 , +.Xr SSL_CTX_set_client_CA_list 3 -- cgit v1.2.3-55-g6feb