A social network approach to trust management in VANETs