diff options
author | Dr. Stephen Henson <steve@openssl.org> | 2016-09-28 15:18:58 +0100 |
---|---|---|
committer | Dr. Stephen Henson <steve@openssl.org> | 2016-09-29 16:21:46 +0100 |
commit | 73a9f60dd127df9ca05bec7afd835ff7c9bee9ae (patch) | |
tree | 3949e9a8829dd3eb98e8941a7966993b4df7db24 /crypto/asn1/tasn_prn.c | |
parent | adffae15d3c6713ecd15d55d51b159b4262c20e6 (diff) |
Print <ABSENT> if a STACK is NULL.
If a STACK (corresponding to SEQUENCE OF or SET OF) is NULL then the
field is absent as opposed to empty (present but has zero elements).
Reviewed-by: Rich Salz <rsalz@openssl.org>
Diffstat (limited to 'crypto/asn1/tasn_prn.c')
-rw-r--r-- | crypto/asn1/tasn_prn.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/crypto/asn1/tasn_prn.c b/crypto/asn1/tasn_prn.c index f53e9056aa..b5698060e8 100644 --- a/crypto/asn1/tasn_prn.c +++ b/crypto/asn1/tasn_prn.c @@ -315,7 +315,8 @@ static int asn1_template_print_ctx(BIO *out, ASN1_VALUE **fld, int indent, pctx)) return 0; } - if (!i && BIO_printf(out, "%*s<EMPTY>\n", indent + 2, "") <= 0) + if (i == 0 && BIO_printf(out, "%*s<%s>\n", indent + 2, "", + stack == NULL ? "ABSENT" : "EMPTY") <= 0) return 0; if (pctx->flags & ASN1_PCTX_FLAGS_SHOW_SEQUENCE) { if (BIO_printf(out, "%*s}\n", indent, "") <= 0) |