Cloud-computing environment provides on-demand computing and information technology services to a number of individual consumers, organizations, and the IT industry. With the rapid growth of cloud computing, the idea of federated cloud computing has emerged to fulfill the need for more efficient cloud services. In federated clouds, several independent cloud service providers share their infrastructure and other cloud services together in order to offer better quality of service (QoS) to their clients. In addition, cloud-service providers with underutilized resources can offer their resources as services to other providers to increase their profits. However, the interaction between several cloud service providers in a peer-to-peer (P2P) scheme through the federated cloud raises multiple issues. Trust is one of the most challenging issues in this environment. Therefore, to tackle the challenge of trust management in P2P federated clouds and enhance the level of the provided QoS, a trust management system for peer-to-peer federated clouds (TrustyFeer) is proposed in this project. The TrustyFeer system combines advantages of already available approaches and adds to them to fit in the P2P federated cloud context. A new formulation of subjective logic equations that considers peers reputation and service level agreement (SLA) is suggested. To evaluate the performance of TrustyFeer, a federated public cloud model will be simulated under various number of CSPs, percentages, and models of malicious peers. Additionally, the performance of the proposed algorithm will be benchmarked against three long-standing trust management systems.