Add support for TLS 1.3 #825

Open
opened 2026-10-05 04:46:47 +02:00 by adam · 4 comments
Owner

Most of it just works if openssl is new enough. However, potentially missing pieces:

  • ability to enable/disable it
  • configuration: SSL_CTX_set_ciphersuites()
  • test requesting cert from client: SSL_verify_client_post_handshake()
  • test SNI: SSL_set_tlsext_host_name()

sessions are not used currently in ZNC (other than displaying some random info in schat), so don't need any changes

Most of it just works if openssl is new enough. However, potentially missing pieces: * [ ] ability to enable/disable it * [ ] configuration: SSL_CTX_set_ciphersuites() * [ ] test requesting cert from client: SSL_verify_client_post_handshake() * [ ] test SNI: SSL_set_tlsext_host_name() sessions are not used currently in ZNC (other than displaying some random info in schat), so don't need any changes <!-- github-sync-id:312252755 -->
Author
Owner

Any news for this?

Any news for this? <!-- github-comment-id:493794871 -->
Author
Owner

As said: it just works if openssl is new enough.

Test software used: sslscan

Versions & settings in use on ZNC server:

  • OS: Debian 10.5
  • OpenSSL: 1.1.1d 10 Sep 2019
  • ZNC:
    • version: 1.8.1
    • config:
      • SSLCiphers = ECDSA+AESGCM:ECDSA+CHACHA20
      • SSLProtocols = -SSLv2 -SSLv3 -TLSv1 -TLSv1.1 +TLSv1.2

OUTPUT with znc.pem created by default (RSA:2048):

**SSL/TLS Protocols:
SSLv2     disabled
SSLv3     disabled
TLSv1.0   disabled
TLSv1.1   disabled
TLSv1.2   disabled
TLSv1.3   enabled

**TLS Fallback SCSV:
Server supports TLS Fallback SCSV

**TLS renegotiation:
Session renegotiation not supported

**TLS Compression:
Compression disabled

**Heartbleed:
TLSv1.3 not vulnerable to heartbleed

**Supported Server Cipher(s):
Preferred TLSv1.3  256 bits  TLS_AES_256_GCM_SHA384        Curve 25519 DHE 253
Accepted  TLSv1.3  256 bits  TLS_CHACHA20_POLY1305_SHA256  Curve 25519 DHE 253
Accepted  TLSv1.3  128 bits  TLS_AES_128_GCM_SHA256        Curve 25519 DHE 253

**Server Key Exchange Group(s):
TLSv1.3  128 bits  secp256r1 (NIST P-256)
TLSv1.3  192 bits  secp384r1 (NIST P-384)
TLSv1.3  260 bits  secp521r1 (NIST P-521)
TLSv1.3  128 bits  x25519
TLSv1.3  224 bits  x448

**Server Signature Algorithm(s):
TLSv1.3  rsa_pss_rsae_sha256
TLSv1.3  rsa_pss_rsae_sha384
TLSv1.3  rsa_pss_rsae_sha512

**SSL Certificate:
Signature Algorithm: sha256WithRSAEncryption
RSA Key Strength:    2048

OUTPUT with znc.pem created manually (ECC):

**SSL/TLS Protocols:
SSLv2     disabled
SSLv3     disabled
TLSv1.0   disabled
TLSv1.1   disabled
TLSv1.2   enabled
TLSv1.3   enabled

**TLS Fallback SCSV:
Server supports TLS Fallback SCSV

**TLS renegotiation:
Session renegotiation not supported

**TLS Compression:
Compression disabled

**Heartbleed:
TLSv1.3 not vulnerable to heartbleed
TLSv1.2 not vulnerable to heartbleed

**Supported Server Cipher(s):
Preferred TLSv1.3  256 bits  TLS_AES_256_GCM_SHA384        Curve 25519 DHE 253
Accepted  TLSv1.3  256 bits  TLS_CHACHA20_POLY1305_SHA256  Curve 25519 DHE 253
Accepted  TLSv1.3  128 bits  TLS_AES_128_GCM_SHA256        Curve 25519 DHE 253
Preferred TLSv1.2  256 bits  ECDHE-ECDSA-AES256-GCM-SHA384 Curve 25519 DHE 253
Accepted  TLSv1.2  128 bits  ECDHE-ECDSA-AES128-GCM-SHA256 Curve 25519 DHE 253
Accepted  TLSv1.2  256 bits  ECDHE-ECDSA-CHACHA20-POLY1305 Curve 25519 DHE 253

**Server Key Exchange Group(s):
TLSv1.3  128 bits  secp256r1 (NIST P-256)
TLSv1.3  192 bits  secp384r1 (NIST P-384)
TLSv1.3  260 bits  secp521r1 (NIST P-521)
TLSv1.3  128 bits  x25519
TLSv1.3  224 bits  x448
TLSv1.2  128 bits  secp256r1 (NIST P-256)

**Server Signature Algorithm(s):
TLSv1.3  ecdsa_secp256r1_sha256

**SSL Certificate:
Signature Algorithm: ecdsa-with-SHA512
ECC Curve Name:      prime256v1
ECC Key Strength:    128

In both cases, my irc client successfully connect to ZNC with info:

* Cipher info:
*   Version: TLSv1.3, cipher TLS_AES_256_GCM_SHA384 (256 bits)

At the moment it works perfectly with tls1.3!

As said: *it just works if openssl is new enough*. Test software used: [sslscan](https://github.com/rbsec/sslscan) Versions & settings in use on ZNC server: - OS: Debian 10.5 - OpenSSL: 1.1.1d 10 Sep 2019 - ZNC: - version: 1.8.1 - config: - SSLCiphers = ECDSA+AESGCM:ECDSA+CHACHA20 - SSLProtocols = -SSLv2 -SSLv3 -TLSv1 -TLSv1.1 +TLSv1.2 **OUTPUT** with *znc.pem* created *by default* (RSA:2048): ``` **SSL/TLS Protocols: SSLv2 disabled SSLv3 disabled TLSv1.0 disabled TLSv1.1 disabled TLSv1.2 disabled TLSv1.3 enabled **TLS Fallback SCSV: Server supports TLS Fallback SCSV **TLS renegotiation: Session renegotiation not supported **TLS Compression: Compression disabled **Heartbleed: TLSv1.3 not vulnerable to heartbleed **Supported Server Cipher(s): Preferred TLSv1.3 256 bits TLS_AES_256_GCM_SHA384 Curve 25519 DHE 253 Accepted TLSv1.3 256 bits TLS_CHACHA20_POLY1305_SHA256 Curve 25519 DHE 253 Accepted TLSv1.3 128 bits TLS_AES_128_GCM_SHA256 Curve 25519 DHE 253 **Server Key Exchange Group(s): TLSv1.3 128 bits secp256r1 (NIST P-256) TLSv1.3 192 bits secp384r1 (NIST P-384) TLSv1.3 260 bits secp521r1 (NIST P-521) TLSv1.3 128 bits x25519 TLSv1.3 224 bits x448 **Server Signature Algorithm(s): TLSv1.3 rsa_pss_rsae_sha256 TLSv1.3 rsa_pss_rsae_sha384 TLSv1.3 rsa_pss_rsae_sha512 **SSL Certificate: Signature Algorithm: sha256WithRSAEncryption RSA Key Strength: 2048 ``` **OUTPUT** with *znc.pem* created *manually* (ECC): ``` **SSL/TLS Protocols: SSLv2 disabled SSLv3 disabled TLSv1.0 disabled TLSv1.1 disabled TLSv1.2 enabled TLSv1.3 enabled **TLS Fallback SCSV: Server supports TLS Fallback SCSV **TLS renegotiation: Session renegotiation not supported **TLS Compression: Compression disabled **Heartbleed: TLSv1.3 not vulnerable to heartbleed TLSv1.2 not vulnerable to heartbleed **Supported Server Cipher(s): Preferred TLSv1.3 256 bits TLS_AES_256_GCM_SHA384 Curve 25519 DHE 253 Accepted TLSv1.3 256 bits TLS_CHACHA20_POLY1305_SHA256 Curve 25519 DHE 253 Accepted TLSv1.3 128 bits TLS_AES_128_GCM_SHA256 Curve 25519 DHE 253 Preferred TLSv1.2 256 bits ECDHE-ECDSA-AES256-GCM-SHA384 Curve 25519 DHE 253 Accepted TLSv1.2 128 bits ECDHE-ECDSA-AES128-GCM-SHA256 Curve 25519 DHE 253 Accepted TLSv1.2 256 bits ECDHE-ECDSA-CHACHA20-POLY1305 Curve 25519 DHE 253 **Server Key Exchange Group(s): TLSv1.3 128 bits secp256r1 (NIST P-256) TLSv1.3 192 bits secp384r1 (NIST P-384) TLSv1.3 260 bits secp521r1 (NIST P-521) TLSv1.3 128 bits x25519 TLSv1.3 224 bits x448 TLSv1.2 128 bits secp256r1 (NIST P-256) **Server Signature Algorithm(s): TLSv1.3 ecdsa_secp256r1_sha256 **SSL Certificate: Signature Algorithm: ecdsa-with-SHA512 ECC Curve Name: prime256v1 ECC Key Strength: 128 ``` In both cases, my irc client successfully connect to ZNC with info: ``` * Cipher info: * Version: TLSv1.3, cipher TLS_AES_256_GCM_SHA384 (256 bits) ``` At the moment it works perfectly with tls1.3! <!-- github-comment-id:685729582 -->
Author
Owner

perfectly

Other than inability to configure it, e.g. disable it. The cipher you reported as used (TLS_AES_256_GCM_SHA384) is not one of ciphers in your SSLCiphers (ECDSA+AESGCM:ECDSA+CHACHA20).

> perfectly Other than inability to configure it, e.g. disable it. The cipher you reported as used (`TLS_AES_256_GCM_SHA384`) is not one of ciphers in your `SSLCiphers` (`ECDSA+AESGCM:ECDSA+CHACHA20`). <!-- github-comment-id:685739172 -->
Author
Owner

The cipher you reported as used (TLS_AES_256_GCM_SHA384) is not one of ciphers in your SSLCiphers (ECDSA+AESGCM:ECDSA+CHACHA20).

This is the output from command line:

openssl ciphers -v ECDSA+AESGCM:ECDSA+CHACHA20

TLS_AES_256_GCM_SHA384  TLSv1.3 Kx=any      Au=any  Enc=AESGCM(256) Mac=AEAD
TLS_CHACHA20_POLY1305_SHA256 TLSv1.3 Kx=any      Au=any  Enc=CHACHA20/POLY1305(256) Mac=AEAD
TLS_AES_128_GCM_SHA256  TLSv1.3 Kx=any      Au=any  Enc=AESGCM(128) Mac=AEAD
ECDHE-ECDSA-AES256-GCM-SHA384 TLSv1.2 Kx=ECDH     Au=ECDSA Enc=AESGCM(256) Mac=AEAD
ECDHE-ECDSA-AES128-GCM-SHA256 TLSv1.2 Kx=ECDH     Au=ECDSA Enc=AESGCM(128) Mac=AEAD
ECDHE-ECDSA-CHACHA20-POLY1305 TLSv1.2 Kx=ECDH     Au=ECDSA Enc=CHACHA20/POLY1305(256)
> The cipher you reported as used (`TLS_AES_256_GCM_SHA384`) is not one of ciphers in your `SSLCiphers` (`ECDSA+AESGCM:ECDSA+CHACHA20`). This is the output from command line: ``` openssl ciphers -v ECDSA+AESGCM:ECDSA+CHACHA20 TLS_AES_256_GCM_SHA384 TLSv1.3 Kx=any Au=any Enc=AESGCM(256) Mac=AEAD TLS_CHACHA20_POLY1305_SHA256 TLSv1.3 Kx=any Au=any Enc=CHACHA20/POLY1305(256) Mac=AEAD TLS_AES_128_GCM_SHA256 TLSv1.3 Kx=any Au=any Enc=AESGCM(128) Mac=AEAD ECDHE-ECDSA-AES256-GCM-SHA384 TLSv1.2 Kx=ECDH Au=ECDSA Enc=AESGCM(256) Mac=AEAD ECDHE-ECDSA-AES128-GCM-SHA256 TLSv1.2 Kx=ECDH Au=ECDSA Enc=AESGCM(128) Mac=AEAD ECDHE-ECDSA-CHACHA20-POLY1305 TLSv1.2 Kx=ECDH Au=ECDSA Enc=CHACHA20/POLY1305(256) ``` <!-- github-comment-id:685760688 -->
Sign in to join this conversation.
No labels
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: adam/znc#825