OPENSSL_CONFIG(3ossl)

πŸ“¦
version 15.1 Β· 3 versions
, in freebsd 15.1

πŸŽ€ NAME πŸŽ€

Okay bestie, welcome to OPENSSL_CONFIG(3ossl) β€” the manual page for the simple OpenSSL configuration functions, aka OPENSSL_config and OPENSSL_no_config. Yes, they’re deprecated, and yes, we’re gonna get into it πŸ’….


✨ SYNOPSIS ✨

First, include the header, bestie:

#include <openssl/conf.h>

The following functions have been deprecated since OpenSSL 1.1.0, and can be hidden entirely by defining OPENSSL_API_COMPAT with a suitable version value, see openssl_user_macros(7):

void OPENSSL_config(const char *appname);
void OPENSSL_no_config(void);

🌸 DESCRIPTION 🌸

OPENSSL_config() configures OpenSSL using the standard openssl.cnf and reads from the application section appname. If appname is NULL, then the default section, openssl_conf, will be used.

⚠️ Errors are silently ignored. Like, no drama, no screaming, no error return β€” they just vanish into the void 😭. Multiple calls have no effect.

OPENSSL_no_config() disables configuration. If it’s called before OPENSSL_config(), no configuration takes place β€” periodt.

If the application is built with OPENSSL_LOAD_CONF defined, then a call to OpenSSL_add_all_algorithms() will implicitly call OPENSSL_config() first. Sneaky little pregame move, honestly 🫢.


πŸ¦‹ NOTES πŸ¦‹

The OPENSSL_config() function is designed to be a very simple β€œcall it and forget it” function. It is however much better than nothing. Lowkey iconic for how unbothered it is.

Applications which need finer control over their configuration functionality should use the configuration functions such as CONF_modules_load() directly. This function is deprecated and its use should be avoided. Applications should instead call CONF_modules_load() during initialization (that is before starting any threads). No cap, that’s the move.

There are several reasons why calling the OpenSSL configuration routines is advisable. For example, to load dynamic ENGINEs from shared libraries (DSOs). However, very few applications currently support the control interface and so very few can load and use dynamic ENGINEs. Equally in future more sophisticated ENGINEs will require certain control operations to customize them. If an application calls OPENSSL_config() it doesn’t need to know or care about ENGINE control operations because they can be performed by editing a configuration file. It’s giving β€œlet the config file handle it” energy πŸ‘‘.


πŸ’œ ENVIRONMENT πŸ’œ

  • OPENSSL_CONF β€” the path to the config file. Ignored in set-user-ID and set-group-ID programs. Respect the security vibe check 🫑.

πŸ“ RETURN VALUES πŸ“

Neither OPENSSL_config() nor OPENSSL_no_config() return a value. They simply do the thing and leave, main character style πŸ’….


🌈 SEE ALSO 🌈


🧚 HISTORY 🧚

The OPENSSL_no_config() and OPENSSL_config() functions were deprecated in OpenSSL 1.1.0 by OPENSSL_init_crypto(). They really said β€œyour time is up” 😭.


Copyright 2004-2020 The OpenSSL Project Authors. All Rights Reserved.

Licensed under the Apache License 2.0 (the "License"). You may not use this file except in compliance with the License. You can obtain a copy in the file LICENSE in the source distribution or at <https://www.openssl.org/source/license.html>.


β€” signed off with love from version 3.5.6, dated 2026-04-07 πŸ’–πŸ¦‹βœ¨

πŸ“¦ where this page comes from