Illegal and Wrong

We have to get out of the mindset of thinking that things are wrong because they are illegal. People make laws and people can change those laws.
via Silk Road

Often people equate being illegal to being wrong. Though this may be true at times, it need not be always true. This is a fact that many people forget and do not think about.The laws that we have were made in a specific time with conditions pertaining to those times. And the fact that  they are made by people. They may not be relevant any more. Or it might be just that the laws presented views of the majority or of the rich and the powerful. And many times breaking the law itself is the right thing to do. Gandhi in his life showed this many times. So was it wrong when Gandhi broke the salt law, for example? If there is a law against speaking about wrongs government does, it would be illegal to break such a law, but would it be wrong?