Help with TLS
#480
-
As a new libunftp user, I'm trying to get TLS working for the first time, without success. I don't know if the problem is with my code, with my client, or in how I generate my certificates. Could you please help? This is my server code: use unftp_sbe_fs::ServerExt;
use libunftp::options::{FtpsRequired, TlsFlags};
use sloggers::Build;
#[tokio::main]
pub async fn main() {
pretty_env_logger::init();
let addr = "127.0.0.1:2121";
let logger = sloggers::terminal::TerminalLoggerBuilder::new()
.level(sloggers::types::Severity::Debug)
.destination(sloggers::terminal::Destination::Stderr)
.build()
.unwrap();
let server = libunftp::Server::with_fs(std::env::temp_dir())
.ftps("/path/to/cert.csr", "/path/to/key.pem")
.ftps_required(FtpsRequired::None, FtpsRequired::All)
.ftps_tls_flags(TlsFlags::V1_2 | TlsFlags::V1_3 | TlsFlags::RESUMPTION_SESS_ID | TlsFlags::RESUMPTION_TICKETS)
.logger(logger);
println!("Starting ftp server on {}", addr);
server.listen(addr).await.unwrap();
} This is the command I use to generate certificates:
This is how I invoke my client:
And this is what the server logs:
|
Beta Was this translation helpful? Give feedback.
Answered by
asomers
Aug 25, 2023
Replies: 1 comment
-
SOLVED There were two problems:
|
Beta Was this translation helpful? Give feedback.
0 replies
Answer selected by
hannesdejager
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
SOLVED
There were two problems: