Guide
Configuring OpenSSL 3.x to Use Only the Default Provider for TLS Termination
Guide to configure OpenSSL 3.x to load only the default provider for TLS termination, with steps, verification commands, and rollback options.
Published by Tasadduq Burney
19 Sept 2026, 00:59 UTC
3 min24K views0

Desired outcome
Run a TLS‑terminating service (e.g., nginx, Apache, or a custom server) that uses only OpenSSL 3.x’s default provider for all cryptographic primitives. The legacy provider must not be loaded, so the set of available algorithms is deterministic and can be audited for compliance.
Prerequisites
- OpenSSL 3.0 or later built with provider support (check with
openssl version -a). - Administrative access to the server’s OpenSSL configuration file (typically
/etc/ssl/openssl.cnfor an application‑specific config). - PEM‑encoded server certificate and private key ready for use.
- A test client capable of TLS 1.2+ handshakes (e.g.,
openssl s_client). - Ability to restart the TLS‑terminating service and inspect its logs.
Procedure
- Backup the existing configuration
sudo cp /etc/ssl/openssl.cnf /etc/ssl/openssl.cnf.bak - Edit the provider section
Locate the
[provider_sect]block (or create it if missing) and ensure only thedefaultprovider is listed. Example snippet:
If a[provider_sect] default = default_sect [default_sect] activate = 1legacyentry exists, comment it out or remove it. - Set protocol and cipher restrictions
In the same file (or in the application’s SSL config) add:
This disables TLS 1.0/1.1 and limits ciphers to those considered secure by the default provider.MinProtocol = TLSv1.2 CipherString = DEFAULT@SECLEVEL=2 - Verify the syntax
Correct any errors before proceeding.openssl cnf-test -f /etc/ssl/openssl.cnf - Restart the TLS service
Example for nginx:
For other services, use the appropriate restart command.sudo systemctl restart nginx
Expected checks
- Version and build info
Confirm the output shows OpenSSL 3.x andopenssl version -abuilt on:date. - Loaded providers
Expect onlyopenssl list -providersdefault(and possiblybase) to appear;legacyshould be absent. - TLS handshake test
Replace
HOSTandPORTwith your service’s address:
Look for lines like:openssl s_client -connect HOST:PORT -servername example.com -tls1_3Protocol : TLSv1.3 Cipher : TLS_AES_256_GCM_SHA384The negotiated cipher must be one offered by the default provider. - Log inspection
Check the service journal or logs for provider initialization messages, e.g.,
Ensure there are no warnings about loading the legacy provider or attempting to use deprecated algorithms.journalctl -u nginx | grep -i "provider default"
Recovery options (rollback)
Because the procedure changes the OpenSSL configuration and restarts the service, you can revert as follows:
- Restore the backup configuration
sudo cp /etc/ssl/openssl.cnf.bak /etc/ssl/openssl.cnf sudo systemctl restart nginx - Temporarily re‑enable the legacy provider
Edit
/etc/ssl/openssl.cnfto add alegacyentry in[provider_sect]and set itsactivate = 1. Restart the service and verify connectivity with older clients. - Relax protocol or cipher constraints
If only a subset of modern clients fails, adjust
MinProtocoltoTLSv1.0or modifyCipherStringto includeDEFAULT@SECLEVEL=1, then restart. - Rollback the OpenSSL binary If the service binary itself was upgraded and you suspect a regression, reinstall the previous OpenSSL package (using your distribution’s package manager) and restart the service.
Limitations and practical verification
- Provider names and config directives differ slightly between OpenSSL 3.0, 3.1, and 3.2. Consult the man page for
config(5)matching your installed version before applying the snippet. - Disabling the legacy provider removes support for MD5‑based signatures, RC4, DES, and other deprecated algorithms. Existing clients or certificates that rely on these will fail the handshake.
- Using only the
defaultprovider does **not** imply FIPS validation. FIPS mode requires a separate, validatedfipsprovider and explicit activation viaOPENSSL_CONFor application code. - After any change, repeat the checks in the Expected checks section. Success is confirmed when:
openssl list -providersshows onlydefault(andbase).- A TLS 1.2/1.3 handshake completes with a cipher from the default suite.
- Service logs contain provider initialization lines for
defaultand no legacy‑related warnings.
0 replies
A thoughtful contribution can make all the difference. Be the first to share one.