From 09e2a9ff507c5d825a84bf5ded35e4b09c4b8f99 Mon Sep 17 00:00:00 2001 From: Andreas Steffen Date: Fri, 2 Jun 2023 09:06:13 +0200 Subject: [PATCH] pki --pkcs7: Set default to res = 1 --- src/pki/commands/pkcs7.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/pki/commands/pkcs7.c b/src/pki/commands/pkcs7.c index 074beeab51..d9aa079426 100644 --- a/src/pki/commands/pkcs7.c +++ b/src/pki/commands/pkcs7.c @@ -288,7 +288,7 @@ static int pkcs7() hash_algorithm_t digest = HASH_UNKNOWN; signature_params_t *scheme = NULL; mem_cred_t *creds; - int res = 0; + int res = 1; FILE *in; enum { OP_NONE, @@ -450,7 +450,7 @@ static int pkcs7() case OP_DECRYPT: if (!key) { - fprintf(stderr, "decryption requires a private key\n"); + error = "decryption requires a private key"; break; } res = decrypt(data);