The branch OpenSSL_1_1_0-stable has been updated
via f20aa0a6e91f25dccfbaeeba9ad8f2f6800d7bc4 (commit)
from 508ff7f6b4c038c017a7adaf8dd8cda3efe853ec (commit)
- Log -----------------------------------------------------------------
commit f20aa0a6e91f25dccfbaeeba9ad8f2f6800d7bc4
Author: Konstantin Shemyak <[email protected]>
Date: Thu Dec 28 23:12:59 2017 +0200
Corrected 'cms' exit status when key or certificate cannot be opened
A backport of #4997.
Fixes #4996.
Reviewed-by: Matt Caswell <[email protected]>
Reviewed-by: Bernd Edlinger <[email protected]>
(Merged from https://github.com/openssl/openssl/pull/5021)
-----------------------------------------------------------------------
Summary of changes:
apps/cms.c | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/apps/cms.c b/apps/cms.c
index 579b227..7246658 100644
--- a/apps/cms.c
+++ b/apps/cms.c
@@ -931,11 +931,15 @@ int cms_main(int argc, char **argv)
keyfile = sk_OPENSSL_STRING_value(skkeys, i);
signer = load_cert(signerfile, FORMAT_PEM, "signer certificate");
- if (!signer)
+ if (!signer) {
+ ret = 2;
goto end;
+ }
key = load_key(keyfile, keyform, 0, passin, e, "signing key file");
- if (!key)
+ if (!key) {
+ ret = 2;
goto end;
+ }
for (kparam = key_first; kparam; kparam = kparam->next) {
if (kparam->idx == i) {
tflags |= CMS_KEY_PARAM;
_____
openssl-commits mailing list
To unsubscribe: https://mta.openssl.org/mailman/listinfo/openssl-commits