Trust negotiation represents a suitable approach for building trust between entities. It does not require a previous experience with an entity. This is useful for online environments, in which entities are anonymous and their attributes are unknown. In this thesis, we propose a general trust negotiation framework that facilitates establishing a trust relationship between two entities. The framework supports diverse trust negotiation scenarios and is applicable for a wide range of use cases. We follow the Software Development Life Cycle that divides a development process of the framework into particular phases. Developers are enabled to create their own trust negotiation models based on their requirements. We begin with an identification and analysis of criteria that we consider to be desired for trust negotiation. We also analyse a set of potentially suitable policy languages for trust negotiation and match their attributes against the identified criteria. We aim to determine the most suitable language that supports most of the criteria. Then, we propose a UML-based specification for modelling trust negotiation. Its design is modular and flexible in order to provide a wide range of features and configurations. Based on the specification, we propose a trust negotiation module that is a software component capable of performing automated trust negotiation on behalf of entities. The module is a self-contained unit that encapsulates all the needed functionality for trust negotiation. Finally, we define a trust negotiation ride-sharing scenario in order to validate our proposal. Based on it, we specify four use cases that are deployed in computing devices. The devices are interconnected by a local wireless network and carry out trust negotiation autonomously. Each use case utilises a different negotiation strategy. We analyse the strategies in terms of their efficiency for building trust and preserving privacy.