Certificate installation problems on Ubuntu/Firefox

I am using Firefox 53 on Ubuntu 14.04. In order to install the mitmproxy certificate, I visited http://mitm.it, clicked on “Other” and downloaded the certificate.

However, this doesn’t seem to be sufficient. I still get the an error whenever I try to visit a HTTPS website on my browser.(See attached image). Am I missing something here? Please help me out.

I also tried to import “mitmproxy-ca-cert.pem” by going to the “Certificate Manager” (Authorities) dialog in Firefox. After importing, I don’t see any certificate under the name “mitmproxy”. I am not sure why this isn’t working.

I was able to get around this by removing Firefox, deleting the profile directory and re-installing Firefox.

sudo apt-get remove firefox
rm -rf ~/.mozilla
sudo apt-get install firefox

After this, just visiting mitm.it and downloading the certificate was enough to get mitmproxy to work.