Fix secio compied with --no-default-features (#545)

This commit is contained in:
Pierre Krieger 2018-10-09 11:21:35 +02:00 committed by GitHub
parent 276bc9c07a
commit 68632ce26b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 7 additions and 7 deletions

View File

@ -21,20 +21,20 @@ ctr = "0.1"
lazy_static = { version = "0.2.11", optional = true }
rw-stream-sink = { path = "../../misc/rw-stream-sink" }
tokio-io = "0.1.0"
untrusted = { version = "0.5", optional = true }
sha2 = "0.7.1"
ed25519-dalek = "0.8.0"
hmac = "0.6.3"
[target.'cfg(not(target_os = "emscripten"))'.dependencies]
ring = { version = "0.12", default-features = false, optional = true }
ring = { version = "0.12", default-features = false }
untrusted = { version = "0.5" }
[target.'cfg(target_os = "emscripten")'.dependencies]
stdweb = { version = "0.4.8", default-features = false }
[features]
default = ["rsa", "secp256k1"]
rsa = ["ring/rsa_signing", "untrusted"]
rsa = ["ring/rsa_signing"]
secp256k1 = ["eth-secp256k1"]
aes-all = ["aesni", "lazy_static"]

View File

@ -92,7 +92,7 @@ extern crate libp2p_core;
extern crate log;
extern crate protobuf;
extern crate rand;
#[cfg(all(feature = "ring", not(target_os = "emscripten")))]
#[cfg(not(target_os = "emscripten"))]
extern crate ring;
extern crate rw_stream_sink;
#[cfg(feature = "secp256k1")]
@ -103,7 +103,7 @@ extern crate sha2;
extern crate stdweb;
extern crate tokio_io;
extern crate twofish;
#[cfg(all(feature = "ring", not(target_os = "emscripten")))]
#[cfg(not(target_os = "emscripten"))]
extern crate untrusted;
#[cfg(feature = "aes-all")]
@ -118,7 +118,7 @@ use ed25519_dalek::Keypair as Ed25519KeyPair;
use futures::stream::MapErr as StreamMapErr;
use futures::{Future, Poll, Sink, StartSend, Stream};
use libp2p_core::{PeerId, PublicKey};
#[cfg(all(feature = "ring", not(target_os = "emscripten")))]
#[cfg(all(feature = "rsa", not(target_os = "emscripten")))]
use ring::signature::RSAKeyPair;
use rw_stream_sink::RwStreamSink;
use std::error::Error;
@ -126,7 +126,7 @@ use std::io::{Error as IoError, ErrorKind as IoErrorKind};
use std::iter;
use std::sync::Arc;
use tokio_io::{AsyncRead, AsyncWrite};
#[cfg(all(feature = "ring", not(target_os = "emscripten")))]
#[cfg(all(feature = "rsa", not(target_os = "emscripten")))]
use untrusted::Input;
mod algo_support;