diff --git a/src/main.rs b/src/main.rs index 254ba08..7bbde6a 100644 --- a/src/main.rs +++ b/src/main.rs @@ -1,7 +1,8 @@ mod fingerprint; -mod sign; +mod raw; +//mod sign; mod utils; -mod verify; +//mod verify; use std::path::PathBuf; @@ -63,12 +64,12 @@ fn main() -> Result<()> { Action::Raw(RawAction::Sign { secret_key, git_rev: rev, - }) => sign::command(secret_key, rev), + }) => raw::sign::command(secret_key, rev), Action::Raw(RawAction::Verify { public_key, print_signed_oid: recover, git_tree: rev, - }) => verify::command(public_key, recover, rev), + }) => raw::verify::command(public_key, recover, rev), Action::Fingerprint { key } => fingerprint::command(key), } } diff --git a/src/raw.rs b/src/raw.rs new file mode 100644 index 0000000..056f056 --- /dev/null +++ b/src/raw.rs @@ -0,0 +1,4 @@ +//! Primitive signing and verification commands. + +pub mod sign; +pub mod verify; diff --git a/src/raw/sign.rs b/src/raw/sign.rs index a88e637..67df648 100644 --- a/src/raw/sign.rs +++ b/src/raw/sign.rs @@ -6,7 +6,7 @@ use anyhow::{Context, Result}; use git2::{Oid, Repository}; use libsignify::{Codeable, PrivateKey}; -use super::utils; +use crate::utils; /// Execute the `sign` command. pub fn command(key_path: PathBuf, rev: String) -> Result<()> { diff --git a/src/raw/verify.rs b/src/raw/verify.rs index b8f917c..95f2dcd 100644 --- a/src/raw/verify.rs +++ b/src/raw/verify.rs @@ -6,7 +6,7 @@ use anyhow::{Context, Result}; use git2::{Oid, Repository}; use libsignify::{Codeable, Signature}; -use super::utils; +use crate::utils; /// Execute the `verify` command. pub fn command(key_path: PathBuf, recover: bool, tree_rev: String) -> Result<()> {