Unable to connect to Home Assistant - certificate error

This worked in the end after spending 2-3 hours to get it working. Thanks.
FYI, To delete the SSL certificate, you have to do it from inside HA with Terminal access. Docker container didn’t allow me to delete from the SSL folder.