MacOS – Safari SSL Errors

keychainmacossafarissl

What led to the problem

While I was trying to fix the Github SSL error caused by the DigiCert certificates, I deleted some of the certificates in the "Keychain Access" application. By doing this I broke my SSL certificates and now I am facing some serious problems. Initially I was not even able to connect to websites such as Facebook or Github because there was some trust issues. I fixed this issue but it seems that I am missing something.

Current problem

The problem occurs only with safari. I have tested with the Chrome browser and there was no issue. When I access the Github website (the only website I know that cause the error), I get in my error console a couple of errors similar to this one:

Failed to load resource: An SSL error has occurred and a secure
connection to the server cannot be made. (https://assets-cdn.github.com/images/modules/home/gh-windows-app.png)

This error affect the style of the page, there is no CSS or any image that is loaded on the Github page.

References

Here is my console output when I try to access the Github page:
Safari console

Here is the list of my DigiCert certificates:
Certificates

Thank you for your help!

Best Answer

If you've deleted the root certificates from your keychain, the easiest way I know to fix this is to reinstall.

When you visit a website, the browser checks the "chain of trust" of the website certificate. Basically it checks to see who has signed the certificate. If the root certificates are gone it won't recognise any of the common authorities like Verisign, Commodo, etc as being trusted.

Another option might be to download and reinstall a recent OS update from Apple as suggested here https://apple.stackexchange.com/a/123151/4007.