A Canadian officer working in military intelligence has been arrested and charged with passing classified information to a foreign entity.