It appears there's no way to do it through the UI based on the several hours I've poured into this trying to find an answer. Even worse, the only reliable way I've found to remove the exception is to delete the entire file `~/Library/Containers/com.apple.Safari/Data/Library/Safari/BypassedInvalidCertificateWarning.plist`. If I want to delete just a single entry from the bypass list I have to modify a plist file that isn't plaintext.
For example if I have expired.badssl.com added to the bypass list, the plist looks something like this:
bplist00?_expired.badssl.com443_BypassedInvalidCertificateDate_BypassedInvalidCertificateHost_'BypassedInvalidCertificateExceptionData3A?ݹ?Q S_expired.badssl.comOkbplist00??_TemporalValidityZSHA1DigesO@K?/L????:??R>?q?
"-.E
#*Kl??? "%
How the heck am I supposed to modify that easily without breaking something in the way the file needs to be formatted? This is so un-userfriendly.
The stack exchange post you linked seems to be the only other mention of this file or the entire problem related to this file, so it seems that few people have run into this problem but for web developers this is a perplexing waste of time when trying to use Safari to do development. I almost decided to ditch Safari and use Chrome because solving the warning suppression problem for certs was straightforward with that browser. I prefer to use Safari for development so I had to find a solution.
This is unacceptable functionality from Apple. I wasted several hours today trying to figure out how to reinstate the bad cert warning. I was resetting Safari, deleting all extensions, clearing cache, trying desperately to find an entry in Keychain Access, all to no avail. Luckily I had the idea to search the files in `~/Library` for anything with `Safari` in it and I stumbled upon the magic plist.
I hope I am wrong and there is some way to do this through the UI, but currently it seems the only way to do what you're asking is to delete the entire Bypassed Invalid Certificate Warning plist. If someone that actually works on developing Safari could explain to us how to single out and delete only a single exception that would be excellent, but seeing as this thread got no responses in over 3 months I am not going to hold my breath. I hope I'm wrong.