-
-
Notifications
You must be signed in to change notification settings - Fork 32
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Implicit SSL example #14
Comments
I don't think it's supported at the moment, but I can work on it |
Really appreciate your efforts. Is asking for ETA ok? Thanks |
I can try to release it in two days |
The feature is now available in suppaftp 4.3.0, please see the example below: use suppaftp::FtpStream;
use suppaftp::native_tls::{TlsConnector, TlsStream};
use std::path::Path;
// Create a TlsConnector
// NOTE: For custom options see <https://docs.rs/native-tls/0.2.6/native_tls/struct.TlsConnectorBuilder.html>
let mut ctx = TlsConnector::new().unwrap();
let mut ftp_stream = FtpStream::connect_secure_implicit("127.0.0.1:990", ctx, "localhost").unwrap(); In order to enable the |
Hello, Developer and Landlord,when i called into_secure, it hanged at " SecureError("error:1416F086:SSL routines:tls_process_server_certificate:certificate verify failed: " , How to add certificates for clients? thank you! |
You should try some options of the tls builder: let ctx = TlsConnector::builder()
.danger_accept_invalid_certs(true)
.danger_accept_invalid_hostnames(true)
.build() |
thanks! |
Is this still supported in the latest version? With the use suppaftp::FtpStream;
use suppaftp::native_tls::{TlsConnector, TlsStream};
let mut ctx = TlsConnector::new().unwrap();
let mut ftp_stream = FtpStream::connect_secure_implicit("127.0.0.1:990", ctx, "localhost").unwrap(); I get the error
If I follow the "help" hint and instead set let mut ctx = NativeTlsConnector::from(TlsConnector::new().unwrap()); I get a type mismatch on it:
Any hints as to how to go about this? |
@svet-b you're using the wrong type. You need to use |
Thanks for the quick response @veeso - really appreciate your help here! The following indeed seems to work 👍 use suppaftp::{NativeTlsConnector, NativeTlsFtpStream};
use suppaftp::native_tls::TlsConnector;
let mut ctx = NativeTlsConnector::from(TlsConnector::new().unwrap());
let mut ftp_stream = NativeTlsFtpStream::connect_secure_implicit("127.0.0.1:990", ctx, "localhost").unwrap(); |
Hello developers, I recently used your crate and found it to be very interesting. Everything just works. However, I cannot seems to find way to connect when using implicit ssl settings. Filezilla seems to be working fine. Whenever I tried to connect it via the explicit method, it hanged at ftpstream::connect. Maybe this isn't the right way to connect. Could you show me how to do it? Thanks
The text was updated successfully, but these errors were encountered: