diff options
author | Lutz Jänicke <jaenicke@openssl.org> | 2002-04-30 12:08:18 +0000 |
---|---|---|
committer | Lutz Jänicke <jaenicke@openssl.org> | 2002-04-30 12:08:18 +0000 |
commit | c0455cbb180e4662a734f11dbcb1f94beb2376a9 (patch) | |
tree | 8079a60de3a556c71a347f3ff9f32d3bf387140f /apps/crl.c | |
parent | 17e2c77a7747981cc2470749b5e02b981df72188 (diff) | |
download | openssl-new-c0455cbb180e4662a734f11dbcb1f94beb2376a9.tar.gz |
Fix escaping when using the -subj option of "openssl req", document
'hidden' -nameopt support. (Robert Joop <joop@fokus.gmd.de>)
Diffstat (limited to 'apps/crl.c')
-rw-r--r-- | apps/crl.c | 13 |
1 files changed, 9 insertions, 4 deletions
diff --git a/apps/crl.c b/apps/crl.c index f25b1877b5..00946b4d20 100644 --- a/apps/crl.c +++ b/apps/crl.c @@ -87,6 +87,7 @@ static char *crl_usage[]={ " -noout - no CRL output\n", " -CAfile name - verify CRL using certificates in file \"name\"\n", " -CApath dir - verify CRL using certificates in \"dir\"\n", +" -nameopt arg - various certificate name options\n", NULL }; @@ -97,6 +98,7 @@ int MAIN(int, char **); int MAIN(int argc, char **argv) { + unsigned long nmflag = 0; X509_CRL *x=NULL; char *CAfile = NULL, *CApath = NULL; int ret=1,i,num,badops=0; @@ -105,7 +107,7 @@ int MAIN(int argc, char **argv) char *infile=NULL,*outfile=NULL; int hash=0,issuer=0,lastupdate=0,nextupdate=0,noout=0,text=0; int fingerprint = 0; - char **pp,buf[256]; + char **pp; X509_STORE *store = NULL; X509_STORE_CTX ctx; X509_LOOKUP *lookup = NULL; @@ -188,6 +190,11 @@ int MAIN(int argc, char **argv) text = 1; else if (strcmp(*argv,"-hash") == 0) hash= ++num; + else if (strcmp(*argv,"-nameopt") == 0) + { + if (--argc < 1) goto bad; + if (!set_name_ex(&nmflag, *(++argv))) goto bad; + } else if (strcmp(*argv,"-issuer") == 0) issuer= ++num; else if (strcmp(*argv,"-lastupdate") == 0) @@ -271,9 +278,7 @@ bad: { if (issuer == i) { - X509_NAME_oneline(X509_CRL_get_issuer(x), - buf,256); - BIO_printf(bio_out,"issuer= %s\n",buf); + print_name(bio_out, "issuer=", X509_CRL_get_issuer(x), nmflag); } if (hash == i) |