Skip to content

Commit

Permalink
Remove "sign" and "verify" feature gates
Browse files Browse the repository at this point in the history
  • Loading branch information
Kijewski committed Sep 16, 2023
1 parent 057edcb commit bcbe446
Show file tree
Hide file tree
Showing 6 changed files with 14 additions and 33 deletions.
8 changes: 4 additions & 4 deletions Cargo.lock

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

6 changes: 3 additions & 3 deletions Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
[package]
name = "zipsign"
description = "Sign and verify `.zip` and `.tar.gz` files with an ed25519 signing key"
version = "0.1.0-a.2"
version = "0.1.0-a.3"
edition = "2021"
authors = ["René Kijewski <[email protected]>"]
repository = "https://github.com/Kijewski/zipsign"
Expand All @@ -24,10 +24,10 @@ thiserror = "1"
zip = { version = "0.6", default-features = false }

[workspace.dependencies.zipsign-api]
version = "0.1.0-a.2"
version = "0.1.0-a.3"
path = "api"
default-features = false
features = ["verify-tar", "verify-zip", "sign-tar", "sign-zip"]
features = ["tar", "zip"]

[dependencies]
clap.workspace = true
Expand Down
12 changes: 5 additions & 7 deletions api/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
[package]
name = "zipsign-api"
description = "Sign and verify `.zip` and `.tar.gz` files with an ed25519 signing key"
version = "0.1.0-a.2"
version = "0.1.0-a.3"
edition = "2021"
authors = ["René Kijewski <[email protected]>"]
repository = "https://github.com/Kijewski/zipsign"
Expand All @@ -16,13 +16,11 @@ zip = { workspace = true, optional = true }
[features]
default = ["tar", "zip"]

verify = []
verify-tar = ["verify", "dep:base64"]
verify-zip = ["verify"]
verify-tar = ["dep:base64"]
verify-zip = []

sign = []
sign-tar = ["sign", "dep:base64"]
sign-zip = ["sign", "dep:zip"]
sign-tar = ["dep:base64"]
sign-zip = ["dep:zip"]

tar = ["sign-tar", "verify-tar"]
zip = ["sign-zip", "verify-zip"]
Expand Down
13 changes: 0 additions & 13 deletions api/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -20,11 +20,8 @@
#![warn(unused_results)]
#![doc = include_str!("../README.md")]

#[cfg(any(feature = "sign", feature = "verify"))]
mod constants;
#[cfg(feature = "sign")]
pub mod sign;
#[cfg(feature = "verify")]
pub mod verify;

use std::io::{copy, Read};
Expand All @@ -51,12 +48,8 @@ where
#[error(transparent)]
pub enum ZipsignError {
/// An error returned by [`gather_signature_data()`][self::sign::gather_signature_data]
#[cfg(feature = "sign")]
#[cfg_attr(docsrs, doc(cfg(feature = "sign")))]
GatherSignatureData(#[from] self::sign::GatherSignatureDataError),
/// An error returned by [`read_signing_keys()`][self::sign::read_signing_keys]
#[cfg(feature = "sign")]
#[cfg_attr(docsrs, doc(cfg(feature = "sign")))]
ReadSigningKeys(#[from] self::sign::ReadSigningKeysError),
/// An error returned by [`copy_and_sign_tar()`][self::sign::copy_and_sign_tar]
#[cfg(feature = "sign-tar")]
Expand All @@ -68,16 +61,10 @@ pub enum ZipsignError {
SignZip(#[from] self::sign::SignZipError),

/// No matching key/signature pair found
#[cfg(feature = "verify")]
#[cfg_attr(docsrs, doc(cfg(feature = "verify")))]
NoMatch(#[from] self::verify::NoMatch),
/// An error returned by [`collect_keys()`][self::verify::collect_keys]
#[cfg(feature = "verify")]
#[cfg_attr(docsrs, doc(cfg(feature = "verify")))]
CollectKeys(#[from] self::verify::CollectKeysError),
/// An error returned by [`read_signatures()`][self::verify::read_signatures]
#[cfg(feature = "verify")]
#[cfg_attr(docsrs, doc(cfg(feature = "verify")))]
ReadSignatures(#[from] self::verify::ReadSignaturesError),
/// An error returned by [`verify_tar()`][self::verify::verify_tar]
#[cfg(feature = "verify-tar")]
Expand Down
4 changes: 1 addition & 3 deletions api/src/sign/mod.rs
Original file line number Diff line number Diff line change
@@ -1,6 +1,4 @@
#![cfg_attr(docsrs, doc(cfg(feature = "sign")))]

//! Common functions to sign a file
//! Functions to sign a file

#[cfg(feature = "sign-tar")]
mod tar;
Expand Down
4 changes: 1 addition & 3 deletions api/src/verify/mod.rs
Original file line number Diff line number Diff line change
@@ -1,6 +1,4 @@
#![cfg_attr(docsrs, doc(cfg(feature = "verify")))]

//! Common functions to verify a signed file
//! Functions to verify a signed file

#[cfg(feature = "verify-tar")]
mod tar;
Expand Down

0 comments on commit bcbe446

Please sign in to comment.