Even people in concentration camps went through legal proceedings of sorts. See e.g. the infamous Article 58 of Soviet penal code.
You can always tweak law to make criminal out of anyone inconvenient. Wasn't Assange's consensual sex relegated to rape?