How to trust an invalid certificate in Big Sur / Safari 14
Note: Don't do this for sites you don't trust!
This might not be the simplest solution, but it's the only one I could come up with (thanks to https://serverfault.com/questions/139728/how-to-download-the-ssl-certificate-from-a-website# for explaining how to download the certificate). Assuming we want to trust https://test.com/
- Download the certificate by running this in the Terminal:
echo -n | openssl s_client -connect test.com:443 | sed -ne '/-BEGIN CERTIFICATE-/,/-END CERTIFICATE-/p' > /tmp/test.cert
- Add it to your Keychain
open /tmp/test.cert
- Add it to the System Keychain
- Find it in the Keychain, double-click it and trust it: