Skip to content

Support TLS 1.3 ticket based session resumption #60

Closed

Description

@patrickjuchli

See new API added in Node.js 11.10.0, session event for TLS socket. We use getSession to reuse the session negotiated by the control connection for all subsequent data connections. Apparently, this is not good enough anymore for TLS 1.3.

More here, https://wiki.openssl.org/index.php/TLS1.3#Sessions

Activity

  1. dennisameling commented on Apr 21, 2026

    @dennisameling

    Is there any update on this? TLS 1.3-enabled servers are becoming much more common nowadays. I'm seeing errors like FTPError: 425 Unable to build data connection: Operation not permitted when connecting to such servers, where data transfers work in like 20-30% of the time, and in other cases returning these errors. Happy to help if needed. Thanks!

    For info, I'm seeing this in my ProFTPd server logs when TLS 1.3 is enabled:

    2026-04-21 08:04:46,270 mod_tls/2.9.2[2073817]: unable to open data connection: TLS negotiation failed
    2026-04-21 08:04:52,950 mod_tls/2.9.2[2073817]: unable to accept TLS connection: system call error: [0] Success
    2026-04-21 08:04:52,950 mod_tls/2.9.2[2073817]: unable to open data connection: TLS negotiation failed
    2026-04-21 08:05:12,077 mod_tls/2.9.2[2074262]: added 1 certs from '/opt/psa/admin/conf/httpsd.pem' to SSL_CTX certificate chain
    2026-04-21 08:05:12,190 mod_tls/2.9.2[2074262]: TLS/TLS-C requested, starting TLS handshake
    2026-04-21 08:05:12,423 mod_tls/2.9.2[2074262]: TLSv1.3 connection accepted, using cipher TLS_AES_256_GCM_SHA384 (256 bits)
    2026-04-21 08:05:13,514 mod_tls/2.9.2[2074262]: Protection set to Private
    2026-04-21 08:05:14,195 mod_tls/2.9.2[2074262]: unable to accept TLS connection: system call error: [0] Success
    2026-04-21 08:05:14,196 mod_tls/2.9.2[2074262]: unable to open data connection: TLS negotiation failed
    2026-04-21 08:05:16,913 mod_tls/2.9.2[2074286]: added 1 certs from '/opt/psa/admin/conf/httpsd.pem' to SSL_CTX certificate chain
    2026-04-21 08:05:19,730 mod_tls/2.9.2[2074262]: TLSv1.3 data connection accepted, using cipher TLS_AES_256_GCM_SHA384 (256 bits, resumed session)
    2026-04-21 08:05:20,805 mod_tls/2.9.2[2074316]: added 1 certs from '/opt/psa/admin/conf/httpsd.pem' to SSL_CTX certificate chain
    2026-04-21 08:05:20,918 mod_tls/2.9.2[2074316]: TLS/TLS-C requested, starting TLS handshake
    2026-04-21 08:05:21,149 mod_tls/2.9.2[2074316]: TLSv1.3 connection accepted, using cipher TLS_AES_256_GCM_SHA384 (256 bits)
    2026-04-21 08:05:22,257 mod_tls/2.9.2[2074316]: Protection set to Private
    2026-04-21 08:05:23,159 mod_tls/2.9.2[2074316]: TLSv1.3 data connection accepted, using cipher TLS_AES_256_GCM_SHA384 (256 bits, resumed session)
    2026-04-21 08:05:24,283 mod_tls/2.9.2[2074316]: unable to accept TLS connection: system call error: [0] Success
    2026-04-21 08:05:24,283 mod_tls/2.9.2[2074316]: unable to open data connection: TLS negotiation failed
    2026-04-21 08:05:30,831 mod_tls/2.9.2[2074316]: unable to accept TLS connection: system call error: [0] Success
    2026-04-21 08:05:30,831 mod_tls/2.9.2[2074316]: unable to open data connection: TLS negotiation failed
    2026-04-21 08:05:36,369 mod_tls/2.9.2[2074316]: unable to accept TLS connection: system call error: [0] Success
    2026-04-21 08:05:36,370 mod_tls/2.9.2[2074316]: unable to open data connection: TLS negotiation failed
    2026-04-21 08:05:42,691 mod_tls/2.9.2[2074316]: unable to accept TLS connection: system call error: [0] Success
    2026-04-21 08:05:42,691 mod_tls/2.9.2[2074316]: unable to open data connection: TLS negotiation failed
    2026-04-21 08:06:00,972 mod_tls/2.9.2[2074550]: added 1 certs from '/opt/psa/admin/conf/httpsd.pem' to SSL_CTX certificate chain
    2026-04-21 08:06:01,127 mod_tls/2.9.2[2074550]: TLS/TLS-C requested, starting TLS handshake
    2026-04-21 08:06:01,451 mod_tls/2.9.2[2074550]: TLSv1.3 connection accepted, using cipher TLS_AES_256_GCM_SHA384 (256 bits)
    2026-04-21 08:06:02,909 mod_tls/2.9.2[2074550]: Protection set to Private
    2026-04-21 08:06:03,828 mod_tls/2.9.2[2074550]: TLSv1.3 data connection accepted, using cipher TLS_AES_256_GCM_SHA384 (256 bits, resumed session)
    2026-04-21 08:06:04,752 mod_tls/2.9.2[2074550]: unable to accept TLS connection: system call error: [0] Success
    2026-04-21 08:06:04,752 mod_tls/2.9.2[2074550]: unable to open data connection: TLS negotiation failed
    2026-04-21 08:06:10,424 mod_tls/2.9.2[2074550]: unable to accept TLS connection: system call error: [0] Success
    2026-04-21 08:06:10,424 mod_tls/2.9.2[2074550]: unable to open data connection: TLS negotiation failed
    2026-04-21 08:06:16,088 mod_tls/2.9.2[2074550]: unable to accept TLS connection: system call error: [0] Success
    2026-04-21 08:06:16,088 mod_tls/2.9.2[2074550]: unable to open data connection: TLS negotiation failed
    2026-04-21 08:06:20,072 mod_tls/2.9.2[2074586]: added 1 certs from '/opt/psa/admin/conf/httpsd.pem' to SSL_CTX certificate chain
    2026-04-21 08:07:25,567 mod_tls/2.9.2[2074683]: added 1 certs from '/opt/psa/admin/conf/httpsd.pem' to SSL_CTX certificate chain
    2026-04-21 08:08:28,688 mod_tls/2.9.2[2074736]: added 1 certs from '/opt/psa/admin/conf/httpsd.pem' to SSL_CTX certificate chain
    

    Setting TLSProtocol TLSv1.2 in the ProFTPd config file on the server fixes the issue for the time being.

  2. linked a pull request that will close this issueSupport TLS 1.3 #277on Apr 29, 2026
  3. patrickjuchli commented on Apr 29, 2026

    @patrickjuchli
    OwnerAuthor

    I've opened a pull request, is that version working for you?

  4. dennisameling commented on May 2, 2026

    @dennisameling

    Looks like it's working, thank you!!

    Server config (ProFTPD)

    <IfModule mod_tls.c>
        TLSOptions EnableDiags
    </IfModule>
    

    Control connection: full handshake, server issues TLS 1.3 session tickets

    mod_tls/2.9.2[18438]: TLSOption EnableDiags enabled, setting diagnostics callback
    mod_tls/2.9.2[18438]: TLS/TLS-C requested, starting TLS handshake
    mod_tls/2.9.2[18438]: [msg] sent TLSv1.3 'NewSessionTicket' Handshake message (265 bytes)
    mod_tls/2.9.2[18438]: [msg] sent TLSv1.3 'NewSessionTicket' Handshake message (265 bytes)
    mod_tls/2.9.2[18438]: TLSv1.3 connection accepted, using cipher TLS_AES_256_GCM_SHA384 (256 bits)
    mod_tls/2.9.2[18438]: Protection set to Private
    

    Data connection: client presents PSK (resumption ticket), server accepts resumption

    mod_tls/2.9.2[18438]: [msg] received TLSv1.3 'ClientHello' Handshake message (1866 bytes)
    ClientHello:
      ...
      extensions (1685 bytes)
        extension_type = supported_versions (5 bytes)
        extension_type = psk_kex_modes (2 bytes)
        extension_type = key_share (1258 bytes)
        extension_type = psk (299 bytes)             # ← client offering session ticket
    
    mod_tls/2.9.2[18438]: [msg] sent TLSv1.3 'ServerHello' Handshake message (128 bytes)
    ServerHello:
      ...
      extensions (52 bytes)
        extension_type = supported_versions (2 bytes)
        extension_type = key_share (36 bytes)
        extension_type = psk (2 bytes)               # ← server confirming resumption
    
    mod_tls/2.9.2[18438]: TLSv1.3 data connection accepted, using cipher TLS_AES_256_GCM_SHA384 (256 bits, resumed session)
    

    Aggregate stats for one upload session

    mod_tls/2.9.2[18437]: [stat]: SSL/TLS sessions attempted:   3
    mod_tls/2.9.2[18437]: [stat]: SSL/TLS sessions established: 3
    mod_tls/2.9.2[18437]: [stat]: SSL/TLS sessions resumed:     2
    mod_tls/2.9.2[18437]: [stat]: SSL/TLS sessions renegotiated: 0
    
  5. patrickjuchli commented on May 3, 2026

    @patrickjuchli
    OwnerAuthor

    @dennisameling, thanks for testing!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions