summaryrefslogtreecommitdiffstats
path: root/apps/pkcs7.c
diff options
context:
space:
mode:
authorDr. Stephen Henson <steve@openssl.org>2005-09-01 18:00:56 +0000
committerDr. Stephen Henson <steve@openssl.org>2005-09-01 18:00:56 +0000
commit9194296de8ed9173b348494833517b5bb319f072 (patch)
treeb45c3776833b36095aa7c99a9eddba5fc3ad04fd /apps/pkcs7.c
parent6273a91cb73ce563b8246d1b1d85476535057def (diff)
Update ASN1 printing code and add a -print option to 'pkcs7' utility for
initial testing.
Diffstat (limited to 'apps/pkcs7.c')
-rw-r--r--apps/pkcs7.c7
1 files changed, 6 insertions, 1 deletions
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;