ASN1err(ASN1_F_D2I_X509_NAME, ERR_R_NESTED_ASN1_ERROR);
ASN1err(ASN1_F_X509_NAME_EX_D2I, ERR_R_NESTED_ASN1_ERROR);
static int x509_name_ex_d2i(ASN1_VALUE **val, const unsigned char **in, long len, const ASN1_ITEM *it,					int tag, int aclass, char opt, ASN1_TLC *ctx){	const unsigned char *p = *in, *q;	STACK *intname = NULL, **intname_pp = &intname;	int i, j, ret;	X509_NAME *nm = NULL, **nm_pp = &nm;	STACK_OF(X509_NAME_ENTRY) *entries;	X509_NAME_ENTRY *entry;	q = p;	/* Get internal representation of Name */	ret = ASN1_item_ex_d2i((ASN1_VALUE **)intname_pp,			       &p, len, ASN1_ITEM_rptr(X509_NAME_INTERNAL),			       tag, aclass, opt, ctx);		if(ret <= 0) return ret;	if(*val) x509_name_ex_free(val, NULL);	if(!x509_name_ex_new((ASN1_VALUE **)nm_pp, NULL)) goto err;	/* We've decoded it: now cache encoding */	if(!BUF_MEM_grow(nm->bytes, p - q)) goto err;	memcpy(nm->bytes->data, q, p - q);	/* Convert internal representation to X509_NAME structure */	for(i = 0; i < sk_num(intname); i++) {		entries = (STACK_OF(X509_NAME_ENTRY) *)sk_value(intname, i);		for(j = 0; j < sk_X509_NAME_ENTRY_num(entries); j++) {			entry = sk_X509_NAME_ENTRY_value(entries, j);			entry->set = i;			if(!sk_X509_NAME_ENTRY_push(nm->entries, entry))				goto err;		}		sk_X509_NAME_ENTRY_free(entries);	}	sk_free(intname);	nm->modified = 0;	*val = (ASN1_VALUE *)nm;	*in = p;	return ret;	err:	ASN1err(ASN1_F_D2I_X509_NAME, ERR_R_NESTED_ASN1_ERROR);	return 0;}