X-Git-Url: https://git.librecmc.org/?a=blobdiff_plain;f=apps%2Fcrl.c;h=1b04f68ecfdb3d4315ecc760822d43a04bf9a639;hb=ddeee82c6333f27cb85940b271c3cc4d2e940717;hp=a35e85733b887d2a281c24ee9f03c47d43b656ff;hpb=0ca5f8b15c927d56004d3b53744ab68e6ec1b79b;p=oweals%2Fopenssl.git diff --git a/apps/crl.c b/apps/crl.c index a35e85733b..1b04f68ecf 100644 --- a/apps/crl.c +++ b/apps/crl.c @@ -60,11 +60,11 @@ #include #include #include "apps.h" -#include "bio.h" -#include "err.h" -#include "x509.h" -#include "x509v3.h" -#include "pem.h" +#include +#include +#include +#include +#include #undef PROG #define PROG crl_main @@ -88,17 +88,10 @@ static char *crl_usage[]={ NULL }; -#ifndef NOPROTO static X509_CRL *load_crl(char *file, int format); -#else -static X509_CRL *load_crl(); -#endif - static BIO *bio_out=NULL; -int MAIN(argc, argv) -int argc; -char **argv; +int MAIN(int argc, char **argv) { X509_CRL *x=NULL; int ret=1,i,num,badops=0; @@ -221,8 +214,6 @@ bad: } } - if (noout) goto end; - out=BIO_new(BIO_s_file()); if (out == NULL) { @@ -242,6 +233,9 @@ bad: } if (text) X509_CRL_print(out, x); + + if (noout) goto end; + if (outformat == FORMAT_ASN1) i=(int)i2d_X509_CRL_bio(out,x); else if (outformat == FORMAT_PEM) @@ -261,9 +255,7 @@ end: EXIT(ret); } -static X509_CRL *load_crl(infile, format) -char *infile; -int format; +static X509_CRL *load_crl(char *infile, int format) { X509_CRL *x=NULL; BIO *in=NULL;