mirror of
https://forgejo.ellis.link/continuwuation/continuwuity.git
synced 2026-05-26 20:49:55 +00:00
fix: Explicitly set TLS backends
Dependency updates mean we have to set a custom TLS backend sooner. Also some groundwork for being able to use aws-lc in future
This commit is contained in:
@@ -33,6 +33,18 @@ pub fn run_with_args(args: &Args) -> Result<()> {
|
||||
// Spawn deadlock detection thread
|
||||
deadlock::spawn();
|
||||
|
||||
// Because we're not using rustls default-tls, we have to initialise a TLS
|
||||
// provider
|
||||
#[cfg(feature = "aws_lc_rs")]
|
||||
rustls::crypto::aws_lc_rs::default_provider()
|
||||
.install_default()
|
||||
.expect("failed to initialise ring rustls crypto provider");
|
||||
|
||||
#[cfg(all(feature = "ring", not(feature = "aws_lc_rs")))]
|
||||
rustls::crypto::ring::default_provider()
|
||||
.install_default()
|
||||
.expect("failed to initialise ring rustls crypto provider");
|
||||
|
||||
let runtime = runtime::new(args)?;
|
||||
let server = Server::new(args, Some(runtime.handle()))?;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user