Vinegar also cleans rusty bolts and nuts.
Put the offending fasteners in a bucket and cover with vinegar. Let sit a day or two, then thoroughly wash the nuts and bolts. Use a wire brush if needed to remove any stubborn debris. Make sure that you use plenty of water to rinse because the vinegar will continue to eat away at the metal. After they are dry spray with some WD-40.