From the Criminal Code of Canada:

High treason

46 (1) Every one commits high treason who, in Canada,

... (c) assists an enemy at war with Canada, or any armed forces against whom Canadian Forces are engaged in hostilities, whether or not a state of war exists between Canada and the country whose forces they are.

…….Canadian citizen

(3) Notwithstanding subsection (1) or (2), a Canadian citizen or a person who owes allegiance to Her Majesty in right of Canada,

.......(a) commits high treason if, while in or out of Canada, he does anything mentioned in subsection (1); 

Khadr translated for the Taliban, built bombs for the Taliban, and fought for the Taliban, all while Canadian Forces were engaged in hostilities with the Taliban.