gtpc1m5hTransmission Control Protocol/Internet Protocol

SSL_CTX_load_verify_locations

The SSL_CTX_load_verify_locations function loads the certificates of the certificate authorities (CAs) that are trusted by this application and that will be used to verify certificates that are received from remote applications. Certificate revocation lists (CRLs) are also loaded if any exist.

Format

#include <openssl/ssl.h>
int SSL_CTX_load_verify_locations(SSL_CTX *ctx,
                                  const char *CAfile,
                                  const char *CApath)

ctx
A pointer to a token returned on the SSL_CTX_new call or the SSL_CTX_new_shared call.

CAfile
A pointer to the name of the file that contains the certificates of the trusted CAs and CRLs. The file must be in PEM (base64 encoded) format. The value of this parameter can be NULL if the value of the CApath parameter is not NULL. The maximum length is 255 characters.

CApath
A pointer to the name of the directory that contains the certificates of the trusted CAs and CRLs. The files in the directory must be in PEM (base64 encoded) format. The value of this parameter can be NULL if the value of the CAfile parameter is not NULL. The maximum length is 255 characters.

Normal Return

Return code 1 indicates that the function was successful.

Error Return

A return code equal to 0 indicates an error. The following are the most likely causes of errors:

Programming Considerations

Examples

For sample SSL applications, go to http://www.ibm.com/tpf/pubs/tpfpubs.htm, click SSL for the TPF 4.1 System: An Online User's Guide, and click Examples from the left navigation bar.

Related Information