X-Git-Url: https://git.librecmc.org/?a=blobdiff_plain;f=apps%2Fpkcs7.c;h=86d31b99a71f6c52abfbe9f04ca023b00ca5c8b5;hb=13c3a1defad3837192a8dbfe41074666ed4eb9c1;hp=6c58c67eb27927f146362d1c403b81b234fd6643;hpb=0b13e9f055d3f7be066dc2e89fc9f9822b12eca7;p=oweals%2Fopenssl.git diff --git a/apps/pkcs7.c b/apps/pkcs7.c index 6c58c67eb2..86d31b99a7 100644 --- a/apps/pkcs7.c +++ b/apps/pkcs7.c @@ -90,7 +90,7 @@ int MAIN(int argc, char **argv) BIO *in=NULL,*out=NULL; int informat,outformat; char *infile,*outfile,*prog; - int print_certs=0,text=0,noout=0; + int print_certs=0,text=0,noout=0,p7_print=0; int ret=1; #ifndef OPENSSL_NO_ENGINE char *engine=NULL; @@ -102,6 +102,9 @@ int MAIN(int argc, char **argv) if ((bio_err=BIO_new(BIO_s_file())) != NULL) BIO_set_fp(bio_err,stderr,BIO_NOCLOSE|BIO_FP_TEXT); + if (!load_config(bio_err, NULL)) + goto end; + infile=NULL; outfile=NULL; informat=FORMAT_PEM; @@ -136,6 +139,8 @@ int MAIN(int argc, char **argv) noout=1; else if (strcmp(*argv,"-text") == 0) text=1; + else if (strcmp(*argv,"-print") == 0) + p7_print=1; else if (strcmp(*argv,"-print_certs") == 0) print_certs=1; #ifndef OPENSSL_NO_ENGINE @@ -235,6 +240,9 @@ bad: } } + if (p7_print) + PKCS7_print_ctx(out, p7, 0, NULL); + if (print_certs) { STACK_OF(X509) *certs=NULL;