7.2. 执行 CMC 吊销


与 CMS (CMC)注册上的证书管理类似,CMC 撤销可让用户设置撤销客户端,并使用代理证书或具有匹配 subjectDN 属性的用户证书签名撤销请求。然后,用户可以向证书管理器发送已签名请求。

或者,也可以使用 Shared Secret Token 机制进行身份验证 CMC 撤销。详情请参阅 启用 CMC Shared 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,以便稍后的步骤将 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 吊销请求已签名,请将 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) 手册页。

7.2.2. 使用 CMCRevoke吊销证书

CMC 吊销实用程序 CMCRevoke 用于通过代理的证书签署撤销请求。这个工具只是传递所需信息 - 证书序列号、签发者名称和吊销原因 - 用于标识要撤销的证书,然后需要信息来标识执行撤销的 CA 代理(certificate nickname 和带有证书的数据库)。

注意

有关启用 CMCRevoke 的更多信息,请参阅 规划、安装和部署指南中的 Web 用户界面启用 CMCRevoke

证书被撤销的原因可以是以下任意一种(数字是传递给 CMCRevoke 实用程序的值):

  • 0- unspecified
  • 1- 密钥被入侵
  • 2- CA 密钥被破坏
  • 对员工的 3个关系变化
  • 4- 证书已被取代
  • 5到识别操作
  • 6- 证书处于保存状态
测试 CMCRevoke
  1. 为现有证书创建 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

  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.