From b3abc16583cfc97d4cf129913756798f4b7d816c Mon Sep 17 00:00:00 2001 From: Tiago Carvalho Date: Sat, 22 Jul 2023 14:45:12 +0100 Subject: [PATCH] fix compilation issues --- src/main.rs | 9 +++++---- src/raw.rs | 4 ++++ src/raw/sign.rs | 2 +- src/raw/verify.rs | 2 +- 4 files changed, 11 insertions(+), 6 deletions(-) create mode 100644 src/raw.rs 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<()> { -- 2.51.2