Skip to content

Commit

Permalink
deps(identity): bump ring to v0.17.5
Browse files Browse the repository at this point in the history
The `libp2p-identity` crate is a dependency of the entire ecosystem. We should keep its dependencies up to date as much as possible. At the moment, we can't bump `ring` across the entire workspace because we still need releases of `rustls` that update to the new `ring` version. Not all our users depend in `libp2p-tls` or `libp2p-quic` though. For those users, a bump in `libp2p-identity` will be useful.

Pull-Request: #4779.
  • Loading branch information
thomaseizinger authored Nov 13, 2023
1 parent 9fed1a9 commit 7d982f7
Show file tree
Hide file tree
Showing 5 changed files with 11 additions and 6 deletions.
4 changes: 2 additions & 2 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ libp2p-dns = { version = "0.41.1", path = "transports/dns" }
libp2p-floodsub = { version = "0.44.0", path = "protocols/floodsub" }
libp2p-gossipsub = { version = "0.46.0", path = "protocols/gossipsub" }
libp2p-identify = { version = "0.44.0", path = "protocols/identify" }
libp2p-identity = { version = "0.2.7" }
libp2p-identity = { version = "0.2.8" }
libp2p-kad = { version = "0.45.1", path = "protocols/kad" }
libp2p-mdns = { version = "0.45.0", path = "protocols/mdns" }
libp2p-memory-connection-limits = { version = "0.2.0", path = "misc/memory-connection-limits" }
Expand Down
5 changes: 5 additions & 0 deletions identity/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
## 0.2.8

- Bump `ring` to `0.17.5.
See [PR 4779](https://github.com/libp2p/rust-libp2p/pull/4779).

## 0.2.7

- Add `rand` feature to gate methods requiring a random number generator, enabling use in restricted environments (e.g. smartcontracts).
Expand Down
4 changes: 2 additions & 2 deletions identity/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "libp2p-identity"
version = "0.2.7"
version = "0.2.8"
edition = "2021"
description = "Data structures and algorithms for identifying peers in libp2p."
rust-version = { workspace = true }
Expand Down Expand Up @@ -30,7 +30,7 @@ void = { version = "1.0", optional = true }
zeroize = { version = "1.6", optional = true }

[target.'cfg(not(target_arch = "wasm32"))'.dependencies]
ring = { version = "0.16.9", features = [ "alloc", "std"], default-features = false, optional = true }
ring = { version = "0.17.5", features = [ "alloc", "std"], default-features = false, optional = true }

[features]
secp256k1 = ["dep:libsecp256k1", "dep:asn1_der", "dep:sha2", "dep:hkdf", "dep:zeroize"]
Expand Down
2 changes: 1 addition & 1 deletion identity/src/rsa.rs
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ impl Keypair {

/// Sign a message with this keypair.
pub fn sign(&self, data: &[u8]) -> Result<Vec<u8>, SigningError> {
let mut signature = vec![0; self.0.public_modulus_len()];
let mut signature = vec![0; self.0.public().modulus_len()];
let rng = SystemRandom::new();
match self.0.sign(&RSA_PKCS1_SHA256, &rng, data, &mut signature) {
Ok(()) => Ok(signature),
Expand Down

0 comments on commit 7d982f7

Please sign in to comment.