Fixing Firefox certificate error

It is really annoying when you can't connect to your equipment (ex. via HP iLo) or site via https using Firefox because it says sec_error_ca_cert_invalid or sec_error_reused_issuer_and_serial. Sometimes even after deleting stored certificates in Preferences -> Advanced -> Encryption - View Certificates -> Servers you can't connect.
One more thing you should check is the Certification centers tab (next to Servers tab). Make sure that there is no certificates or centers that may conflict with your site's or equipment's certificate. Delete all unnecessary certificates from that tab as well, pay special attention to Software Security Device objects. Hope that will help you get connected to where you want.