X509_STORE_CTX_init(csc,ctx,x,uchain);
if(!X509_STORE_CTX_init(csc,ctx,x,uchain)) { ERR_print_errors(bio_err); goto end; }
static int check(X509_STORE *ctx, char *file, STACK_OF(X509) *uchain, STACK_OF(X509) *tchain, int purpose, ENGINE *e)	{	X509 *x=NULL;	int i=0,ret=0;	X509_STORE_CTX *csc;	x = load_cert(bio_err, file, FORMAT_PEM, NULL, e, "certificate file");	if (x == NULL)		goto end;	fprintf(stdout,"%s: ",(file == NULL)?"stdin":file);	csc = X509_STORE_CTX_new();	if (csc == NULL)		{		ERR_print_errors(bio_err);		goto end;		}	X509_STORE_set_flags(ctx, vflags);	X509_STORE_CTX_init(csc,ctx,x,uchain);	if(tchain) X509_STORE_CTX_trusted_stack(csc, tchain);	if(purpose >= 0) X509_STORE_CTX_set_purpose(csc, purpose);	i=X509_verify_cert(csc);	X509_STORE_CTX_free(csc);	ret=0;end:	if (i)		{		fprintf(stdout,"OK\n");		ret=1;		}	else		ERR_print_errors(bio_err);	if (x != NULL) X509_free(x);	return(ret);	}