curl/lib/vtls
Stefan Eissing 84ecfb3ecc
FTP: fix TLS session reuse on the data connection
FTP servers using SSL can be configured to check TLS session reuse on
the DATA connection. They hand out a new session on every CONTROL
connect and require to see the client using exactly that one when
up-/downloading on DATA.

This means:

1. We have to configure the SSL filter on the DATA connection with
   exactly the same peers.

2. We have to remember the SSL session on the CONTROL connection -
   separately from the session cache. The SSL filter on the DATA
   connection then looks for a session at the CONTROL filter and, if
   present, uses that.

Tests:

Enable `require_ssl_reuse` in our pytest setup for vsftpd. This
reproduces the problem reported in #22225 and verifies the fix.

Skip ftp+SSL pytests for rustls, as we have no possibility to reuse
sessions in that backend.

Schannel: we do not run these tests with the backend. I expect it has
similar problems but am not able to verify.

Reported-by: Laurent Sabourin
Fixes #22225
Closes #22246
2026-07-02 17:39:04 +02:00
..
apple.c ngtcp2: share common functionality 2026-06-10 13:28:05 +02:00
apple.h lib: use lib source directory as base include path 2026-02-23 16:00:42 +01:00
cipher_suite.c tidy-up: drop stray comparisons with literal zero 2026-06-10 15:15:54 +02:00
cipher_suite.h lib: use lib source directory as base include path 2026-02-23 16:00:42 +01:00
gtls.c FTP: fix TLS session reuse on the data connection 2026-07-02 17:39:04 +02:00
gtls.h FTP: fix TLS session reuse on the data connection 2026-07-02 17:39:04 +02:00
hostcheck.c lib: use lib source directory as base include path 2026-02-23 16:00:42 +01:00
hostcheck.h lib: use lib source directory as base include path 2026-02-23 16:00:42 +01:00
keylog.c tidy-up: drop redundant != NULL syntax 2026-06-09 14:37:36 +02:00
keylog.h tidy-up: apply clang-format fixes 2026-05-28 00:05:47 +02:00
mbedtls.c FTP: fix TLS session reuse on the data connection 2026-07-02 17:39:04 +02:00
mbedtls.h lib: use lib source directory as base include path 2026-02-23 16:00:42 +01:00
openssl.c FTP: fix TLS session reuse on the data connection 2026-07-02 17:39:04 +02:00
openssl.h FTP: fix TLS session reuse on the data connection 2026-07-02 17:39:04 +02:00
rustls.c dns-httpsrr-lookup: use origin, not peer 2026-06-17 12:04:49 +02:00
rustls.h lib: use lib source directory as base include path 2026-02-23 16:00:42 +01:00
schannel.c schannel: shut off experimental TLS 1.3 support for Win 10 2026-07-01 03:37:35 -04:00
schannel.h lib: use lib source directory as base include path 2026-02-23 16:00:42 +01:00
schannel_int.h windows: update MS SDK versions in comments 2026-05-15 03:41:33 +02:00
schannel_verify.c tidy-up: miscellaneous 2026-06-11 19:48:07 +02:00
vtls.c FTP: fix TLS session reuse on the data connection 2026-07-02 17:39:04 +02:00
vtls.h tidy-up: miscellaneous 2026-06-14 20:10:28 +02:00
vtls_config.c tidy-up: make 'CA' uppercase, where missing 2026-06-22 21:04:45 +02:00
vtls_config.h vtls_config: adjust to origin 2026-06-01 09:39:17 +02:00
vtls_int.h FTP: fix TLS session reuse on the data connection 2026-07-02 17:39:04 +02:00
vtls_scache.c FTP: fix TLS session reuse on the data connection 2026-07-02 17:39:04 +02:00
vtls_scache.h FTP: fix TLS session reuse on the data connection 2026-07-02 17:39:04 +02:00
vtls_spack.c openssl+sectrust: fix session reuse 2026-07-01 23:11:10 +02:00
vtls_spack.h lib: use lib source directory as base include path 2026-02-23 16:00:42 +01:00
wolfssl.c FTP: fix TLS session reuse on the data connection 2026-07-02 17:39:04 +02:00
wolfssl.h FTP: fix TLS session reuse on the data connection 2026-07-02 17:39:04 +02:00
x509asn1.c x509asn1: fix DH public key parameter extraction 2026-05-16 01:06:56 +02:00
x509asn1.h x509asn1: fixed and adapted for ASN1tostr unit testing 2026-03-20 13:03:40 +01:00