Error:
lftp alice@0.0.0.0:~> ls
ls: Fatal error: SSL_connect: wrong version number
Creating the ftps server
pub async fn start_ftps_server(config: FtpConfig, logger: Arc<Logger>) -> Result<()> {
if config.host_keys.len() < 2 {
eprintln!("FTPS requires both certificate and private key files");
return Err(anyhow::anyhow!("Missing TLS configuration"));
}
let cert_file = &config.host_keys[0];
let key_file = &config.host_keys[1];
let authenticator = Arc::new(MultiAuthenticator::new(config.users.clone(), logger));
let root_dir = config.root_dir;
let server = Server::with_fs(root_dir)
.authenticator(authenticator)
.ftps(cert_file, key_file)
.active_passive_mode(libunftp::options::ActivePassiveMode::ActiveAndPassive)
// .ftps_client_auth(FtpsClientAuth::)
.ftps_required(FtpsRequired::All, FtpsRequired::All)
.ftps_tls_flags(
TlsFlags::V1_2
| TlsFlags::RESUMPTION_SESS_ID
| TlsFlags::RESUMPTION_TICKETS
| TlsFlags::V1_3,
)
.greeting("Welcome to Multi-Protocol FTPS Server")
.build()?;
let addr = format!("{}:{}", config.listen_address, config.port);
server.listen(&addr).await?;
Ok(())
}
i can connect the serve over ftp protocol using the command below
lftp -e "set ftp:ssl-force true; set ssl:verify-certificate no; connect ftp://alice:alice@localhost:990"
Expected:
i want to create ftps server with protocol ftps
Error:
Creating the ftps server
i can connect the serve over ftp protocol using the command below
Expected:
i want to create ftps server with protocol ftps