diff --git a/CHANGELOG.md b/CHANGELOG.md index 22e945c3..f8811ed4 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,8 @@ +## 0.4.1 + +### Features +- Re-export openssl vendored + ## 0.4.0 ### Bug Fix diff --git a/multiaddr/Cargo.toml b/multiaddr/Cargo.toml index b3070f12..ab0e64d2 100644 --- a/multiaddr/Cargo.toml +++ b/multiaddr/Cargo.toml @@ -3,6 +3,8 @@ name = "tentacle-multiaddr" version = "0.3.3" authors = ["driftluo "] edition = "2021" +license = "MIT" +description = "Mini Implementation of multiaddr" # See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html diff --git a/secio/Cargo.toml b/secio/Cargo.toml index f7bcc814..b050a2e6 100644 --- a/secio/Cargo.toml +++ b/secio/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "tentacle-secio" -version = "0.5.5" +version = "0.5.6" license = "MIT" description = "Secio encryption protocol for p2p" authors = ["piaoliu ", "Nervos Core Dev "] @@ -44,6 +44,9 @@ hmac = "0.12.0" x25519-dalek = "1.1" chacha20poly1305 = "0.9" +[features] +openssl-vendored = ["openssl/vendored"] + [dev-dependencies] env_logger = "0.6" criterion = "0.3" diff --git a/secio/src/codec/hmac_compat/openssl_impl.rs b/secio/src/codec/hmac_compat/openssl_impl.rs index 34125d52..9d6f900e 100644 --- a/secio/src/codec/hmac_compat/openssl_impl.rs +++ b/secio/src/codec/hmac_compat/openssl_impl.rs @@ -33,10 +33,9 @@ impl Hmac { /// Signs the data. pub fn sign(&mut self, crypted_data: &[u8]) -> Vec { - Signer::new(self.digest, &self.key) - .expect("init openssl signer ctx fail") - .sign_oneshot_to_vec(crypted_data) - .expect("hmac sign oneshot fail") + let mut sign = Signer::new(self.digest, &self.key).expect("init openssl signer ctx fail"); + sign.update(crypted_data).expect("openssl hmac update fail"); + sign.sign_to_vec().expect("hmac sign oneshot fail") } /// Verifies that the data matches the expected hash. diff --git a/tentacle/Cargo.toml b/tentacle/Cargo.toml index 4ffbe7bc..f9d2cbd9 100644 --- a/tentacle/Cargo.toml +++ b/tentacle/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "tentacle" -version = "0.4.0" +version = "0.4.1" license = "MIT" description = "Minimal implementation for a multiplexed p2p network framework." authors = ["piaoliu ", "Nervos Core Dev "] @@ -78,6 +78,8 @@ tls = ["tokio-rustls"] upnp = ["igd"] unstable = [] +openssl-vendored = ["secio/openssl-vendored"] + # Related to runtime tokio-timer = ["yamux/tokio-timer", "tokio/time", "tokio-runtime"]