Skip to content

Instantly share code, notes, and snippets.

@jgamblin
Last active October 23, 2015 14:02
Show Gist options
  • Save jgamblin/df44a2b5ac17e5b6c332 to your computer and use it in GitHub Desktop.
Save jgamblin/df44a2b5ac17e5b6c332 to your computer and use it in GitHub Desktop.
Del_China_Gov_Certs_OSX.SH
#!/bin/bash
# Deletes CNNIC Root Certs from OSX 10.10.3
# WARNING: DO NOT RUN THIS UNLESS YOU KNOW WHAT YOU ARE DOING (BECAUSE I DONT)
# IT WILL PROBABLY INSTALL WINDOWS 98 ON YOUR MAC.
function remove {
echo "Removing ${1}"
sudo security delete-certificate -t -Z $2 /System/Library/Keychains/SystemRootCertificates.keychain
}
remove "China Internet Network Information Center EV Certificates Root" "4F99AA93FB2BD13726A1994ACE7FF005F2935D1E"
remove "CNNIC ROOT" "8BAF4C9B1DF02A92F7DA128EB91BACF498604B6F"
@okakaino
Copy link

Hi, I'm on Mac OS X 10.10.5, Chrome and Safari shows that the cnnic certificate is valid,
screen shot 2015-10-23 at 21 43 51
but the deletion fails like this
screen shot 2015-10-23 at 21 59 02

please help...
Thanks!!!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment