Iran says has ‘legal right’ to punish Israel for Haniyeh killing