The court convicted the men of planning and implementing the August 19 attacks on the Iraqi Ministries of Finance and Foreign Affairs .