The correct way to solve is to regenerate a new certificate on the device you’re connecting to.
Or to update the firmware of this device.
If it is not possible, enter in this folder and delete these two files
Restart Firefox. Try again and if it doesn’t solve, remove all the certificates on Firefox options.
You may also want to install this extension Skip Cert Error. Access the page and don’t do anything when Firefox asks you what to do with the certificate. It will skip the confirmation for self-generated certificates. Valuable for the IT professionals. Since you won’t be adding the certificate permanently, this error won’t show again. Remember to check the option “has domain mismatch”
You can also check if this applies to your situation Firefox Error code: sec_error_ca_cert_invalid