Chapter 4. Planning and implementing TLS


When you harden TLS, you must balance security and client compatibility. Stricter settings limit client support. Relaxed settings support more clients but reduce security.

TLS (Transport Layer Security) secures network traffic. You can improve security by setting:

  • Key-exchange methods
  • Authentication methods
  • Encryption algorithms

More client support means lower security. Strict settings mean better security but less compatibility.

Use the strictest settings. Relax them only when you need more compatibility.

4.1. SSL and TLS protocols

Review the history and usage recommendations for SSL and TLS protocols to understand which versions are secure and which to avoid.

Netscape Corporation developed the Secure Sockets Layer (SSL) protocol for secure Internet communication. The Internet Engineering Task Force (IETF) adopted it and renamed it Transport Layer Security (TLS).

TLS sits between an application protocol layer and a reliable transport layer such as TCP/IP. You can layer TLS underneath different protocols such as HTTP, FTP, and SMTP.

Protocol versionUsage recommendation

SSL v2

Do not use. This version has serious security vulnerabilities. RHEL 7 removed it from the core cryptographic libraries.

SSL v3

Do not use. This version has serious security vulnerabilities. RHEL 8 removed it from the core cryptographic libraries.

TLS 1.0

Not recommended. This version has known issues that cannot be fixed. It does not support modern cipher suites. RHEL 10 disables it in all cryptographic policies.

TLS 1.1

Use only for interoperability. This version does not support modern cipher suites. RHEL 10 disables it in all cryptographic policies.

TLS 1.2

Uses AEAD cipher suites. All system-wide cryptographic policies enable this version. Some optional parts have vulnerabilities. Supports outdated algorithms.

TLS 1.3

Recommended version. Removes known problematic options. Provides additional privacy by encrypting more of the handshake. Faster due to more efficient algorithms. All system-wide cryptographic policies enable this version.

4.2. Security considerations for TLS in RHEL 10

Review key security aspects when configuring TLS in RHEL. You can harden your cryptographic settings by selecting protocols, cipher suites, and key lengths.

RHEL 10 libraries provide secure default settings for most deployments. TLS implementations use secure algorithms when possible. They do not prevent connections from or to legacy clients or servers.

Apply hardened settings in strict security environments. Use hardened settings when legacy clients or servers lack secure algorithm support. Apply them when such clients are not expected or allowed to connect.

RHEL 10 configures TLS by using the system-wide cryptographic policies mechanism. TLS versions earlier than 1.2 are no longer supported. The DEFAULT, FUTURE, and LEGACY cryptographic policies allow only TLS 1.2 and 1.3.

The most straightforward way to harden your TLS configuration is switching the system-wide cryptographic policy level to FUTURE by using the update-crypto-policies --set FUTURE command.

Warning

Algorithms disabled for the LEGACY cryptographic policy do not conform to Red Hat’s vision of RHEL 10 security. Their security properties are not reliable. Consider moving away from using these algorithms instead of re-enabling them.

If you re-enable them for interoperability with old hardware, treat them as insecure. Apply extra protection measures such as isolating their network interactions to separate network segments. Do not use them across public networks.

If you do not follow RHEL system-wide cryptographic policies, use the following recommendations. These also apply when you create custom cryptographic policies for your setup. The recommendations cover protocols, cipher suites, and key lengths:

4.2.1. Protocols

The latest TLS version provides the best security. TLS 1.2 is the minimum version even when using the LEGACY cryptographic policy.

You can re-enable older protocol versions by opting out of cryptographic policies or providing a custom policy. The resulting configuration is not supported.

RHEL 10 supports TLS version 1.3. Not all features of this protocol are fully supported by RHEL 10 components. For example, Apache web server does not yet fully support the 0-RTT (Zero Round Trip Time) feature.

Warning

RHEL 9.2 and later systems running in FIPS mode enforce the Extended Primary Secret (EMS) extension (RFC 7627). The FIPS 140-3 standard requires EMS for any TLS 1.2 connection. Legacy clients that do not support EMS or TLS 1.3 cannot connect to RHEL 9 and 10 servers in FIPS mode. RHEL 9 and 10 clients in FIPS mode cannot connect to servers that support only TLS 1.2 without EMS.

4.2.2. Cipher suites

Prefer modern, secure cipher suites to old, insecure ones. Always disable eNULL and aNULL cipher suites. These offer no encryption or authentication.

Disable cipher suites based on RC4 or HMAC-MD5. These have serious shortcomings. Also disable export cipher suites. These have been intentionally weakened and are easy to break.

Cipher suites that offer less than 128 bits of security have a short useful life. Do not use them.

