I would have thought that the answer is pretty obvious: A riot will be considered illegal if three things are true:
1- The police (usually provincial -- nothing to do with the Federal Conservatives) consider it a riot, and arrest you;
2- The Crown attorney (usually provincial -- nothing to do with the Federal Conservatives) agrees with the police and presses charges; and
3- The judge or jury agree with the Crown attorney and convict you.
In a free country like Canada, if you're reached this stage, it probably means that you did in fact participate in a riot.