STACK_OF(X509_NODE) *nodes, *auth_nodes = NULL;
STACK_OF(X509_POLICY_NODE) *nodes, *auth_nodes = NULL;
int X509_policy_check(X509_POLICY_TREE **ptree, int *explicit,			STACK_OF(X509) *certs,			STACK_OF(ASN1_OBJECT) *policy_oids,			unsigned int flags)	{	int ret;	X509_POLICY_TREE *tree = NULL;	STACK_OF(X509_NODE) *nodes, *auth_nodes = NULL;	*ptree = NULL;	*explicit = 0;	ret = tree_init(&tree, certs, flags);	switch (ret)		{		/* Tree empty requireExplicit False: OK */		case 2:		return 1;		/* Some internal error */		case 0:		return 0;		/* Tree empty requireExplicit True: Error */		case 6:		*explicit = 1;		return -2;		/* Tree OK requireExplicit True: OK and continue */		case 5:		*explicit = 1;		break;		/* Tree OK: continue */		case 1:		break;		}	ret = tree_evaluate(tree);	if (ret <= 0)		goto error;	/* Return value 2 means tree empty */	if (ret == 2)		{		X509_policy_tree_free(tree);		if (*explicit)			return -2;		else			return 1;		}	/* Tree is not empty: continue */	ret = tree_calculate_authority_set(tree, &auth_nodes);	if (!ret)		goto error;	if (!tree_calculate_user_set(tree, policy_oids, auth_nodes))		goto error;		if (ret == 2)		sk_X509_POLICY_NODE_free(auth_nodes);	if (tree)		*ptree = tree;	if (*explicit)		{		nodes = X509_policy_tree_get0_user_policies(tree);		if (sk_X509_POLICY_NODE_num(nodes) <= 0)			return -2;		}	return 1;	error:	X509_policy_tree_free(tree);	return 0;	}