Algorithms that use 128 bits of security or more remain unbreakable for at least several years. Use these algorithms. Note that 3DES ciphers advertise 168 bits but actually offer 112 bits of security.

Always prefer cipher suites that support (perfect) forward secrecy (PFS). PFS ensures the confidentiality of encrypted data even when the server key is compromised.

This rules out the fast RSA key exchange. Use ECDHE or DHE instead. ECDHE is faster and the preferred choice.

Prefer AEAD ciphers such as AES-GCM over CBC-mode ciphers. AEAD ciphers are not vulnerable to padding oracle attacks.

AES-GCM is faster than AES in CBC mode in many cases. This is especially true when the hardware has cryptographic accelerators for AES.

ECDHE key exchange with ECDSA certificates is faster than pure RSA key exchange. You can install two pairs of certificates and keys on a server to support legacy clients. Use ECDSA keys for new clients and RSA keys for legacy ones.

4.2.3. Public key length

When using RSA keys, prefer key lengths of at least 3072 bits signed by at least SHA-256. This is sufficiently large for true 128 bits of security.

Warning

Your system security is only as strong as the weakest link in the chain. A strong cipher alone does not guarantee good security.

The keys and certificates are equally important. The hash functions and keys used by the Certification Authority (CA) to sign your keys are also important.

4.3. TLS configuration hardening in applications

You can override system-wide cryptographic policies with custom TLS configuration settings to harden specific applications.

RHEL system-wide cryptographic policies ensure security compliance for applications that use cryptographic libraries. They prevent the use of known insecure protocols, ciphers, or algorithms.

Always ensure that your server application enforces server-side cipher order. This determines the cipher suite by the order you configure. For more information, see the crypto-policies(7), config(5), and ciphers(1) man pages.

4.3.1. TLS configuration of an Apache HTTP server

The Apache HTTP Server is compatible with both OpenSSL and NSS libraries for handling TLS requirements. RHEL 10 includes packages for the mod_ssl functionality.

The mod_ssl package creates the /etc/httpd/conf.d/ssl.conf configuration file. You can use this file to modify the server’s TLS-related settings.

The httpd-manual package provides complete documentation for the Apache HTTP Server, including TLS configuration. The /usr/share/httpd/manual/mod/mod_ssl.html file describes directives available in /etc/httpd/conf.d/ssl.conf. The /usr/share/httpd/manual/ssl/ssl_howto.html file describes examples of various settings.

When modifying the /etc/httpd/conf.d/ssl.conf configuration file, consider these three directives:

SSLProtocol
Use this directive to specify the version of TLS or SSL you want to allow.
SSLCipherSuite
Use this directive to specify your preferred cipher suite or disable the ones you want to disallow.
SSLHonorCipherOrder
Uncomment and set this directive to on to ensure that the connecting clients adhere to the order of ciphers you specified.

To use only the TLS 1.2 and 1.3 protocols, add the following line to the configuration file:

SSLProtocol all -SSLv3 -TLSv1 -TLSv1.1

To enable TLS 1.3 support in Nginx, add the TLSv1.3 value to the ssl_protocols option in the server section of /etc/nginx/nginx.conf:

server {
    listen 443 ssl http2;
    listen [::]:443 ssl http2;
    …
    ssl_protocols TLSv1.2 TLSv1.3;
    ssl_ciphers
    …
}

4.3.3. TLS configuration of a Dovecot mail server

To configure the Dovecot mail server to use TLS, modify the /etc/dovecot/conf.d/10-ssl.conf configuration file. The /usr/share/doc/dovecot/wiki/SSL.DovecotConfiguration.txt file explains basic configuration directives. The standard Dovecot installation installs this file.

When modifying /etc/dovecot/conf.d/10-ssl.conf, consider these three directives:

ssl_protocols
Use this directive to specify the version of TLS or SSL you want to allow or disable.
ssl_cipher_list
Use this directive to specify your preferred cipher suites or disable the ones you want to disallow.
ssl_prefer_server_ciphers
Uncomment and set this directive to yes to ensure that the connecting clients adhere to the order of ciphers you specified.

For example, the following line in /etc/dovecot/conf.d/10-ssl.conf allows only TLS 1.1 and later:

ssl_protocols = !SSLv2 !SSLv3 !TLSv1
Red Hat logoGithubRedditYoutubeTwitter

Learn

Try, buy, & sell

Communities

About Red Hat

We deliver hardened solutions that make it easier for enterprises to work across platforms and environments, from the core datacenter to the network edge.

Making open source more inclusive

Red Hat is committed to replacing problematic language in our code, documentation, and web properties. For more details, see the Red Hat Blog.

About Red Hat Documentation

Legal Notice

Theme

© 2026 Red Hat
Back to top