summaryrefslogtreecommitdiffstats
path: root/apps/asn1pars.c
diff options
context:
space:
mode:
authorDr. Stephen Henson <steve@openssl.org>1999-10-05 13:10:21 +0000
committerDr. Stephen Henson <steve@openssl.org>1999-10-05 13:10:21 +0000
commitd71c6bc5a409f4bf04165fd5bf41d85b868c6aac (patch)
treea4595d6c6eaf0afe38cd550a132596a93bcd094a /apps/asn1pars.c
parent2d681b779cf0936b441914eabff301e3b036f6a2 (diff)
Fix for bug in pkcs12 program and typo in ASN1_tag2str().
Diffstat (limited to 'apps/asn1pars.c')
-rw-r--r--apps/asn1pars.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/apps/asn1pars.c b/apps/asn1pars.c
index 1b272b2977..e4a9d18ae8 100644
--- a/apps/asn1pars.c
+++ b/apps/asn1pars.c
@@ -86,7 +86,7 @@ int MAIN(int argc, char **argv)
unsigned int length=0;
long num,tmplen;
BIO *in=NULL,*out=NULL,*b64=NULL, *derout = NULL;
- int informat,indent=0;
+ int informat,indent=0, noout = 0;
char *infile=NULL,*str=NULL,*prog,*oidfile=NULL, *derfile=NULL;
unsigned char *tmpbuf;
BUF_MEM *buf=NULL;
@@ -130,6 +130,7 @@ int MAIN(int argc, char **argv)
{
indent=1;
}
+ else if (strcmp(*argv,"-noout") == 0) noout = 1;
else if (strcmp(*argv,"-oid") == 0)
{
if (--argc < 1) goto bad;
@@ -168,6 +169,8 @@ bad:
BIO_printf(bio_err,"where options are\n");
BIO_printf(bio_err," -inform arg input format - one of DER TXT PEM\n");
BIO_printf(bio_err," -in arg input file\n");
+ BIO_printf(bio_err," -out arg output file\n");
+ BIO_printf(bio_err," -noout arg don't produce any output\n");
BIO_printf(bio_err," -offset arg offset into file\n");
BIO_printf(bio_err," -length arg lenth of section in file\n");
BIO_printf(bio_err," -i indent entries\n");
@@ -287,7 +290,8 @@ bad:
goto end;
}
}
- if (!ASN1_parse(out,(unsigned char *)&(str[offset]),length,indent))
+ if (!noout &&
+ !ASN1_parse(out,(unsigned char *)&(str[offset]),length,indent))
{
ERR_print_errors(bio_err);
goto end;