mirror of
https://github.com/threefoldtech/mycelium.git
synced 2026-06-06 15:51:40 +00:00
Install ring crypto provider for quinn endpoint
A default crypto provider in installed before creating the quinn endpoint, as that is needed for rustls (part of the endpoint tls config). This also allows us to get the default provider when connecting to a remote quic endpoint. Signed-off-by: Lee Smet <lee.smet@hotmail.com>
This commit is contained in:
@@ -1062,6 +1062,9 @@ fn make_quic_endpoint(
|
||||
quic_listen_port: u16,
|
||||
firewall_mark: Option<u32>,
|
||||
) -> Result<quinn::Endpoint, Box<dyn std::error::Error>> {
|
||||
// Install ring crypto provider for rustls
|
||||
rustls::crypto::CryptoProvider::install_default(rustls::crypto::ring::default_provider())
|
||||
.expect("Crypto provider has not been installed yet");
|
||||
// Generate self signed certificate certificate.
|
||||
// TODO: sign with router keys
|
||||
let cert = rcgen::generate_simple_self_signed(vec![format!("{router_id}")])?;
|
||||
|
||||
Reference in New Issue
Block a user