Legally, they did nothing wrong. But ethically and morally? They probably didn't expect the blowback they are receiving now. But I do think it is warranted. When companies do business with oppressive regimes then they reap what they sow. Sure the deal was done probably years before the election took place. But did it not occur to anyone involved that these people, "the Ahmidenijad government", aren't good guys.
20 years ago, Nike got dragged over the nails because the companies they contracted with were using child labor and using inhuman working conditions. Legally, they did nothing wrong but the bad press made them take note that their involvement wasn't 100% guilt free. They paid a moral cost and now go out of their way to remind people that they don't use sweatshop labor.
Hopefully, this will remind Nokia, Siemens, and NSS that there is a human cost in every business transaction.