pki --pkcs7: Set default to res = 1

This commit is contained in:
Andreas Steffen 2023-06-02 09:06:13 +02:00 committed by Tobias Brunner
parent 3cb8434367
commit 09e2a9ff50

View File

@ -288,7 +288,7 @@ static int pkcs7()
hash_algorithm_t digest = HASH_UNKNOWN; hash_algorithm_t digest = HASH_UNKNOWN;
signature_params_t *scheme = NULL; signature_params_t *scheme = NULL;
mem_cred_t *creds; mem_cred_t *creds;
int res = 0; int res = 1;
FILE *in; FILE *in;
enum { enum {
OP_NONE, OP_NONE,
@ -450,7 +450,7 @@ static int pkcs7()
case OP_DECRYPT: case OP_DECRYPT:
if (!key) if (!key)
{ {
fprintf(stderr, "decryption requires a private key\n"); error = "decryption requires a private key";
break; break;
} }
res = decrypt(data); res = decrypt(data);