AEPerr(AEP_F_AEP_FINISH,AEP_R_CONNECTIONS_IN_USE);
AEPHKerr(AEPHK_F_AEP_FINISH,AEPHK_R_CONNECTIONS_IN_USE);
static int aep_finish(ENGINE *e)	{	int to_return = 0, in_use;	AEP_RV rv;	if(aep_dso == NULL)		{		AEPerr(AEP_F_AEP_FINISH,AEP_R_NOT_LOADED);		goto err;		}	rv = aep_close_all_connections(0, &in_use);	if (rv != AEP_R_OK)		{		AEPerr(AEP_F_AEP_FINISH,AEP_R_CLOSE_HANDLES_FAILED);		goto err;		}	if (in_use)		{		AEPerr(AEP_F_AEP_FINISH,AEP_R_CONNECTIONS_IN_USE);		goto err;		}	rv = p_AEP_Finalize();	if (rv != AEP_R_OK)		{		AEPerr(AEP_F_AEP_FINISH,AEP_R_FINALIZE_FAILED);		goto err;		}	if(!DSO_free(aep_dso))		{		AEPerr(AEP_F_AEP_FINISH,AEP_R_UNIT_FAILURE);		goto err;		}	aep_dso = NULL;	p_AEP_CloseConnection   = NULL;	p_AEP_OpenConnection    = NULL;	p_AEP_ModExp            = NULL;	p_AEP_ModExpCrt         = NULL;#ifdef AEPRAND	p_AEP_GenRandom         = NULL;#endif	p_AEP_Initialize        = NULL;	p_AEP_Finalize          = NULL;	p_AEP_SetBNCallBacks    = NULL;	to_return = 1; err:	return to_return;	}