搜索

7.2. 执行 CMC 吊销

download PDF
与 CMS (CMC)注册上的证书管理类似,CMC 吊销允许用户设置撤销客户端,并使用代理证书或使用匹配的 subjectDN 属性签署撤销请求。然后,用户可以向证书管理器发送已签名请求。
或者,也可以使用 Shared Secret Token 机制进行身份验证 CMC 撤销。详情请参阅 启用 CMC 共享 Secret 功能
无论用户或代理是否签署请求还是是否使用 Shared Secret Token,证书管理器会在收到有效撤销请求时自动撤销证书。
证书系统为 CMC 撤销请求提供以下工具:
重要
红帽建议使用 CMCRequest 工具来生成 CMC 撤销请求,因为它提供了比 CMCRevoke 更多选项。

7.2.1. 使用 CMCRequest吊销证书

使用 CMCRequest 吊销证书:
  1. 为 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
  2. 创建 CMC 请求:
    # CMCRequest /home/user_name/cmc-request.cfg
    如果命令成功,CMCRequest 工具会将 CMC 请求存储在请求配置文件中的 output 参数中指定的文件中。
  3. 创建配置文件,如 /home/user_name/cmc-submit.cfg,稍后的步骤中使用该文件向 CA 提交 CMC 撤销请求。在创建的文件中添加以下内容:
    #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 撤销请求被签名,请将 secureclientmode 参数设置为 true,并填写 nickname 参数。
  4. 根据谁签署了请求,必须相应地设置 HttpClient 配置文件中的 servlet 参数:
    • 如果代理签署了请求,请设置:
      servlet=/ca/ee/ca/profileSubmitCMCFull
    • 如果用户签署了请求,请设置:
      servlet=/ca/ee/ca/profileSubmitSelfSignedCMCFull
  5. 提交 CMC 请求:
    # HttpClient /home/user_name/cmc-submit.cfg
有关使用 CMCRequest 吊销证书的详情,请查看 CMCRequest(1) man page。

7.2.2. 使用 CMCRevoke吊销证书

CMC 吊销工具 CMCRevoke 用于通过代理的证书为撤销请求签名。此工具只需传递所需的信息 - 证书序列号、签发者名称和吊销原因 - 用于识别要撤销的证书,然后要求信息来标识执行撤销的 CA 代理(证书别名和数据库)。
证书被撤销的原因可以是以下任意一种(数字是传递给 CMCRevoke 工具的值):
  • 0 - 未指定
  • 1 - 密钥已被破坏
  • 2 - CA 密钥已被破坏
  • 3 - 员工的关联变化
  • 4 - 证书已被取代
  • 5 - 停止操作
  • 6 - 证书处于冻结状态
命令行工具指南中详细介绍了可用的工具 参数。

7.2.2.1. 测试 CMCRevoke

  1. 为现有证书创建 CMC 撤销请求。
    CMCRevoke -d/path/to/agent-cert-db -nnickname -iissuerName -sserialName -mreason -ccomment
    例如,如果包含代理证书的目录为 ~jsmith/.mozilla/firefox/,则证书的 nickname 为 AgentCert,证书的序列号为 22,如下所示:
    CMCRevoke -d"~jsmith/.mozilla/firefox/" -n"ManagerAgentCert" -i"cn=agentAuthMgr" -s22 -m0 -c"test comment"
    注意
    在引号中包含空格的值。
    重要
    在参数及其值之间没有空格。例如,提供序列号 26 是 -s26,而不是 -s 26
  2. 打开 end-entities 页面。
    https://server.example.com:8443/ca/ee/ca
  3. 选择 Revocation 选项卡。
  4. 选择菜单中的 CMC Revoke 链接。
  5. CMCRevoke 的输出粘贴到文本区域中。
  6. 从粘贴内容中删除 -----BEGIN NEW CERTIFICATE REQUEST---------END NEW CERTIFICATE REQUEST-----
  7. Submit
  8. 返回后的页面应确认已撤销正确的证书。
Red Hat logoGithubRedditYoutubeTwitter

学习

尝试、购买和销售

社区

关于红帽文档

通过我们的产品和服务,以及可以信赖的内容,帮助红帽用户创新并实现他们的目标。

让开源更具包容性

红帽致力于替换我们的代码、文档和 Web 属性中存在问题的语言。欲了解更多详情,请参阅红帽博客.

關於紅帽

我们提供强化的解决方案,使企业能够更轻松地跨平台和环境(从核心数据中心到网络边缘)工作。

© 2024 Red Hat, Inc.