Iran finalizes war-agreement details