mirror of
https://github.com/fluencelabs/rust-libp2p
synced 2025-06-29 01:31:33 +00:00
24
Cargo.lock
generated
24
Cargo.lock
generated
@ -2505,7 +2505,6 @@ dependencies = [
|
||||
"multiaddr",
|
||||
"multihash",
|
||||
"p256 0.12.0",
|
||||
"prost",
|
||||
"quick-protobuf",
|
||||
"quickcheck-ext",
|
||||
"rand 0.8.5",
|
||||
@ -3843,29 +3842,6 @@ dependencies = [
|
||||
"syn 1.0.109",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "prost"
|
||||
version = "0.11.8"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "e48e50df39172a3e7eb17e14642445da64996989bc212b583015435d39a58537"
|
||||
dependencies = [
|
||||
"bytes",
|
||||
"prost-derive",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "prost-derive"
|
||||
version = "0.11.8"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "4ea9b0f8cbe5e15a8a042d030bd96668db28ecb567ec37d691971ff5731d2b1b"
|
||||
dependencies = [
|
||||
"anyhow",
|
||||
"itertools",
|
||||
"proc-macro2",
|
||||
"quote",
|
||||
"syn 1.0.109",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "quick-error"
|
||||
version = "1.2.3"
|
||||
|
@ -20,8 +20,7 @@ log = "0.4"
|
||||
multiaddr = { version = "0.17.1", optional = true }
|
||||
multihash = { version = "0.17.0", default-features = false, features = ["std"], optional = true }
|
||||
p256 = { version = "0.12", default-features = false, features = ["ecdsa", "std"], optional = true }
|
||||
prost = { version = "0.11", optional = true }
|
||||
quick-protobuf = "0.8.1"
|
||||
quick-protobuf = { version = "0.8.1", optional = true }
|
||||
rand = { version = "0.8", optional = true }
|
||||
sec1 = { version = "0.3.0", features = ["std"], optional = true } # Activate `std` feature until https://github.com/RustCrypto/traits/pull/1131 is released.
|
||||
serde = { version = "1", optional = true, features = ["derive"] }
|
||||
@ -34,11 +33,11 @@ zeroize = { version = "1.6", optional = true }
|
||||
ring = { version = "0.16.9", features = ["alloc", "std"], default-features = false, optional = true}
|
||||
|
||||
[features]
|
||||
secp256k1 = [ "libsecp256k1", "asn1_der", "prost", "rand", "sha2", "zeroize" ]
|
||||
ecdsa = [ "p256", "prost", "rand", "void", "zeroize", "sec1" ]
|
||||
rsa = [ "dep:ring", "asn1_der", "prost", "rand", "zeroize" ]
|
||||
ed25519 = [ "ed25519-dalek", "prost", "rand", "zeroize" ]
|
||||
peerid = [ "multihash", "multiaddr", "bs58", "rand", "thiserror", "sha2" ]
|
||||
secp256k1 = [ "dep:libsecp256k1", "dep:asn1_der", "dep:rand", "dep:sha2", "dep:zeroize", "dep:quick-protobuf" ]
|
||||
ecdsa = [ "dep:p256", "dep:rand", "dep:void", "dep:zeroize", "dep:sec1", "dep:quick-protobuf" ]
|
||||
rsa = [ "dep:ring", "dep:asn1_der", "dep:rand", "dep:zeroize", "dep:quick-protobuf" ]
|
||||
ed25519 = [ "dep:ed25519-dalek", "dep:rand", "dep:zeroize", "dep:quick-protobuf" ]
|
||||
peerid = [ "dep:multihash", "dep:multiaddr", "dep:bs58", "dep:rand", "dep:thiserror", "dep:sha2" ]
|
||||
|
||||
[dev-dependencies]
|
||||
quickcheck = { package = "quickcheck-ext", path = "../misc/quickcheck-ext" }
|
||||
|
@ -81,6 +81,12 @@ impl DecodingError {
|
||||
}
|
||||
}
|
||||
|
||||
#[cfg(any(
|
||||
feature = "ecdsa",
|
||||
feature = "secp256k1",
|
||||
feature = "ed25519",
|
||||
feature = "rsa"
|
||||
))]
|
||||
pub(crate) fn decoding_unsupported(key_type: &'static str) -> Self {
|
||||
Self {
|
||||
msg: format!("decoding {key_type} key from Protobuf is unsupported"),
|
||||
|
@ -33,6 +33,12 @@
|
||||
//! (e.g. [ed25519 binary format](https://datatracker.ietf.org/doc/html/rfc8032#section-5.1.5)).
|
||||
//! All key types have functions to enable conversion to/from their binary representations.
|
||||
|
||||
#[cfg(any(
|
||||
feature = "ecdsa",
|
||||
feature = "secp256k1",
|
||||
feature = "ed25519",
|
||||
feature = "rsa"
|
||||
))]
|
||||
mod proto {
|
||||
include!("generated/mod.rs");
|
||||
pub use self::keys_proto::*;
|
||||
|
Reference in New Issue
Block a user