mattnenterprise / rust-ftp

FTP client for Rust
Apache License 2.0
182 stars 57 forks source link

data_command can only use the default SSL_CONTEXT #48

Closed arcrose closed 8 years ago

arcrose commented 8 years ago

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?