ok=do_body(xret,pkey,x509,dgst,policy,db,serial,startdate,
ok=do_body(xret,pkey,x509,dgst,policy,db,serial,startdate, enddate,
static int certify(X509 **xret, char *infile, EVP_PKEY *pkey, X509 *x509,	     const EVP_MD *dgst, STACK_OF(CONF_VALUE) *policy, TXT_DB *db,	     BIGNUM *serial, char *startdate, int days, int batch,	     char *ext_sect, LHASH *lconf, int verbose)	{	X509_REQ *req=NULL;	BIO *in=NULL;	EVP_PKEY *pktmp=NULL;	int ok= -1,i;	in=BIO_new(BIO_s_file());	if (BIO_read_filename(in,infile) <= 0)		{		perror(infile);		goto err;		}	if ((req=PEM_read_bio_X509_REQ(in,NULL,NULL,NULL)) == NULL)		{		BIO_printf(bio_err,"Error reading certificate request in %s\n",			infile);		goto err;		}	if (verbose)		X509_REQ_print(bio_err,req);	BIO_printf(bio_err,"Check that the request matches the signature\n");	if ((pktmp=X509_REQ_get_pubkey(req)) == NULL)		{		BIO_printf(bio_err,"error unpacking public key\n");		goto err;		}	i=X509_REQ_verify(req,pktmp);	EVP_PKEY_free(pktmp);	if (i < 0)		{		ok=0;		BIO_printf(bio_err,"Signature verification problems....\n");		goto err;		}	if (i == 0)		{		ok=0;		BIO_printf(bio_err,"Signature did not match the certificate request\n");		goto err;		}	else		BIO_printf(bio_err,"Signature ok\n");	ok=do_body(xret,pkey,x509,dgst,policy,db,serial,startdate,		days,batch,verbose,req,ext_sect,lconf);err:	if (req != NULL) X509_REQ_free(req);	if (in != NULL) BIO_free(in);	return(ok);	}