Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Ledger integration into KMS #172

Merged
merged 12 commits into from Feb 20, 2019

Upgrading creates + fmt fixes

  • Loading branch information...
jleni committed Feb 15, 2019
commit 47289c0f351cbdf9fb85e508a5b1fd52b5996ade

Some generated files are not rendered by default. Learn more.

@@ -39,12 +39,6 @@ signatory-ledger-tm = { version = "0.11", optional = true }
subtle-encoding = "0.3"
tendermint = { version = "0.2", path = "tendermint-rs" }

[patch.crates-io]
signatory = { git = "https://github.com/tendermint/signatory.git" }
signatory-dalek = { git = "https://github.com/tendermint/signatory.git" }
signatory-yubihsm = { git = "https://github.com/tendermint/signatory.git" }
signatory-ledger-tm = { git = "https://github.com/tendermint/signatory.git" }

[dev-dependencies]
tempfile = "3"
rand = "0.6"
@@ -5,10 +5,7 @@ use abscissa::Callable;
mod detect;
mod help;

pub use self::{
detect::DetectCommand,
help::HelpCommand
};
pub use self::{detect::DetectCommand, help::HelpCommand};

/// The `ledgertm` subcommand
#[derive(Debug, Options)]
@@ -1,16 +1,16 @@
#[cfg(feature = "ledgertm")]
pub mod ledgertm;
#[cfg(feature = "softsign")]
pub mod softsign;
#[cfg(feature = "yubihsm")]
pub mod yubihsm;
#[cfg(feature = "ledgertm")]
pub mod ledgertm;

#[cfg(feature = "ledgertm")]
use self::ledgertm::LedgerTendermintConfig;
#[cfg(feature = "softsign")]
use self::softsign::SoftSignConfig;
#[cfg(feature = "yubihsm")]
use self::yubihsm::YubihsmConfig;
#[cfg(feature = "ledgertm")]
use self::ledgertm::LedgerTendermintConfig;

/// Provider configuration
#[derive(Clone, Deserialize, Debug)]
@@ -4,8 +4,8 @@ use signatory::PublicKeyed;
use signatory_ledger_tm::{self, Ed25519LedgerTmAppSigner};

use crate::{
error::KmsError,
config::provider::ledgertm::LedgerTendermintConfig,
error::KmsError,
keyring::{ed25519::Signer, KeyRing},
};

@@ -1,11 +1,11 @@
pub use signatory::ed25519::{PublicKey, Seed, PUBLIC_KEY_SIZE};

#[cfg(feature = "ledgertm")]
pub mod ledgertm;
mod signer;
#[cfg(feature = "softsign")]
pub mod softsign;
#[cfg(feature = "yubihsm")]
pub mod yubihsm;
#[cfg(feature = "ledgertm")]
pub mod ledgertm;

pub use self::signer::Signer;
@@ -12,11 +12,11 @@ use crate::{
error::{KmsError, KmsErrorKind::*},
};

use self::ed25519::{softsign, Signer};
#[cfg(feature = "yubihsm")]
use self::ed25519::yubihsm;
#[cfg(feature = "ledgertm")]
use self::ed25519::ledgertm;
#[cfg(feature = "yubihsm")]
use self::ed25519::yubihsm;
use self::ed25519::{softsign, Signer};

/// File encoding for software-backed secret keys
pub type SecretKeyEncoding = subtle_encoding::Base64;
@@ -27,14 +27,14 @@ extern crate serde_derive;
extern crate serde_json;
extern crate sha2;
extern crate signal_hook;
extern crate subtle_encoding;
extern crate tendermint;
extern crate signatory;
extern crate signatory_dalek;
#[cfg(feature = "yubihsm")]
extern crate signatory_yubihsm;
#[cfg(feature = "ledgertm")]
extern crate signatory_ledger_tm;
#[cfg(feature = "yubihsm")]
extern crate signatory_yubihsm;
extern crate subtle_encoding;
extern crate tendermint;

#[macro_use]
mod error;
@@ -44,13 +44,13 @@ mod client;
mod commands;
mod config;
mod keyring;
#[cfg(feature = "ledgertm")]
mod ledgertm;
mod rpc;
mod session;
mod unix_connection;
#[cfg(feature = "yubihsm")]
mod yubihsm;
#[cfg(feature = "ledgertm")]
mod ledgertm;

pub use crate::application::KmsApplication;
pub use crate::unix_connection::UnixConnection;
@@ -46,7 +46,7 @@ sha2 = { version = "0.8", optional = true, default-features = false }
subtle-encoding = { version = "0.3", features = ["bech32-preview"] }
tai64 = { version = "1", optional = true, features = ["chrono"] }
x25519-dalek = { version = "0.4.4", optional = true, default-features = false, features = ["u64_backend"] }
zeroize = { version = "0.4", optional = true }
zeroize = { version = "0.5.2", optional = true }

[features]
default = ["secret-connection", "serializers", "tai64"]
ProTip! Use n and p to navigate between commits in a pull request.
You can’t perform that action at this time.