You asked Firefox to connect securely to goodsite.com. The server for that site sent you credentials for malicious.com. This should never happen.
When you visited this site in the past, you got credentials for goodsite.com. According to Herdict, other people who visited it today have also gotten credentials for malicious.com. That means someone may have hijacked the server.
You should not visit this website.
Try to visit another secure website, such as https://www.mozilla.org/. This will help us determine whether the problem is with your Internet connection, or with the website.
Give different advice if we can tell from browser history whether the problem affects all sites.
This shows a nicely formatted view of the certificate, with suspicious bits highlighted.
Certificate exception dialog as usual.