libressl-OPENSSL_config(3)

libressl-OPENSSL_config3

Simple crypto and ssl library configuration

Usage

Crypto Library (libcrypto, -lcrypto)

#include <openssl/conf.h>

void

OPENSSL_config(const char *appname);

void

OPENSSL_no_config(void);

Overview

OPENSSL_config() initializes the crypto library and calls CONF_modules_load_file(3) with the standard configuration file and the given appname. If appname is NULL, then the default name openssl_conf is used. Any errors are ignored. Further calls to OPENSSL_config() have no effect.

OPENSSL_no_config() suppresses the loading of the standard configuration file, so that any future calls to OPENSSL_config() or to OPENSSL_init_crypto(3) will ensure the library is initialized but no configuration file will be loaded.

Calling these functions is optional. All required initialization of the crypto libraries happens automatically when needed.

To use a non-standard configuration file, refer to CONF_modules_load_file(3).

Internally, OPENSSL_config() calls OPENSSL_init_crypto(3).

If an application is compiled with the preprocessor symbol OPENSSL_LOAD_CONF defined, OpenSSL_add_all_algorithms(3) automatically calls OPENSSL_config().

Applications should free up configuration at application closedown by calling CONF_modules_free(3).

Files

/etc/ssl/openssl.cnf

standard configuration file

History

OPENSSL_config() and OPENSSL_no_config() first appeared in OpenSSL 0.9.7 and have been available since OpenBSD 3.2.

From libressl 4.4.0-1 in Arch Linux 2026-11-01. Parsed by carta from the page's mdoc source.