X-Git-Url: https://git.openssl.org/gitweb/?p=openssl.git;a=blobdiff_plain;f=apps%2Fcms.c;h=e9d760c999b78f51f873aad243cf662469bf2710;hp=543d0137c45ca70075d841485dca55cae12fec73;hb=628ee796389b555ddb5fc28355e16e9417ab1724;hpb=3ee1eac27a2e3120fbdc60e12db091c082b8de21 diff --git a/apps/cms.c b/apps/cms.c index 543d0137c4..e9d760c999 100644 --- a/apps/cms.c +++ b/apps/cms.c @@ -1,5 +1,5 @@ /* - * Copyright 2008-2017 The OpenSSL Project Authors. All Rights Reserved. + * Copyright 2008-2018 The OpenSSL Project Authors. All Rights Reserved. * * Licensed under the OpenSSL license (the "License"). You may not use * this file except in compliance with the License. You can obtain a copy @@ -12,6 +12,7 @@ #include #include #include "apps.h" +#include "progs.h" #ifndef OPENSSL_NO_CMS @@ -921,11 +922,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 == NULL) + if (signer == NULL) { + ret = 2; goto end; + } key = load_key(keyfile, keyform, 0, passin, e, "signing key file"); - if (key == NULL) + if (key == NULL) { + ret = 2; goto end; + } for (kparam = key_first; kparam; kparam = kparam->next) { if (kparam->idx == i) { tflags |= CMS_KEY_PARAM; @@ -1103,7 +1108,7 @@ int cms_main(int argc, char **argv) BIO_free(indata); BIO_free_all(out); OPENSSL_free(passin); - return (ret); + return ret; } static int save_certs(char *signerfile, STACK_OF(X509) *signers)