From: Andreas Steffen Date: Fri, 2 Jun 2023 07:06:13 +0000 (+0200) Subject: pki --pkcs7: Set default to res = 1 X-Git-Tag: 5.9.12rc1~3^2~10 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=09e2a9ff507c5d825a84bf5ded35e4b09c4b8f99;p=thirdparty%2Fstrongswan.git pki --pkcs7: Set default to res = 1 --- 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);