The function data_command always uses the default SSL_CONTEXT global to establish a secure connection. I missed this when I added the secure_with_ssl function. Perhaps a new field should be added to FtpStream to have it hold onto a reference (or perhaps even clone, for simplicity?) an SslContext so that we can reuse a user-provided instance instead of the default in all cases?
The function
data_command
always uses the defaultSSL_CONTEXT
global to establish a secure connection. I missed this when I added thesecure_with_ssl
function. Perhaps a new field should be added toFtpStream
to have it hold onto a reference (or perhaps even clone, for simplicity?) anSslContext
so that we can reuse a user-provided instance instead of the default in all cases?