Securing Topology Maintenance Protocols for Sensor Networks