SSL_CTX_load_verify_locations

Load trusted CA certificates from a PEM file and/or hashed directory into an SSL context.

Synopsis

Declared in <openssl/ssl.h>

int
SSL_CTX_load_verify_locations(
    SSL_CTX* ctx,
    char const* CAfile,
    char const* CApath);

Return Value

1 on success, or 0 on failure.

Parameters

NameDescription
ctxSSL context whose verification store is updated.
CAfilePath to a PEM file of CA certificates, or NULL to skip.
CApathDirectory of PEM certificates named by subject-name hash, or NULL to skip.