mirror of
https://github.com/fluencelabs/rust-libp2p
synced 2025-06-27 00:31:35 +00:00
protocols/noise: Introduce NoiseAuthenticated::xx
constructor with X25519 DH key exchange (#2887)
Co-authored-by: Max Inden <mail@max-inden.de>
This commit is contained in:
@ -57,10 +57,7 @@ pub fn build_transport(
|
||||
key_pair: identity::Keypair,
|
||||
psk: Option<PreSharedKey>,
|
||||
) -> transport::Boxed<(PeerId, StreamMuxerBox)> {
|
||||
let noise_keys = noise::Keypair::<noise::X25519Spec>::new()
|
||||
.into_authentic(&key_pair)
|
||||
.unwrap();
|
||||
let noise_config = noise::NoiseConfig::xx(noise_keys).into_authenticated();
|
||||
let noise_config = noise::NoiseAuthenticated::xx(&key_pair).unwrap();
|
||||
let yamux_config = YamuxConfig::default();
|
||||
|
||||
let base_transport = TcpTransport::new(GenTcpConfig::default().nodelay(true));
|
||||
|
Reference in New Issue
Block a user