mirror of
https://github.com/fluencelabs/rust-libp2p
synced 2025-07-30 16:31:57 +00:00
secio: Add NULL cipher and allow more configuration. (#468)
* Introduce NULL cipher and allow more configuration. * Back to using the hash-code for handshake. Using `Endpoint` would be incompatible with the existing protocol. * Add comments.
This commit is contained in:
@@ -58,9 +58,9 @@ fn main() {
|
||||
let secio = {
|
||||
let private_key = include_bytes!("test-rsa-private-key.pk8");
|
||||
let public_key = include_bytes!("test-rsa-public-key.der").to_vec();
|
||||
libp2p::secio::SecioConfig {
|
||||
key: libp2p::secio::SecioKeyPair::rsa_from_pkcs8(private_key, public_key).unwrap(),
|
||||
}
|
||||
let keypair = libp2p::secio::SecioKeyPair::rsa_from_pkcs8(private_key, public_key).unwrap();
|
||||
libp2p::secio::SecioConfig::new(keypair)
|
||||
|
||||
};
|
||||
|
||||
upgrade::or(
|
||||
|
Reference in New Issue
Block a user