Automatically generated by Pod::Man 4.07 (Pod::Simple 3.32) Standard preamble: ========================================================================
NAMESSL_CTX_load_verify_locations - set default locations for trusted CA certificates
#include <openssl/ssl.h> int SSL_CTX_load_verify_locations(SSL_CTX *ctx, const char *CAfile, const char *CApath);
DESCRIPTIONSSL_CTX_load_verify_locations() specifies the locations for ctx, at which
NOTESIf CAfile is not
-----BEGIN CERTIFICATE----- ... (CA certificate in base64 encoding) ... -----END CERTIFICATE-----
sequences. Before, between, and after the certificates text is allowed which can be used e.g. for descriptions of the certificates.
The CAfile is processed on execution of the SSL_CTX_load_verify_locations() function.
If CApath is not
The certificates in CApath are only looked up when required, e.g. when building the certificate chain or when actually performing the verification of a peer certificate.
When looking up
In server mode, when requesting a client certificate, the server must send the list of CAs of which it will accept client certificates. This list is not influenced by the contents of CAfile or CApath and must explicitly be set using the SSL_CTX_set_client_CA_list(3) family of functions.
When building its own certificate chain, an OpenSSL client/server will try to fill in missing certificates from CAfile/CApath, if the certificate chain was not explicitly specified (see SSL_CTX_add_extra_chain_cert(3), SSL_CTX_use_certificate(3).
#!/bin/sh rm CAfile.pem for i in ca1.pem ca2.pem ca3.pem ; do openssl x509 -in $i -text >> CAfile.pem done
Prepare the directory /some/where/certs containing several
cd /some/where/certs c_rehash .
RETURN VALUESThe following return values can occur:
The operation failed because CAfile and CApath are NULLor the processing at one of the locations specified failed. Check the error stack to find out the reason.
- The operation succeeded.