mirror of
https://github.com/fluencelabs/rust-libp2p
synced 2025-07-04 04:01:33 +00:00
core/: Introduce rsa
feature flag to avoid ring
dependency (#2860)
- Introduce `rsa` feature flag to `libp2p-core`. - Expose `rsa` feature in `libp2p`. - Add `rsa` feature to `libp2p` `default`.
This commit is contained in:
committed by
GitHub
parent
a40180c3d8
commit
8644c65a22
@ -67,6 +67,7 @@ pub struct SigningError {
|
||||
|
||||
/// An error during encoding of key material.
|
||||
impl SigningError {
|
||||
#[cfg(any(feature = "secp256k1", feature = "rsa"))]
|
||||
pub(crate) fn new<S: ToString>(msg: S) -> Self {
|
||||
Self {
|
||||
msg: msg.to_string(),
|
||||
@ -74,6 +75,7 @@ impl SigningError {
|
||||
}
|
||||
}
|
||||
|
||||
#[cfg(feature = "rsa")]
|
||||
pub(crate) fn source(self, source: impl Error + Send + Sync + 'static) -> Self {
|
||||
Self {
|
||||
source: Some(Box::new(source)),
|
||||
|
Reference in New Issue
Block a user