feat(noise): deprecate all handshake patterns apart from XX

In the libp2p specs, the only handshake pattern that is specified is the XX handshake. Support for other handshake patterns can be added through external modules. While we are at it, we rename the remaining types to following the laid out naming convention.

The tests for handshakes other than XX are removed. The handshakes still work as we don't touch them in this patch.

Related #2217.

Pull-Request: #3768.
This commit is contained in:
Thomas Eizinger
2023-04-28 15:50:31 +02:00
committed by GitHub
parent 99ad3b6eaf
commit 2f5270ba76
40 changed files with 299 additions and 329 deletions

View File

@ -65,7 +65,7 @@ async fn main() -> Result<(), Box<dyn Error>> {
let transport = tcp::async_io::Transport::default()
.upgrade(Version::V1Lazy)
.authenticate(noise::NoiseAuthenticated::xx(&local_key)?)
.authenticate(noise::Config::new(&local_key)?)
.multiplex(yamux::YamuxConfig::default())
.boxed();