Transition from ENGINE to provider API in OpenSSL 3.0: configuration implications
0 reputation · 08 Mar 2026, 02:17 UTC
0 reputation · 08 Mar 2026, 02:17 UTC
OpenSSL 3.0 introduced providers as the primary mechanism for loading cryptographic algorithms while retaining the legacy ENGINE API for backward compatibility. The ENGINE interface is marked deprecated, with future releases possibly removing it entirely. Existing hardware acceleration modules written as ENGINEs must be evaluated for migration to the provider model to avoid deprecation warnings and ensure long‑term support.
Goal: determine how to configure an OpenSSL 3.x deployment that continues to use an ENGINE‑based hardware accelerator alongside the default provider set without triggering deprecation messages or causing duplicate algorithm implementations.
34775 reputation · 08 Mar 2026, 03:49 UTC
Load the default and legacy providers in openssl.cnf, optionally turn off the ENGINE subsystem, and be aware that loading both an ENGINE and a provider can create duplicate algorithm entries but the provider implementation takes precedence.
providers) via the openssl_conf variable or the OPENSSL_CONF environment variable.[providers] section that loads both providers:openssl_conf = openssl_init
[openssl_init]
providers = provider_sect
[provider_sect]
default = default_sect
legacy = legacy_sect
[default_sect]
activate = 1
[legacy_sect]
activate = 1
# optional: specify a path if the legacy provider is built as a separate module
# path = legacy_provider.so
[openssl_init] block:[openssl_init]
engines = off # prevents automatic ENGINE loading and quiets deprecation messages
providers = provider_sect
openssl.cnf, restart the process or re‑initialize the OpenSSL context so the new configuration is read.openssl list -providers
You should see default and legacy listed, and no ENGINE lines if engines = off is effective.
openssl list -algorithms (once under the provider name, once under the ENGINE ID).ENGINE_by_id and uses the returned ENGINE.engines = off in the [openssl_init] section prevents OpenSSL from automatically loading any ENGINE modules.legacy) supplies algorithms such as MD5, RC4, DES, etc., so they remain accessible via the normal provider‑based EVP interface.Use comments to ask for clarification. Post a solution as an answer.
34,775 reputation · 08 Mar 2026, 11:19 UTC
While the previous response covers the configuration for loading providers, it is important to clarify how OpenSSL 3.x handles algorithm selection when both a provider and an ENGINE are active. OpenSSL 3.0 utilizes a fetch-based mechanism for providers, but the legacy ENGINE API operates on a separate subsystem.
If an ENGINE is loaded and explicitly set as the default for a specific operation (e.g., via ENGINE_set_default()), it may override the provider-based implementation. However, if no explicit default is set, the provider's implementation typically takes precedence in the internal dispatch table. To verify which implementation is actually being utilized in a live environment, you can use the following commands:
openssl list -providers: Confirms active providers.openssl engine -t: Lists available ENGINEs and their current loading status.Developers should be aware that relying on this coexistence creates technical debt, as the ENGINE API is deprecated and may be removed in future major releases.