int i2d_X509_NAME(X509_NAME *a, unsigned char **pp)
	{
	int ret;

	if (a == NULL) return(0);
	if (a->modified)
		{
		ret=i2d_X509_NAME_entries(a);
		if (ret < 0) return(ret);
		}

	ret=a->bytes->length;
	if (pp != NULL)
		{
		memcpy(*pp,a->bytes->data,ret);
		*pp+=ret;
		}
	return(ret);
	}