Skip to content

Commit 054d512

Browse files
mxindenapopiakMilerius
authored
transports/noise: Update to snow 0.8.0 (#2272)
* transports/noise: Bump snow and rand * transports/noise: Bump crate version * transports/noise: Fix compilation with additional generic-array features (#2264) For crate that depends on `generic-array = { version = "0.14.3", features = ["serde", "more_lengths"] }` It's seems that `as_ref()` is ambiguous. * .github/workflows/ci.yml: Use clang 11 (#2233) * transports/noise/CHANGELOG: Add entry Co-authored-by: Alexander Popiak <[email protected]> Co-authored-by: Sztergbaum Roman <[email protected]>
1 parent 40c4287 commit 054d512

File tree

4 files changed

+13
-7
lines changed

4 files changed

+13
-7
lines changed

.github/workflows/ci.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ jobs:
4646
container:
4747
image: rust
4848
env:
49-
CC: clang-10
49+
CC: clang-11
5050
steps:
5151

5252
- name: Cancel Previous Runs
@@ -75,7 +75,7 @@ jobs:
7575
wget -O - https://apt.llvm.org/llvm-snapshot.gpg.key | apt-key add -
7676
echo "deb http://apt.llvm.org/bionic/ llvm-toolchain-bionic-10 main" >> /etc/apt/sources.list
7777
apt-get update
78-
apt-get install -y clang-10
78+
apt-get install -y clang-11
7979
8080
- name: Install CMake
8181
run: apt-get install -y cmake

transports/noise/CHANGELOG.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,9 @@
1+
# 0.30.1 [2021-10-06]
2+
3+
- Update dependencies (see [PR 2272]).
4+
5+
[PR 2272]: https://github.com/libp2p/rust-libp2p/pull/2272
6+
17
# 0.30.0 [2021-03-17]
28

39
- Update `libp2p-core`.

transports/noise/Cargo.toml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
[package]
22
name = "libp2p-noise"
33
description = "Cryptographic handshake protocol using the noise framework."
4-
version = "0.30.0"
4+
version = "0.30.1"
55
authors = ["Parity Technologies <[email protected]>"]
66
license = "MIT"
77
repository = "https://github.com/libp2p/rust-libp2p"
@@ -15,17 +15,17 @@ lazy_static = "1.2"
1515
libp2p-core = { version = "0.28.0", path = "../../core" }
1616
log = "0.4"
1717
prost = "0.7"
18-
rand = "0.7.2"
18+
rand = "0.8.3"
1919
sha2 = "0.9.1"
2020
static_assertions = "1"
2121
x25519-dalek = "1.1.0"
2222
zeroize = "1"
2323

2424
[target.'cfg(not(target_arch = "wasm32"))'.dependencies]
25-
snow = { version = "0.7.1", features = ["ring-resolver"], default-features = false }
25+
snow = { version = "0.8.0", features = ["ring-resolver"], default-features = false }
2626

2727
[target.'cfg(target_arch = "wasm32")'.dependencies]
28-
snow = { version = "0.7.1", features = ["default-resolver"], default-features = false }
28+
snow = { version = "0.8.0", features = ["default-resolver"], default-features = false }
2929

3030
[dev-dependencies]
3131
async-io = "1.2.0"

transports/noise/src/protocol/x25519.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -218,7 +218,7 @@ impl SecretKey<X25519> {
218218
// let ed25519_sk = ed25519::SecretKey::from(ed);
219219
let mut curve25519_sk: [u8; 32] = [0; 32];
220220
let hash = Sha512::digest(ed25519_sk.as_ref());
221-
curve25519_sk.copy_from_slice(&hash.as_ref()[..32]);
221+
curve25519_sk.copy_from_slice(&hash[..32]);
222222
let sk = SecretKey(X25519(curve25519_sk)); // Copy
223223
curve25519_sk.zeroize();
224224
sk

0 commit comments

Comments
 (0)