I\'m open source developer implementing FTP client (WinSCP).
I\'m trying to resume TLS/SSL session from the FTP control socket on the transfer socket. Some FTP serve
You must specifically enable client session caching on your SSL_CTX
object with:
SSL_CTX_set_session_cache_mode(ctx, SSL_SESS_CACHE_CLIENT);
You may also need to increase the default session cache timeout (the default is 300 seconds), using SSL_CTX_set_timeout()
.
(You must also be creating your SSL
objects from the same SSL_CTX
object).
Using the SSL_get1_session
and the SSL_set_session
worked in the end. I must have used them incorrectly when trying the first time.
where & SSL_ST_CONNECT
.