IBM Cloud Docs
验证证书

验证证书

您可以验证下载的证书以进行合同加密和认证。

下载证书

下载以下证书:

  • 获取 DigiCert 证书。 可以在 此处下载 DigiCert 可信根 G4 证书,也可以在 此处下载 Digicert G4 中间证书。
  • 获取 IBM 中间证书。 下表根据映像的版本列出了中间证书的到期日期。

从 2025 年 3 月 25 日起,证书链接将发生变化。

中间证书到期日期
映像版本 证书链接 到期日期
ibm-hyper-protect-container-runtime-1-0-s390x-23 证书 2026 年 9 月 01 日
ibm-hyper-protect-container-runtime-1-0-s390x-22 证书 2026 年 9 月 01 日
ibm-hyper-protect-container-runtime-1-0-s390x-21 证书 2026 年 9 月 01 日
ibm-hyper-protect-container-runtime-1-0-s390x-20 证书 2026 年 9 月 01 日
ibm-hyper-protect-container-runtime-1-0-s390x-19 证书 2026 年 9 月 01 日
ibm-hyper-protect-container-runtime-1-0-s390x-18 证书 2026 年 6 月 3 日
ibm-hyper-protect-container-runtime-1-0-s390x-17 证书 2026 年 6 月 3 日
  • 确保将与超保护容器运行时映像对应的证书用于合同加密和认证。

验证合同加密证书

在 Ubuntu 系统上完成以下步骤以验证加密证书:

  1. 使用以下命令验证 CA 证书:

    openssl verify -crl_download -crl_check DigiCertTrustedG4CodeSigningRSA4096SHA3842021CA1.crt.pem
    
  2. 使用以下命令验证签名密钥证书:

    openssl verify -crl_download -crl_check -untrusted DigiCertTrustedG4CodeSigningRSA4096SHA3842021CA1.crt.pem ibm-hyper-protect-container-runtime-1-0-s390x-23-intermediate.crt
    

    如果 OpenSSL 命令无法执行,请下载 CRL 并使用以下命令手动验证证书:

    openssl verify -untrusted DigiCertTrustedG4CodeSigningRSA4096SHA3842021CA1.crt.pem -CRLfile DigiCertTrustedG4CodeSigningRSA4096SHA3842021CA1.crl ibm-hyper-protect-container-runtime-1-0-s390x-23-intermediate.crt
    
  3. 完成以下步骤,验证证明文件的签名:

    1. 将公用签名密钥抽取到文件中。 在下面的示例中,文件名为 pubkey.pem

      openssl x509 -in ibm-hyper-protect-container-runtime-1-0-s390x-23-intermediate.crt -pubkey -noout >  pubkey.pem
      
    2. 从加密证书文档中抽取加密密钥签名。 以下命令返回特征符的偏移值:

      openssl asn1parse -in ibm-hyper-protect-container-runtime-1-0-s390x-23-encrypt.crt | tail -1 | cut -d : -f 1
      

      请考虑该命令的输出为 <offset_value>。 使用此 <offset_value> 将加密密钥签名解压缩到名为 signature 的文件中:

      openssl asn1parse -in ibm-hyper-protect-container-runtime-1-0-s390x-23-encrypt.crt -out signature -strparse <offset_value> -noout
      
    3. 将加密证书文档的主体解压缩到称为主体的文件中。

      openssl asn1parse -in ibm-hyper-protect-container-runtime-1-0-s390x-23-encrypt.crt -out body -strparse 4 -noout
      
    4. 使用签名和主体文件验证签名:

      openssl sha512 -verify pubkey.pem -signature signature body
      
  4. 验证证书颁发者。 比较以下两个命令的输出。 输出应该匹配。

    openssl x509 -in ibm-hyper-protect-container-runtime-1-0-s390x-23-encrypt.crt  -issuer -noout
    openssl x509 -in ibm-hyper-protect-container-runtime-1-0-s390x-23-intermediate.crt -subject -noout
    
  5. 通过检查以下命令的输出,验证加密证书文档是否仍然有效:

    openssl x509 -in ibm-hyper-protect-container-runtime-1-0-s390x-23-encrypt.crt -dates -noout
    

验证认证证书

