7.2. 执行 CMC Revocation

与证书管理 over CMS(CMC)注册类似,CMC revocation 允许用户设置撤销客户端,并使用代理证书或具有匹配 subjectDN 属性的用户证书签署撤销请求。然后用户可以向证书管理器发送签名请求。
另外,CMC 撤销程序也可以使用 Shared Secret Token 机制进行身份验证。详情请参阅 红帽认证系统规划、安装和部署指南
无论用户或代理是否为请求签名,或者是否使用了共享 Secret 令牌,证书管理器会在收到有效撤销请求时自动撤销证书。
证书系统为 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 cert8.db, key3.db and secmod.db
    dbdir=/home/user_name/.dogtag/nssdb/
    
    #password: password for cert8.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 程序会在请求配置文件的 output 参数中指定的文件中存储 CMC 请求。
  3. 创建配置文件,如 /home/user_name/cmc-submit.cfg,您可以在稍后的步骤中使用该文件,将 CMC 撤销请求提交到 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 cert8.db, key3.db and secmod.db
    #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 cert8.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. 根据对请求签名的,Http Client 配置文件中的 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。