[openssl-commits] [openssl] OpenSSL_1_0_2-stable update

bernd.edlinger at hotmail.de bernd.edlinger at hotmail.de
Sat Jan 6 14:29:06 UTC 2018


The branch OpenSSL_1_0_2-stable has been updated
       via  2157adf66a3cb43b25a1441c5dcca0b287fa7c0d (commit)
      from  58cc2962db17183c039bbbd08e31e179c1126c63 (commit)


- Log -----------------------------------------------------------------
commit 2157adf66a3cb43b25a1441c5dcca0b287fa7c0d
Author: Konstantin Shemyak <konstantin at shemyak.com>
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 <matt at openssl.org>
    Reviewed-by: Bernd Edlinger <bernd.edlinger at hotmail.de>
    (Merged from https://github.com/openssl/openssl/pull/5020)

-----------------------------------------------------------------------

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 f9a63bc..2626bbb 100644
--- a/apps/cms.c
+++ b/apps/cms.c
@@ -977,12 +977,16 @@ int MAIN(int argc, char **argv)
 
             signer = load_cert(bio_err, signerfile, FORMAT_PEM, NULL,
                                e, "signer certificate");
-            if (!signer)
+            if (!signer) {
+                ret = 2;
                 goto end;
+            }
             key = load_key(bio_err, 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;


More information about the openssl-commits mailing list