unsigned char *row[DB_NUMBER],**rrow;
char *row[DB_NUMBER],**rrow;
static int get_certificate_status(const char *serial, TXT_DB *db)	{	unsigned char *row[DB_NUMBER],**rrow;	int ok=-1,i;	/* Free Resources */	for (i=0; i<DB_NUMBER; i++)		row[i]=NULL;	/* Malloc needed char spaces */	row[DB_serial] = OPENSSL_malloc(strlen(serial) + 2);	if (row[DB_serial] == NULL)		{		BIO_printf(bio_err,"Malloc failure\n");		goto err;		}	if (strlen(serial) % 2)		{		/* Set the first char to 0 */;		row[DB_serial][0]='0';		/* Copy String from serial to row[DB_serial] */		memcpy(row[DB_serial]+1, serial, strlen(serial));		row[DB_serial][strlen(serial)+1]='\0';		}	else		{		/* Copy String from serial to row[DB_serial] */		memcpy(row[DB_serial], serial, strlen(serial));		row[DB_serial][strlen(serial)]='\0';		}				/* Make it Upper Case */	for (i=0; row[DB_serial][i] != '\0'; i++)		row[DB_serial][i] = toupper(row[DB_serial][i]);	ok=1;	/* Search for the certificate */	rrow=TXT_DB_get_by_index(db,DB_serial,row);	if (rrow == NULL)		{		BIO_printf(bio_err,"Serial %s not present in db.\n",				 row[DB_serial]);		ok=-1;		goto err;		}	else if (rrow[DB_type][0]=='V')		{		BIO_printf(bio_err,"%s=Valid (%c)\n",			row[DB_serial], rrow[DB_type][0]);		goto err;		}	else if (rrow[DB_type][0]=='R')		{		BIO_printf(bio_err,"%s=Revoked (%c)\n",			row[DB_serial], rrow[DB_type][0]);		goto err;		}	else if (rrow[DB_type][0]=='E')		{		BIO_printf(bio_err,"%s=Expired (%c)\n",			row[DB_serial], rrow[DB_type][0]);		goto err;		}	else if (rrow[DB_type][0]=='S')		{		BIO_printf(bio_err,"%s=Suspended (%c)\n",			row[DB_serial], rrow[DB_type][0]);		goto err;		}	else		{		BIO_printf(bio_err,"%s=Unknown (%c).\n",			row[DB_serial], rrow[DB_type][0]);		ok=-1;		}err:	for (i=0; i<DB_NUMBER; i++)		{		if (row[i] != NULL)			OPENSSL_free(row[i]);		}	return(ok);	}