diff options
author | Dmitry Belyavskiy <beldmit@gmail.com> | 2017-04-25 18:25:42 +0200 |
---|---|---|
committer | Rich Salz <rsalz@openssl.org> | 2017-04-25 18:37:17 +0200 |
commit | b5c4209be9162d4ceafb9aef833ca94ffa1cc5c9 (patch) | |
tree | 02dcc8e0d8a5368b0c7aa6780f7998c1d45f5f7d /apps/crl.c | |
parent | Ignore all .a files, not just the top ones (diff) | |
download | openssl-b5c4209be9162d4ceafb9aef833ca94ffa1cc5c9.tar.xz openssl-b5c4209be9162d4ceafb9aef833ca94ffa1cc5c9.zip |
Switch command-line utils to new nameopt API.
The CA names should be printed according to user's decision
print_name instead of set of BIO_printf
dump_cert_text instead of set of BIO_printf
Testing cyrillic output of X509_CRL_print_ex
Write and use X509_CRL_print_ex
Reduce usage of X509_NAME_online
Using X509_REQ_print_ex instead of X509_REQ_print
Fix nameopt processing.
Make dump_cert_text nameopt-friendly
Move nameopt getter/setter to apps/apps.c
Reviewed-by: Rich Salz <rsalz@openssl.org>
Reviewed-by: Richard Levitte <levitte@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/3262)
Diffstat (limited to 'apps/crl.c')
-rw-r--r-- | apps/crl.c | 12 |
1 files changed, 3 insertions, 9 deletions
diff --git a/apps/crl.c b/apps/crl.c index 3847faa427..ce589bbc1d 100644 --- a/apps/crl.c +++ b/apps/crl.c @@ -69,8 +69,6 @@ int crl_main(int argc, char **argv) X509_OBJECT *xobj = NULL; EVP_PKEY *pkey; const EVP_MD *digest = EVP_sha1(); - unsigned long nmflag = 0; - char nmflag_set = 0; char *infile = NULL, *outfile = NULL, *crldiff = NULL, *keyfile = NULL; const char *CAfile = NULL, *CApath = NULL, *prog; OPTION_CHOICE o; @@ -169,8 +167,7 @@ int crl_main(int argc, char **argv) badsig = 1; break; case OPT_NAMEOPT: - nmflag_set = 1; - if (!set_name_ex(&nmflag, opt_arg())) + if (!set_nameopt(opt_arg())) goto opthelp; break; case OPT_MD: @@ -182,9 +179,6 @@ int crl_main(int argc, char **argv) if (argc != 0) goto opthelp; - if (!nmflag_set) - nmflag = XN_FLAG_ONELINE; - x = load_crl(infile, informat); if (x == NULL) goto end; @@ -260,7 +254,7 @@ int crl_main(int argc, char **argv) for (i = 1; i <= num; i++) { if (issuer == i) { print_name(bio_out, "issuer=", X509_CRL_get_issuer(x), - nmflag); + get_nameopt()); } if (crlnumber == i) { ASN1_INTEGER *crlnum; @@ -319,7 +313,7 @@ int crl_main(int argc, char **argv) goto end; if (text) - X509_CRL_print(out, x); + X509_CRL_print_ex(out, x, get_nameopt()); if (noout) { ret = 0; |