opgpcard: Remove negative logic

This commit is contained in:
Nora Widdecke 2022-10-25 00:39:54 +02:00
parent e81ebd21a0
commit 1834762879
No known key found for this signature in database
GPG key ID: 2D4111B31DBB99B6
2 changed files with 8 additions and 8 deletions

View file

@ -188,11 +188,11 @@ pub enum AdminCommand {
#[clap(name = "output", long = "output", short = 'o')] #[clap(name = "output", long = "output", short = 'o')]
output: Option<PathBuf>, output: Option<PathBuf>,
#[clap(long = "no-decrypt")] #[clap(long = "no-decrypt", action = clap::ArgAction::SetFalse)]
no_decrypt: bool, decrypt: bool,
#[clap(long = "no-auth")] #[clap(long = "no-auth", action = clap::ArgAction::SetFalse)]
no_auth: bool, auth: bool,
/// Algorithm (rsa2048|rsa3072|rsa4096|nistp256|nistp384|nistp521|25519) /// Algorithm (rsa2048|rsa3072|rsa4096|nistp256|nistp384|nistp521|25519)
#[clap()] #[clap()]

View file

@ -313,8 +313,8 @@ fn main() -> Result<(), Box<dyn std::error::Error>> {
cli::AdminCommand::Generate { cli::AdminCommand::Generate {
user_pin, user_pin,
output, output,
no_decrypt, decrypt,
no_auth, auth,
algo, algo,
user_id, user_id,
} => { } => {
@ -327,8 +327,8 @@ fn main() -> Result<(), Box<dyn std::error::Error>> {
admin_pin.as_deref(), admin_pin.as_deref(),
user_pin.as_deref(), user_pin.as_deref(),
output, output,
!no_decrypt, decrypt,
!no_auth, auth,
algo, algo,
user_id, user_id,
)?; )?;