}
else if (BIO_puts(out, "\n") <= 0)
return 0;
- if (BIO_dump_indent(out, (char *)str->data, str->length,
+ if ((str->length > 0)
+ && BIO_dump_indent(out, (char *)str->data, str->length,
indent + 2) <= 0)
return 0;
return 1;
ASN1_STRING *str;
int ret = 1, needlf = 1;
const char *pname;
+ const ASN1_PRIMITIVE_FUNCS *pf;
+ pf = it->funcs;
if (!asn1_print_fsname(out, indent, fname, sname, pctx))
return 0;
+ if (pf && pf->prim_print)
+ return pf->prim_print(out, fld, it, indent, pctx);
str = (ASN1_STRING *)*fld;
if (it->itype == ASN1_ITYPE_MSTRING)
utype = str->type & ~V_ASN1_NEG;
{
ASN1_TYPE *atype = (ASN1_TYPE *)*fld;
utype = atype->type;
- fld = (ASN1_VALUE **)&atype->value.ptr;
+ fld = &atype->value.asn1_value;
str = (ASN1_STRING *)*fld;
if (pctx->flags & ASN1_PCTX_FLAGS_NO_ANY_TYPE)
pname = NULL;