From 9194296de8ed9173b348494833517b5bb319f072 Mon Sep 17 00:00:00 2001 From: "Dr. Stephen Henson" Date: Thu, 1 Sep 2005 18:00:56 +0000 Subject: Update ASN1 printing code and add a -print option to 'pkcs7' utility for initial testing. --- apps/pkcs7.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'apps/pkcs7.c') diff --git a/apps/pkcs7.c b/apps/pkcs7.c index da4dbe7a07..aa1852a9fa 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; @@ -139,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 @@ -238,6 +240,9 @@ bad: } } + if (p7_print) + PKCS7_print(out, p7, 0, NULL); + if (print_certs) { STACK_OF(X509) *certs=NULL; -- cgit v1.2.3