static int check_name_constraints(X509_STORE_CTX *ctx)
	{
	X509 *x;
	int i, j, rv;
	for (i = sk_X509_num(ctx->chain) - 1; i >= 0; i--)
		{
		x = sk_X509_value(ctx->chain, i);
		if (i && (x->ex_flags & EXFLAG_SI))
			continue;
		for (j = sk_X509_num(ctx->chain) - 1; j > i; j--)
			{
			NAME_CONSTRAINTS *nc = sk_X509_value(ctx->chain, j)->nc;
			if (nc)
				{
				rv = NAME_CONSTRAINTS_check(x, nc);
				if (rv != X509_V_OK)
					{
					ctx->error = rv;
					ctx->error_depth = i;
					ctx->current_cert = x;
					if (!ctx->verify_cb(0,ctx))
						return 0;
					}
				}
			}
		}
	return 1;
	}
['static int check_name_constraints(X509_STORE_CTX *ctx)\n\t{\n\tX509 *x;\n\tint i, j, rv;\n\tfor (i = sk_X509_num(ctx->chain) - 1; i >= 0; i--)\n\t\t{\n\t\tx = sk_X509_value(ctx->chain, i);\n\t\tif (i && (x->ex_flags & EXFLAG_SI))\n\t\t\tcontinue;\n\t\tfor (j = sk_X509_num(ctx->chain) - 1; j > i; j--)\n\t\t\t{\n\t\t\tNAME_CONSTRAINTS *nc = sk_X509_value(ctx->chain, j)->nc;\n\t\t\tif (nc)\n\t\t\t\t{\n\t\t\t\trv = NAME_CONSTRAINTS_check(x, nc);\n\t\t\t\tif (rv != X509_V_OK)\n\t\t\t\t\t{\n\t\t\t\t\tctx->error = rv;\n\t\t\t\t\tctx->error_depth = i;\n\t\t\t\t\tctx->current_cert = x;\n\t\t\t\t\tif (!ctx->verify_cb(0,ctx))\n\t\t\t\t\t\treturn 0;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\treturn 1;\n\t}', 'int sk_num(const _STACK *st)\n{\n\tif(st == NULL) return -1;\n\treturn st->num;\n}', 'void *sk_value(const _STACK *st, int i)\n{\n\tif(!st || (i < 0) || (i >= st->num)) return NULL;\n\treturn st->data[i];\n}']