X-Git-Url: https://git.librecmc.org/?a=blobdiff_plain;f=apps%2Fcrl2p7.c;h=15138acb475cd755eab1cba5943ae984fa467839;hb=4a954b56c9db99c7644b40630a02865a98123e9c;hp=36d8afee6ff376eb0bdc3166acd1c2b3d6e44866;hpb=bc36ee6227517edae802bcb0da68d4f04fe1fb5e;p=oweals%2Fopenssl.git diff --git a/apps/crl2p7.c b/apps/crl2p7.c index 36d8afee6f..15138acb47 100644 --- a/apps/crl2p7.c +++ b/apps/crl2p7.c @@ -63,7 +63,6 @@ #include #include #include -#include #include "apps.h" #include #include @@ -166,7 +165,8 @@ bad: BIO_printf(bio_err," -certfile arg certificates file of chain to a trusted CA\n"); BIO_printf(bio_err," (can be used more than once)\n"); BIO_printf(bio_err," -nocrl no crl to load, just certs from '-certfile'\n"); - EXIT(1); + ret = 1; + goto end; } ERR_load_crypto_strings(); @@ -278,7 +278,8 @@ end: if (p7 != NULL) PKCS7_free(p7); if (crl != NULL) X509_CRL_free(crl); - EXIT(ret); + apps_shutdown(); + OPENSSL_EXIT(ret); } /* @@ -293,19 +294,12 @@ end: */ static int add_certs_from_file(STACK_OF(X509) *stack, char *certfile) { - struct stat st; BIO *in=NULL; int count=0; int ret= -1; STACK_OF(X509_INFO) *sk=NULL; X509_INFO *xi; - if ((stat(certfile,&st) != 0)) - { - BIO_printf(bio_err,"unable to load the file, %s\n",certfile); - goto end; - } - in=BIO_new(BIO_s_file()); if ((in == NULL) || (BIO_read_filename(in,certfile) <= 0)) {