cert work

This commit is contained in:
2026-02-15 22:21:09 -05:00
parent d6c98bcf10
commit 79da5e1146
4 changed files with 91 additions and 91 deletions

View File

@@ -37,19 +37,12 @@ pub fn init_endpoint(port: u16, data_path: &Path) -> Endpoint {
panic!("failed to read certificate: {}", e);
}
};
// let server_crypto = quinn::rustls::ServerConfig::builder()
// .with_no_client_auth()
// .with_single_cert(vec![cert], key)
// .unwrap();
//
// let server_config = quinn::ServerConfig::with_crypto(Arc::new(
// QuicServerConfig::try_from(server_crypto).unwrap(),
// ));
print!("cert hex: ");
for x in cert.iter() {
print!("{:x}", x);
}
println!();
let server_config = ServerConfig::with_single_cert(vec![cert], key).unwrap();
// let transport_config = Arc::get_mut(&mut server_config.transport).unwrap();
// transport_config.max_concurrent_uni_streams(0_u8.into());
let server_socket: SocketAddr = SocketAddr::V6(SocketAddrV6::new(SERVER_HOST, port, 0, 0));
quinn::Endpoint::server(server_config, server_socket).unwrap()
}