X-Git-Url: https://git.openssl.org/gitweb/?a=blobdiff_plain;f=crypto%2Fasn1%2Ftasn_prn.c;h=b5698060e8defee66d1b48fe2e27280a7f7baac6;hb=7671342e550ed2de676b23c79d0e7f45a381c76e;hp=2ce55706e163caf05daca5927440b33a47091144;hpb=35da893f86a40d3711ed785bd8777c18238aee45;p=openssl.git diff --git a/crypto/asn1/tasn_prn.c b/crypto/asn1/tasn_prn.c index 2ce55706e1..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\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) @@ -389,7 +390,7 @@ static int asn1_print_boolean(BIO *out, int boolval) } -static int asn1_print_integer(BIO *out, ASN1_INTEGER *str) +static int asn1_print_integer(BIO *out, const ASN1_INTEGER *str) { char *s; int ret = 1; @@ -415,7 +416,7 @@ static int asn1_print_oid(BIO *out, const ASN1_OBJECT *oid) return 1; } -static int asn1_print_obstring(BIO *out, ASN1_STRING *str, int indent) +static int asn1_print_obstring(BIO *out, const ASN1_STRING *str, int indent) { if (str->type == V_ASN1_BIT_STRING) { if (BIO_printf(out, " (%ld unused bits)\n", str->flags & 0x7) <= 0)