diff options
author | Dmitry Belyavskiy <beldmit@gmail.com> | 2017-04-25 12:25:42 -0400 |
---|---|---|
committer | Rich Salz <rsalz@openssl.org> | 2017-04-25 12:37:17 -0400 |
commit | b5c4209be9162d4ceafb9aef833ca94ffa1cc5c9 (patch) | |
tree | 02dcc8e0d8a5368b0c7aa6780f7998c1d45f5f7d /crypto/x509/t_crl.c | |
parent | 645c694d85c8f48c74e7db8730ead874656c781e (diff) |
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 'crypto/x509/t_crl.c')
-rw-r--r-- | crypto/x509/t_crl.c | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/crypto/x509/t_crl.c b/crypto/x509/t_crl.c index f3ca6db8e5..3c073ffd29 100644 --- a/crypto/x509/t_crl.c +++ b/crypto/x509/t_crl.c @@ -34,13 +34,17 @@ int X509_CRL_print_fp(FILE *fp, X509_CRL *x) int X509_CRL_print(BIO *out, X509_CRL *x) { + return X509_CRL_print_ex(out, x, XN_FLAG_COMPAT); +} + +int X509_CRL_print_ex(BIO *out, X509_CRL *x, unsigned long nmflag) +{ STACK_OF(X509_REVOKED) *rev; X509_REVOKED *r; const X509_ALGOR *sig_alg; const ASN1_BIT_STRING *sig; long l; int i; - char *p; BIO_printf(out, "Certificate Revocation List (CRL):\n"); l = X509_CRL_get_version(x); @@ -50,9 +54,9 @@ int X509_CRL_print(BIO *out, X509_CRL *x) BIO_printf(out, "%8sVersion unknown (%ld)\n", "", l); X509_CRL_get0_signature(x, &sig, &sig_alg); X509_signature_print(out, sig_alg, NULL); - p = X509_NAME_oneline(X509_CRL_get_issuer(x), NULL, 0); - BIO_printf(out, "%8sIssuer: %s\n", "", p); - OPENSSL_free(p); + BIO_printf(out, "%8sIssuer: ", ""); + X509_NAME_print_ex(out, X509_CRL_get_issuer(x), 0, nmflag); + BIO_puts(out, "\n"); BIO_printf(out, "%8sLast Update: ", ""); ASN1_TIME_print(out, X509_CRL_get0_lastUpdate(x)); BIO_printf(out, "\n%8sNext Update: ", ""); |