ta/wallet_ta.c
/**
  * Unload wallet, so that it cannot be used until init_wallet() is called.
  * \param session_data A data pointer to a session context.
  * \param param_types The types of the four parameters.
  * \param params A pointer to an array of four parameters.
  * \return TEE_SUCCESS in case of success otherwise returns the result
  *         received from the failed operation. The information about all
  *         possible returns is present in TEE Client API Specification - 4.4.2
  *         published by GlobalPlatform.
  */
Unload wallet, so that it cannot be used until init_wallet() is called.
\param session_data A data pointer to a session context.
\param param_types The types of the four parameters.
\param params A pointer to an array of four parameters.
\return TEE_SUCCESS in case of success otherwise returns the result
received from the failed operation. The information about all
possible returns is present in TEE Client API Specification - 4.4.2
published by GlobalPlatform.
Unload wallet so that it cannot be used until init_wallet () is called . \ param session_data A data pointer to a session context . \ param param_types The types of the four parameters . \ param params A pointer to an array of four parameters . \ return TEE_SUCCESS in case of success otherwise returns the result received from the failed operation . The information about all possible returns is present in TEE Client API Specification - 4 . 4 . 2 published by GlobalPlatform .
static TEE_Result uninit_wallet(Session_data * session_data, uint32_t param_types, TEE_Param params[4])
{
	TEE_Result result = TEE_SUCCESS;
	uint32_t exp_param_types = TEE_PARAM_TYPES(
									TEE_PARAM_TYPE_NONE,
									TEE_PARAM_TYPE_NONE,
									TEE_PARAM_TYPE_NONE,
									TEE_PARAM_TYPE_NONE);
	if (exp_param_types != param_types)
		return TEE_ERROR_BAD_PARAMETERS;
	(void)&params;
	clear_parent_public_key_cache_internal(session_data);
	session_data->wallet_loaded = false;
	session_data->is_hidden_wallet = false;
	session_data->wallet_nv_address = 0;
	TEE_MemFill((WalletRecord*)(session_data->current_wallet),
				0,
				(uint32_t)sizeof(WalletRecord));
	return result;
}
static TEE_Result uninit_wallet ( Session_data * session_data , uint32_t param_types , TEE_Param params [ 4 ] ) { TEE_Result result = TEE_SUCCESS ; uint32_t exp_param_types = TEE_PARAM_TYPES ( TEE_PARAM_TYPE_NONE , TEE_PARAM_TYPE_NONE , TEE_PARAM_TYPE_NONE , TEE_PARAM_TYPE_NONE ) ; if ( exp_param_types != param_types ) return TEE_ERROR_BAD_PARAMETERS ; ( void ) & params ; clear_parent_public_key_cache_internal ( session_data ) ; session_data -> wallet_loaded = false ; session_data -> is_hidden_wallet = false ; session_data -> wallet_nv_address = 0 ; TEE_MemFill ( ( WalletRecord * ) ( session_data -> current_wallet ) , 0 , ( uint32_t ) sizeof ( WalletRecord ) ) ; return result ; }
Unload wallet, so that it cannot be used until init_wallet() is called.
Unload wallet so that it cannot be used until init_wallet () is called .