Skip to content
This repository has been archived by the owner on Jun 3, 2020. It is now read-only.

Commit

Permalink
Merge pull request #365 from tendermint/vendor-secret-connection
Browse files Browse the repository at this point in the history
Vendor Secret Connection (fixes informalsystems/tendermint-rs#27)
  • Loading branch information
tarcieri authored Oct 18, 2019
2 parents 94ff3d1 + d9c9060 commit 54b15ea
Show file tree
Hide file tree
Showing 11 changed files with 689 additions and 27 deletions.
8 changes: 2 additions & 6 deletions Cargo.lock

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

4 changes: 3 additions & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ log = "0.4"
prost-amino = "0.4.0"
prost-amino-derive = "0.4.0"
rand_os = "0.1"
ring = "0.14"
rpassword = { version = "3", optional = true }
serde = { version = "1", features = ["serde_derive"] }
serde_json = "1"
Expand All @@ -41,12 +42,13 @@ subtle = "2"
subtle-encoding = { version = "0.3", features = ["bech32-preview"] }
tiny-bip39 = "0.6"
wait-timeout = "0.2"
x25519-dalek = "0.5"
yubihsm = { version = "0.26", features = ["setup", "usb"], optional = true }
zeroize = "1"

[dependencies.tendermint]
version = "0.10"
features = ["amino-types", "config", "secret-connection"]
features = ["amino-types", "config"]

[dev-dependencies]
tempfile = "3"
Expand Down
6 changes: 4 additions & 2 deletions src/connection.rs
Original file line number Diff line number Diff line change
@@ -1,12 +1,14 @@
//! Connections to a validator (TCP or Unix socket)

pub mod secret_connection;
pub mod tcp;
pub mod unix;

use self::{secret_connection::SecretConnection, unix::UnixConnection};
use std::io;

/// Connections to a validator
pub trait Connection: io::Read + io::Write + Sync + Send {}

impl<T> Connection for tcp::SecretConnection<T> where T: io::Read + io::Write + Sync + Send {}
impl<T> Connection for unix::UnixConnection<T> where T: io::Read + io::Write + Sync + Send {}
impl<T> Connection for SecretConnection<T> where T: io::Read + io::Write + Sync + Send {}
impl<T> Connection for UnixConnection<T> where T: io::Read + io::Write + Sync + Send {}
Loading

0 comments on commit 54b15ea

Please sign in to comment.