在 Ubuntu 系统上完成以下步骤以验证认证证书:

  1. 使用以下命令验证 CA 证书:

    openssl verify -crl_download -crl_check DigiCertTrustedG4CodeSigningRSA4096SHA3842021CA1.crt.pem
    
  2. 使用以下命令验证签名密钥证书:

    openssl verify -crl_download -crl_check -untrusted DigiCertTrustedG4CodeSigningRSA4096SHA3842021CA1.crt.pem ibm-hyper-protect-container-runtime-1-0-s390x-23-intermediate.crt
    
  3. 完成以下步骤以验证加密证书文档的签名:

    1. 将公用签名密钥抽取到文件中。 在下面的示例中,文件名为 pubkey.pem

      openssl x509 -in ibm-hyper-protect-container-runtime-1-0-s390x-23-intermediate.crt -pubkey -noout >  pubkey.pem
      
    2. 从认证证书文档中抽取认证密钥签名。 以下命令返回特征符的偏移值:

      openssl asn1parse -in ibm-hyper-protect-container-runtime-1-0-s390x-23-attestation.crt | tail -1 | cut -d : -f 1
      

      请考虑该命令的输出为 <offset_value>。 使用此 <offset_value> 将认证密钥签名抽取到名为 signature 的文件中:

      openssl asn1parse -in ibm-hyper-protect-container-runtime-1-0-s390x-23-attestation.crt -out signature -strparse <offset_value> -noout
      
    3. 将认证证书文档的主体抽取到名为 body 的文件中。

      openssl asn1parse -in ibm-hyper-protect-container-runtime-1-0-s390x-23-attestation.crt -out body -strparse 4 -noout
      
    4. 使用签名和主体文件验证签名:

      openssl sha512 -verify pubkey.pem -signature signature body
      
  4. 验证证书颁发者。 比较以下两个命令的输出。 输出应该匹配。

    openssl x509 -in ibm-hyper-protect-container-runtime-1-0-s390x-23-attestation.crt -issuer -noout
    openssl x509 -in ibm-hyper-protect-container-runtime-1-0-s390x-23-intermediate.crt -subject -noout
    
  5. 通过检查以下命令的输出,验证认证证书文档是否仍然有效:

    openssl x509 -in ibm-hyper-protect-container-runtime-1-0-s390x-23-attestation.crt -dates -noout
    

证书撤销列表

这些证书包含 证书撤销列表 (CRL) 分发点。 您可以使用 CRL 来验证证书是否有效 (未撤销)。

  1. 从认证或加密证书中提取并下载 CRLURL:

    openssl x509 -in "ibm-hyper-protect-container-runtime-1-0-s390x-23-encrypt.crt" -noout -ext crlDistributionPoints
    crl_url= https://ibm.biz/hyper-protect-container-runtime-0b8907-crl-1 # (example)
    curl --location --silent "$crl_url" --output "ibm-hyper-protect-container-runtime.crl"
    
  2. 验证 CRL 是否有效 (请检查有效日期和签发者):

    openssl crl -text -noout -in "ibm-hyper-protect-container-runtime.crl"
    
  3. 验证 CRL 签名:

    openssl x509 -in "ibm-hyper-protect-container-runtime-1-0-s390x-23-intermediate.crt" -pubkey -noout -out pubkey
    bbegin="$(openssl asn1parse -in "ibm-hyper-protect-container-runtime.crl" | head -2 | tail -1 | cut -d : -f 1)"
    bend="$(openssl asn1parse -in "ibm-hyper-protect-container-runtime.crl" | tail -1 | cut -d : -f 1)"
    openssl asn1parse -in "ibm-hyper-protect-container-runtime.crl" -out signature -strparse $bend -noout
    openssl asn1parse -in "ibm-hyper-protect-container-runtime.crl" -out body -strparse $bbegin -noout
    openssl sha512 -verify pubkey -signature signature body
    
  4. 验证加密证书文件是否有效:

    1. 从加密证书中抽取序列:

      openssl x509 -in ibm-hyper-protect-container-runtime-1-0-s390x-23-encrypt.crt -noout -serial
      serial=F0E13E14FABECF4BA192C1FE9FE48891 # (example)
      
    2. 通过运行以下命令导出 "serial" 的值:

      export serial=F0E13E14FABECF4BA192C1FE9FE48891 # (example)
      

      您可以通过运行以下命令来验证该值是否已设置:

      echo $serial
      
    3. 验证该证书是否未在 CRL 中列出:

      openssl crl -text -noout -in "ibm-hyper-protect-container-runtime.crl" | grep -q "$serial" && echo REVOKED || echo OK
      

    已撤销的加密证书文档不得用于进一步加密。

  5. 验证证明文件是否有效:

    1. 从认证证书中抽取序列:

      openssl x509 -in ibm-hyper-protect-container-runtime-1-0-s390x-23-attestation.crt -noout -serial
      serial=D81F1467D9C543F6688960B8C6BDB578  # (example)
      
    2. 通过运行以下命令导出 "serial" 的值:

      export serial=D81F1467D9C543F6688960B8C6BDB578  # (example)
      

      您可以通过运行以下命令来验证该值是否已设置:

      echo $serial
      
    3. 验证该证书是否未在 CRL 中列出:

      openssl crl -text -noout -in "ibm-hyper-protect-container-runtime.crl" | grep -q "$serial" && echo REVOKED || echo OK
      

    不得启动具有已撤销认证证书文档的映像。