Skip to content
Snippets Groups Projects
Commit 83bb2f0b authored by chengr28's avatar chengr28
Browse files

2014-09-21

Fix multi-user bugs.
parent e52ad68f
No related branches found
No related tags found
No related merge requests found
...@@ -2,53 +2,57 @@ ...@@ -2,53 +2,57 @@
============== ==============
Anti China Certifications. Anti China Certifications.
### 版本 ### 更新日期
Last updated on **2014-09-10** **2014-09-21**
### 方法 ### 方法
* Windows * Windows
* 直接选择运行在 Windows 目录里的批处理 * 直接选择运行在 Windows 目录里的批处理
* Base 版本 **以管理员身份运行** AntiChinaCerts_Base.bat 而 Extended 版本 **以管理员身份运行** AntiChinaCerts_Extended.bat * Base 版本直接运行 AntiChinaCerts_Base.bat 而 Extended 版本直接运行 AntiChinaCerts_Extended.bat - Extended 版本扩展了 Base 版本,具体扩展的列表参见涉及的CA根证书的介绍
* Extended 版本扩展了 Base 版本,具体扩展的列表参见涉及的CA根证书的介绍 * 操作完毕建议清空所有浏览器数据和系统缓存,并重启网络连接
* Linux * Linux
* 以 Debian 系列为例子,其它 Linux 发行版操作方法参见其官方说明 * 以 Debian 系列为例子,其它 Linux 发行版操作方法参见其官方说明
* 打开终端并执行 `sudo dpkg-reconfigure ca-certificates` * 打开终端并执行 `sudo dpkg-reconfigure ca-certificates`
* 在列表中找到并选择需要禁用的证书,按空格键取消对该证书的信任 * 在列表中找到并选择需要禁用的证书,按空格键取消对该证书的信任
* 对所有需要禁用的证书执行完上步操作后回车确定 * 对所有需要禁用的证书执行完上步操作后回车确定
* 操作完毕建议清空所有浏览器数据和系统缓存,并重启网络连接
* Mac * Mac
* `实用工具` - `钥匙串访问` - 在 `钥匙串` 中选择 `系统根证书` * `实用工具` - `钥匙串访问` - 在 `钥匙串` 中选择 `系统根证书`
* 点击进入需要禁用的证书,展开 `信任` 标签并在 `使用此证书时` 下拉菜单选择 `永不信任` 并关闭即可 * 点击进入需要禁用的证书,展开 `信任` 标签并在 `使用此证书时` 下拉菜单选择 `永不信任` 并关闭即可
* 操作完毕建议清空所有浏览器数据和系统缓存,并重启网络连接
* Firefox * Firefox
* `工具` - `选项` - `高级` - `证书` - `查看证书` * `工具` - `选项` - `高级` - `证书` - `查看证书`
* 点击进入需要禁用的证书,直接点击 `删除或不信任` 按钮即可 * 点击进入需要禁用的证书,直接点击 `删除或不信任` 按钮即可
* 操作完毕建议清空所有浏览器数据和系统缓存,并重启网络连接
* Android * Android
* `设置` - `安全` - `受信任的凭据(显示受信任的CA证书)` * `设置` - `安全` - `受信任的凭据(显示受信任的CA证书)`
* 点击进入需要禁用的证书并下拉到最下面,点击 `禁用` 按钮即可 * 点击进入需要禁用的证书并下拉到最下面,点击 `禁用` 按钮即可
* 操作完毕建议清空所有浏览器数据和系统缓存,并重启网络连接
* iOS * iOS
* 安装 Apple 官方的 iPhone Configuration Utility/iPCU 软件,并在当前系统上导入证书并安装 iPhone 配置实用工具 * 安装 Apple 官方的 iPhone Configuration Utility/iPCU 软件,并在当前系统上导入证书并安装 iPhone 配置实用工具
* 左侧面板点击 `配置描述文件` - `新建``通用` 里设置好名称和标识符创建描述文件 - 在 `凭证` 里点击 `配置` - 选择证书并设置为禁用 * 左侧面板点击 `配置描述文件` - `新建``通用` 里设置好名称和标识符创建描述文件 - 在 `凭证` 里点击 `配置` - 选择证书并设置为禁用
* 将设备连接到电脑 - 左侧面板点击 `设备` 下的对应设备 - 选择 `配置描述文件` 标签页 - 安装刚才新建的描述文件以安装描述文件到设备 * 将设备连接到电脑 - 左侧面板点击 `设备` 下的对应设备 - 选择 `配置描述文件` 标签页 - 安装刚才新建的描述文件以安装描述文件到设备
* 操作完毕建议清空所有浏览器数据和系统缓存,并重启网络连接
### 说明 ### 说明
* Windows * Windows
* 本工具作用是先将列表中的CA根证书删掉,然后再将这些证书添加到CRL证书吊销列表中,CRL证书吊销列表中的证书才会被彻底禁用 * 本工具作用是先将列表中的CA根证书删掉,然后再将这些证书添加到CRL证书吊销列表中,CRL证书吊销列表中的证书才会被彻底禁用
* Extended 版本为 Base 版本扩展,添加另外几个CA根证书 * Extended 版本为 Base 版本扩展,添加另外几个CA根证书
* 使用前 **强烈建议以管理员身份运行自带的 RootSUPD** 更新系统的证书列表
* 大部分 Windows 的程序和浏览器 Chrome 以及 Opera 亦使用 Windows 系统 * 大部分 Windows 的程序和浏览器 Chrome 以及 Opera 亦使用 Windows 系统
* Linux * Linux
* 不同发行版系统本身的CA根证书列表可能有所不同,具体需要按实际情况操作 * 不同发行版系统本身的CA根证书列表可能有所不同,具体需要按实际情况操作
* Mac * Mac
* 最新 OS X 10.9 版本自带有 CNNIC ROOT 和 China Internet Network Information Center EV Certificates Root 和 UCA Global Root 以及 UCA Root * OS X 10.9 版本自带有 CNNIC ROOT 和 China Internet Network Information Center EV Certificates Root 和 UCA Global Root 以及 UCA Root
* Firefox * Firefox
* 最新 32 版本自带有 CNNIC ROOT 以及 China Internet Network Information Center EV Certificates Root * 32 版本自带有 CNNIC ROOT 以及 China Internet Network Information Center EV Certificates Root
* Android * Android
* 最新 4.4.4 版本自带有 CNNIC ROOT 以及 China Internet Network Information Center EV Certificates Root * 4.4.4 版本自带有 CNNIC ROOT 以及 China Internet Network Information Center EV Certificates Root
* 非最新 4.4.4 版本之前的版本可能自带有 CNNIC ROOT * 4.4.4 版本之前的版本可能自带有 CNNIC ROOT
### 注意 ### 注意
* Windows * Windows
* **将CA根证书直接删除没有任何作用,下次访问使用该证书的网站时系统又会重新自动联网添加。同时由于每个用户使用独立的证书列表,所以需要所有用户都运行一次本工具才能彻底禁用** * **将CA根证书直接删除没有任何作用,下次访问使用该证书的网站时系统又会重新自动联网添加。同时由于每个用户使用独立的证书列表,所以需要所有用户都运行一次本工具才能彻底禁用**
* 运行时如果遇到 `Error: Can not find a certificate matching the hash value` 不需要在意,只要后面 `CertMgr Succeeded` 运行成功就行,如果提示错误请检查是否是以管理员权限运行或联系作者寻求帮助。运行完毕建议清空所有浏览器数据以及系统SSL缓存以免出错 * 运行时如果遇到 `Error: Can not find a certificate matching the hash value` 不需要在意,只要后面吊销证书时 `CertMgr Succeeded` 运行成功就行
* 如果证书验证出现问题,可使用 Microsoft_Fixit_20135.diagcab(Win7以及之后) 或者 Microsoft_Fixit_51014.msi(Vista以及之前) 重置证书列表并重新安装证书更新,**不过大多数情况下并不需要** * 如果证书验证出现问题,可使用 Microsoft_Fixit_20135.diagcab(Win7以及之后) 或者 Microsoft_Fixit_51014.msi(Vista以及之前) 重置证书列表并重新安装证书更新,**不过大多数情况下并不需要**
* Linux * Linux
* 在 /usr/share/ca-certificates 里也有一份各程序自己的CA根证书列表,大多数情况下直接删除可能并不能禁用证书 * 在 /usr/share/ca-certificates 里也有一份各程序自己的CA根证书列表,大多数情况下直接删除可能并不能禁用证书
...@@ -56,9 +60,8 @@ Last updated on **2014-09-10** ...@@ -56,9 +60,8 @@ Last updated on **2014-09-10**
* Firefox * Firefox
* 在 Firefox 里对自带根证书执行 `删除或不信任` 操作就相当于是禁用其所有目的,并不会将根证书本身删除 * 在 Firefox 里对自带根证书执行 `删除或不信任` 操作就相当于是禁用其所有目的,并不会将根证书本身删除
* Android * Android
* Android 上由于没有提供比较方便的方法编辑CRL列表,所以证书并不能被完全禁用,Apps 可以通过忽略证书错误继续使用 * Android 上由于没有提供比较方便的方法编辑CRL列表,故证书并不能被完全禁用,Apps 可以通过忽略证书错误继续使用
* **Android 系统没有自带的CA根证书默认为不信任状态,所以不需要手动添加到系统中** * **Android 系统没有自带的CA根证书默认为不信任状态,不需要手动添加到系统中**
* 操作完毕建议清空所有浏览器数据和系统缓存,并重启网络连接
### 涉及的CA根证书 ### 涉及的CA根证书
* Base 版本 * Base 版本
...@@ -102,8 +105,8 @@ Last updated on **2014-09-10** ...@@ -102,8 +105,8 @@ Last updated on **2014-09-10**
* 所属机构为 [Shanghai Electronic Certificate Authority Center/SHECA/上海市数字证书认证中心](http://www.sheca.com) * 所属机构为 [Shanghai Electronic Certificate Authority Center/SHECA/上海市数字证书认证中心](http://www.sheca.com)
* 观察中(**未被禁用** * 观察中(**未被禁用**
* SRCA * SRCA
* 本证书由其自行颁发,没有经过任何符合国际标准的国际事务所进行审计
* SHA-1 指纹 AE3F2E66D48FC6BD1DF131E89D768D505DF14302 * SHA-1 指纹 AE3F2E66D48FC6BD1DF131E89D768D505DF14302
* 本证书由其自行颁发,没有经过任何符合国际标准的国际事务所进行审计,形迹可疑
* 所属机构为 [Sinorail Certification Authority/SRCA/中铁数字证书认证中心](http://www.12306.cn) * 所属机构为 [Sinorail Certification Authority/SRCA/中铁数字证书认证中心](http://www.12306.cn)
* [测试网址](https://kyfw.12306.cn) * [测试网址](https://kyfw.12306.cn)
* Certification Authority of WoSign * Certification Authority of WoSign
......
...@@ -7,20 +7,21 @@ ...@@ -7,20 +7,21 @@
@echo off @echo off
:: Permission check :: Permission check
if "%PROCESSOR_ARCHITECTURE%" == "AMD64" (set SystemPath = %SystemRoot%\SysWOW64) else (set SystemPath = %SystemRoot%\system32) :: Administrator permissions are not necessary(2014-09-21)
::if "%PROCESSOR_ARCHITECTURE%" == "AMD64" (set SystemPath = %SystemRoot%\SysWOW64) else (set SystemPath = %SystemRoot%\system32)
::rd "%SystemPath%\Test_Permissions" > nul 2 > nul ::rd "%SystemPath%\Test_Permissions" > nul 2 > nul
::md "%SystemPath%\Test_Permissions" 2 > nul || (echo Require Administrator Permission. && pause > nul && Exit) ::md "%SystemPath%\Test_Permissions" 2 > nul || (echo Require Administrator Permission. && pause > nul && Exit)
::rd "%SystemPath%\Test_Permissions" > nul 2 > nul ::rd "%SystemPath%\Test_Permissions" > nul 2 > nul
del /f /q %SystemPath%\TestPermission.log ::del /f /q %SystemPath%\TestPermission.log
echo "Permission check." >> %SystemPath%\TestPermission.log ::echo "Permission check." >> %SystemPath%\TestPermission.log
if not exist %SystemPath%\TestPermission.log (echo Require Administrator Permission. && pause > nul && Exit) ::if not exist %SystemPath%\TestPermission.log (echo Require Administrator Permission. && pause > nul && Exit)
del /f /q %SystemPath%\TestPermission.log ::del /f /q %SystemPath%\TestPermission.log
cd /d %~dp0 cd /d %~dp0
:: Update certifications :: Update certifications
RootSUPD_201403_x86 RootSUPD_201403_x86
cls ::cls
cd /d %~dp0\Certs cd /d %~dp0\Certs
:: Architecture check :: Architecture check
...@@ -44,18 +45,18 @@ CertMgr_x86 -del -c -sha1 4F99AA93FB2BD13726A1994ACE7FF005F2935D1E -s -r localMa ...@@ -44,18 +45,18 @@ CertMgr_x86 -del -c -sha1 4F99AA93FB2BD13726A1994ACE7FF005F2935D1E -s -r localMa
@echo. @echo.
:: Add certifications to CRL(Base) :: Add certifications to CRL(Base)
CertMgr_x86 -add -c FakeGitHubCom_2013_01.crt -s Disallowed CertMgr_x86 -add -c FakeGitHubCom_201301.crt -s Disallowed
CertMgr_x86 -add -c FakeGoogleCom_2014_07.crt -s Disallowed CertMgr_x86 -add -c FakeGoogleCom_201407.crt -s Disallowed
CertMgr_x86 -add -c CNNIC_ROOT.crt -s Disallowed CertMgr_x86 -add -c CNNIC_ROOT.crt -s Disallowed
CertMgr_x86 -add -c China_Internet_Network_Information_Center_EV_Certificates_Root.crt -s Disallowed CertMgr_x86 -add -c China_Internet_Network_Information_Center_EV_Certificates_Root.crt -s Disallowed
goto Exit goto Exit
:X64 :X64
:: Delete certifications(Base) :: Delete certifications(Base)
:: Fake GitHub.Com(2013-01-25) :: Fake GitHub.Com(2013-01-25)
CertMgr -del -c -sha1 27A29C3A8B3261770E8B59448557DC9E9339E68C -s -r localMachine Root CertMgr -del -c -sha1 27A29C3A8B3261770E8B59448557DC9E9339E68C -s -r localMachine Root
CertMgr -del -c -sha1 27A29C3A8B3261770E8B59448557DC9E9339E68C -s -r localMachine AuthRoot CertMgr -del -c -sha1 27A29C3A8B3261770E8B59448557DC9E9339E68C -s -r localMachine AuthRoot
:: Fake Google.Com(2014-07-24) :: Fake Google.Com(2014-07-24)
CertMgr -del -c -sha1 F6BEADB9BC02E0A152D71C318739CDECFC1C085D -s -r localMachine Root CertMgr -del -c -sha1 F6BEADB9BC02E0A152D71C318739CDECFC1C085D -s -r localMachine Root
CertMgr -del -c -sha1 F6BEADB9BC02E0A152D71C318739CDECFC1C085D -s -r localMachine AuthRoot CertMgr -del -c -sha1 F6BEADB9BC02E0A152D71C318739CDECFC1C085D -s -r localMachine AuthRoot
:: CNNIC ROOT :: CNNIC ROOT
......
...@@ -7,14 +7,15 @@ ...@@ -7,14 +7,15 @@
@echo off @echo off
:: Permission check :: Permission check
if "%PROCESSOR_ARCHITECTURE%" == "AMD64" (set SystemPath = %SystemRoot%\SysWOW64) else (set SystemPath = %SystemRoot%\system32) :: Administrator permissions are not necessary(2014-09-21)
::if "%PROCESSOR_ARCHITECTURE%" == "AMD64" (set SystemPath = %SystemRoot%\SysWOW64) else (set SystemPath = %SystemRoot%\system32)
::rd "%SystemPath%\Test_Permissions" > nul 2 > nul ::rd "%SystemPath%\Test_Permissions" > nul 2 > nul
::md "%SystemPath%\Test_Permissions" 2 > nul || (echo Require Administrator Permission. && pause > nul && Exit) ::md "%SystemPath%\Test_Permissions" 2 > nul || (echo Require Administrator Permission. && pause > nul && Exit)
::rd "%SystemPath%\Test_Permissions" > nul 2 > nul ::rd "%SystemPath%\Test_Permissions" > nul 2 > nul
del /f /q %SystemPath%\TestPermission.log ::del /f /q %SystemPath%\TestPermission.log
echo "Permission check." >> %SystemPath%\TestPermission.log ::echo "Permission check." >> %SystemPath%\TestPermission.log
if not exist %SystemPath%\TestPermission.log (echo Require Administrator Permission. && pause > nul && Exit) ::if not exist %SystemPath%\TestPermission.log (echo Require Administrator Permission. && pause > nul && Exit)
del /f /q %SystemPath%\TestPermission.log ::del /f /q %SystemPath%\TestPermission.log
cd /d %~dp0 cd /d %~dp0
:: Update certifications :: Update certifications
...@@ -63,8 +64,8 @@ CertMgr_x86 -del -c -sha1 B9C9F58B3BBEF575E2B58328770E7B0076C40B5E -s -r localMa ...@@ -63,8 +64,8 @@ CertMgr_x86 -del -c -sha1 B9C9F58B3BBEF575E2B58328770E7B0076C40B5E -s -r localMa
@echo. @echo.
:: Add certifications to CRL(Base) :: Add certifications to CRL(Base)
CertMgr_x86 -add -c FakeGitHubCom_2013_01.crt -s Disallowed CertMgr_x86 -add -c FakeGitHubCom_201301.crt -s Disallowed
CertMgr_x86 -add -c FakeGoogleCom_2014_07.crt -s Disallowed CertMgr_x86 -add -c FakeGoogleCom_201407.crt -s Disallowed
CertMgr_x86 -add -c CNNIC_ROOT.crt -s Disallowed CertMgr_x86 -add -c CNNIC_ROOT.crt -s Disallowed
CertMgr_x86 -add -c China_Internet_Network_Information_Center_EV_Certificates_Root.crt -s Disallowed CertMgr_x86 -add -c China_Internet_Network_Information_Center_EV_Certificates_Root.crt -s Disallowed
:: Add certifications to CRL(Extended) :: Add certifications to CRL(Extended)
...@@ -78,10 +79,10 @@ goto Exit ...@@ -78,10 +79,10 @@ goto Exit
:X64 :X64
:: Delete certifications(Base) :: Delete certifications(Base)
:: Fake GitHub.Com(2013-01-25) :: Fake GitHub.Com(2013-01-25)
CertMgr -del -c -sha1 27A29C3A8B3261770E8B59448557DC9E9339E68C -s -r localMachine Root CertMgr -del -c -sha1 27A29C3A8B3261770E8B59448557DC9E9339E68C -s -r localMachine Root
CertMgr -del -c -sha1 27A29C3A8B3261770E8B59448557DC9E9339E68C -s -r localMachine AuthRoot CertMgr -del -c -sha1 27A29C3A8B3261770E8B59448557DC9E9339E68C -s -r localMachine AuthRoot
:: Fake Google.Com(2014-07-24) :: Fake Google.Com(2014-07-24)
CertMgr -del -c -sha1 F6BEADB9BC02E0A152D71C318739CDECFC1C085D -s -r localMachine Root CertMgr -del -c -sha1 F6BEADB9BC02E0A152D71C318739CDECFC1C085D -s -r localMachine Root
CertMgr -del -c -sha1 F6BEADB9BC02E0A152D71C318739CDECFC1C085D -s -r localMachine AuthRoot CertMgr -del -c -sha1 F6BEADB9BC02E0A152D71C318739CDECFC1C085D -s -r localMachine AuthRoot
:: CNNIC ROOT :: CNNIC ROOT
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment