I’ve just had this issue which is caused by infinityfree not including the ca-bundle (i.e. intermediate) certificate on the server. There is then a break in the chain if the browser doesn’t already have the intermediate.
Where it does work, the browser will have previously been used to access a site where the server is correctly configured to include the relevant ca-bundle/intermediate certificate and it will have then stored that intermediate as a trusted certificate.
My solution was to move my site to another hosting provider where it is included and my site now renders perfectly - no more Firefox security warning.