Opportunistic networks (Oppnets) are a kind of wireless networks that provide the opportunity to have social interaction and obtain data that can be used for message passing decision. The increase observed in the number of people with PDAs and other handset devices equipped with wireless technologies makes the forwarding paradigm and Oppnets scenarios more interesting and challenging. The main challenge in Oppnets is to take efficient routing decisions on securing the delivery of messages to the destination. Cooperation and trust between nodes in the network saves them from malicious attacks. The trust of a node is a basic value that symbolizes the magnitude of its social responsibility in the network, which include helping groups of nodes in message delivery, saving these nodes from malicious attacks, just to name a few. This paper focuses on blackhole attack against the PRoPHET routing protocol for Oppnets. A Trust-based Security Protocol (TSP) is proposed to secure Oppnets against blackhole attacks. Simulation results are provided to support the effectiveness of our proposed TSP approach, in the sense that considerable control is observed in the number of dropped packets, number of messages captured bythe malicious nodes (so-called malicious count) and overhead ratio.