The international law states that it is legal to kill any enemy soldier regardless of function or rank.
Even if that soldier is not a combatant or is on leave. Killing civilians is forbidden even if they are actively involve in the military effort.
2010