AEPerr(AEP_F_AEP_MOD_EXP,AEP_R_MOD_EXP_FAILED);
AEPHKerr(AEPHK_F_AEP_MOD_EXP,AEPHK_R_MOD_EXP_FAILED);
static int aep_mod_exp(BIGNUM *r, const BIGNUM *a, const BIGNUM *p,	const BIGNUM *m, BN_CTX *ctx)	{	int to_return = 0;	AEP_CONNECTION_HNDL hConnection;	AEP_RV rv;	/*Grab a connection from the pool*/	rv = aep_get_connection(&hConnection);	if (rv != AEP_R_OK)		{     		AEPerr(AEP_F_AEP_MOD_EXP,AEP_R_GET_HANDLE_FAILED);		goto err;		}	/*To the card with the mod exp*/	rv = p_AEP_ModExp(hConnection,(void*)a, (void*)p,(void*)m, (void*)r,NULL);	if (rv !=  AEP_R_OK)		{		AEPerr(AEP_F_AEP_MOD_EXP,AEP_R_MOD_EXP_FAILED);		rv = aep_return_connection(hConnection);		goto err;		}	/*Return the connection to the pool*/	rv = aep_return_connection(hConnection);	if (rv != AEP_R_OK)		{		AEPerr(AEP_F_AEP_RAND,AEP_R_RETURN_CONNECTION_FAILED); 		goto err;		}	to_return = 1; err:	return to_return;	}