Feature gate encryption feature

Signed-off-by: trivernis <trivernis@protonmail.com>
pull/39/head
trivernis 3 years ago
parent ef99adfee1
commit 5a0c829602
Signed by: Trivernis
GPG Key ID: DFFFCC2C7A02DB45

2
Cargo.lock generated

@ -120,7 +120,7 @@ dependencies = [
[[package]]
name = "bromine"
version = "0.20.0"
version = "0.20.1"
dependencies = [
"async-trait",
"bincode",

@ -1,6 +1,6 @@
[package]
name = "bromine"
version = "0.20.0"
version = "0.20.1"
authors = ["trivernis <trivernis@protonmail.com>"]
edition = "2018"
readme = "README.md"
@ -28,15 +28,15 @@ async-trait = "0.1.52"
num_enum = "0.5.7"
futures-core = "0.3.21"
trait-bound-typemap = "0.3.3"
bytes = "1.1.0"
rmp-serde = { version = "1.0.0", optional = true }
bincode = { version = "1.3.3", optional = true }
serde_json = { version = "1.0.79", optional = true }
bytes = "1.1.0"
chacha20poly1305 = "0.9.0"
x25519-dalek = "1.2.0"
rand = "0.8.5"
rand_core = "0.6.3"
sha2 = "0.10.2"
chacha20poly1305 = {version = "0.9.0", optional = true}
x25519-dalek = {version = "1.2.0", optional = true}
rand = {version = "0.8.5", optional = true}
rand_core = {version = "0.6.3", optional = true}
sha2 = {version = "0.10.2", optional = true}
[dependencies.serde]
optional = true
@ -73,6 +73,7 @@ features = ["macros", "rt-multi-thread"]
[features]
default = []
encryption_layer = ["chacha20poly1305", "sha2", "rand", "x25519-dalek", "rand_core"]
serialize = ["serde"]
serialize_rmp = ["serialize", "rmp-serde"]
serialize_bincode = ["serialize", "bincode"]

@ -5,7 +5,7 @@ mod protocol_impl;
use bytes::{BufMut, Bytes, BytesMut};
pub use io_impl::*;
pub use protocol_impl::*;
use rand_core::RngCore;
use rand::RngCore;
use std::future::Future;
use std::io;
use std::pin::Pin;

@ -1,5 +1,6 @@
pub mod tcp;
#[cfg(feature = "encryption_layer")]
pub mod encrypted;
#[cfg(unix)]
pub mod unix_socket;

@ -1,3 +1,4 @@
#![cfg(feature = "encryption_layer")]
use crate::utils::call_counter::increment_counter_for_event;
use crate::utils::protocol::TestProtocolListener;
use crate::utils::{get_free_port, start_server_and_client};

Loading…
Cancel
Save