7.2. 执行 CMC 吊销
与 CMS (CMC)注册上的证书管理类似,CMC 撤销可让用户设置撤销客户端,并使用代理证书或具有匹配 subjectDN
属性的用户证书签名撤销请求。然后,用户可以向证书管理器发送已签名请求。
或者,也可以使用 Shared Secret Token 机制进行身份验证 CMC 撤销。详情请参阅 启用 CMC Shared Secret 功能。
无论用户或代理是否签署请求还是是否使用 Shared Secret Token,证书管理器会在收到有效撤销请求时自动撤销证书。
证书系统为 CMC 撤销请求提供以下工具:
-
CMCRequest
。详情请查看 第 7.2.1 节 “使用CMCRequest
吊销证书”。 -
CMCRevoke
.详情请查看 第 7.2.2 节 “使用CMCRevoke
吊销证书”。
红帽建议使用 CMCRequest
程序来生成 CMC 撤销请求,因为它提供了比 CMCRevoke
更多的选项。
7.2.1. 使用 CMCRequest
吊销证书
使用 CMCRequest
撤销证书:
为 CMC 撤销请求创建配置文件,如
/home/user_name/cmc-request.cfg
,其内容如下:#numRequests: Total number of PKCS10 requests or CRMF requests. numRequests=1 #output: full path for the CMC request in binary format output=/home/user_name/cmc.revoke.userSigned.req #tokenname: name of token where user signing cert can be found #(default is internal) tokenname=internal #nickname: nickname for user signing certificate which will be used #to sign the CMC full request. nickname=signer_user_certificate #dbdir: directory for cert9.db, key4.db and pkcs11.txt dbdir=/home/user_name/.dogtag/nssdb/ #password: password for cert9.db which stores the user signing #certificate and keys password=myPass #format: request format, either pkcs10 or crmf. format=pkcs10 ## revocation parameters revRequest.enable=true revRequest.serial=45 revRequest.reason=unspecified revRequest.comment=user test revocation revRequest.issuer=issuer revRequest.sharedSecret=shared_secret
创建 CMC 请求:
# CMCRequest /home/user_name/cmc-request.cfg
如果命令成功,
CMCRequest
工具会将 CMC 请求存储在请求配置文件的output
参数中指定的文件中。创建配置文件,如
/home/user_name/cmc-submit.cfg
,以便稍后的步骤将 CMC 重新vocation 请求提交到 CA。在创建的文件中添加以下内容:#host: host name for the http server host=>server.example.com #port: port number port=8443 #secure: true for secure connection, false for nonsecure connection secure=true #input: full path for the enrollment request, the content must be #in binary format input=/home/user_name/cmc.revoke.userSigned.req #output: full path for the response in binary format output=/home/user_name/cmc.revoke.userSigned.resp #tokenname: name of token where SSL client authentication certificate #can be found (default is internal) #This parameter will be ignored if secure=false tokenname=internal #dbdir: directory for cert9.db, key4.db and pkcs11.txt #This parameter will be ignored if secure=false dbdir=/home/user_name/.dogtag/nssdb/ #clientmode: true for client authentication, false for no client #authentication. This parameter will be ignored if secure=false clientmode=true #password: password for cert9.db #This parameter will be ignored if secure=false and clientauth=false password=password #nickname: nickname for client certificate #This parameter will be ignored if clientmode=false nickname=signer_user_certificate
重要如果 CMC 吊销请求已签名,请将
secure
和clientmode
参数设置为true
,并填写nickname
参数。根据请求签名,需要相应地设置
HttpClient
配置文件中的servlet
参数:如果代理签署了请求,请设置:
servlet=/ca/ee/ca/profileSubmitCMCFull
如果用户签署了请求,请设置:
servlet=/ca/ee/ca/profileSubmitSelfSignedCMCFull
提交 CMC 请求:
# HttpClient /home/user_name/cmc-submit.cfg
有关使用 CMCRequest
撤销证书的详情,请查看 CMCRequest (1)
手册页。
7.2.2. 使用 CMCRevoke
吊销证书
CMC 吊销实用程序 CMCRevoke
用于通过代理的证书签署撤销请求。这个工具只是传递所需信息 - 证书序列号、签发者名称和吊销原因 - 用于标识要撤销的证书,然后需要信息来标识执行撤销的 CA 代理(certificate nickname 和带有证书的数据库)。
有关启用 CMCRevoke
的更多信息,请参阅 规划、安装和部署指南中的 Web 用户界面启用 CMCRevoke。
证书被撤销的原因可以是以下任意一种(数字是传递给 CMCRevoke
实用程序的值):
-
0
- unspecified -
1
- 密钥被入侵 -
2
- CA 密钥被破坏 -
对员工的
3
个关系变化 -
4
- 证书已被取代 -
5
到识别操作 -
6
- 证书处于保存状态
测试 CMCRevoke
为现有证书创建 CMC 撤销请求。
CMCRevoke -d /path/to/agent-cert-db -n nickname -i issuerName -s serialName -m reason -c comment
例如,如果包含代理证书的目录是
~jsmith/.mozilla/firefox/
,证书的 nickname 为AgentCert
,且证书的序列号为22
,则命令如下所示:CMCRevoke -d "~jsmith/.mozilla/firefox/" -n "ManagerAgentCert" -i "cn=agentAuthMgr" -s 22 -m 0 -c "test comment"
注意在引号中包含空格的值。
重要在参数及其值之间没有空格。例如,提供序列号为 26 is -s26, not -s 26。
打开 end-entities 页面。
https://server.example.com:8443/ca/ee/ca
- 选择 Revocation 选项卡。
- 选择菜单中的 CMC Revoke 链接。
-
将
CMCRevoke
的输出粘贴到文本区域中。 -
从粘贴内容中删除
-----BEGIN NEW CERTIFICATE REQUEST-----
和---END NEW CERTIFICATE REQUEST-----
。 - 点 。
- 返回的页面应该确认已撤销了正确的证书。