IBM Cloud Docs
驗證憑證

驗證憑證

您可以驗證您下載用於合約加密及認證的憑證。

下載憑證

下載下列憑證:

  • 取得 DigiCert 憑證。 您可以在 這裡下載 DigiCert 授信主要 G4 憑證,也可以在 這裡下載 Digicert G4 中繼憑證。
  • 取得 IBM 中繼憑證。 下表根據映像檔版本列出中繼憑證的到期日。

自 2025 年 3 月 25 日起,憑證連結會有所變更。

中級憑證有效期限
映像檔版本 憑證鏈結 到期日
ibm-hyper-protect-container-runtime-1-0-s390x-23 憑證 2026 年 9 月 1 日
ibm-hyper-protect-container-runtime-1-0-s390x-22 憑證 2026 年 9 月 1 日
ibm-hyper-protect-container-runtime-1-0-s390x-21 憑證 2026 年 9 月 1 日
ibm-hyper-protect-container-runtime-1-0-s390x-20 憑證 2026 年 9 月 1 日
ibm-hyper-protect-container-runtime-1-0-s390x-19 憑證 2026 年 9 月 1 日
ibm-hyper-protect-container-runtime-1-0-s390x-18 憑證 2026 年 6 月 3 日
ibm-hyper-protect-container-runtime-1-0-s390x-17 憑證 2026 年 6 月 3 日
  • 請確保使用對應於 Hyper Protect 儲存器執行時期映像檔的憑證,以進行合約加密及認證。

驗證合約加密憑證

在 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> 可將加密金鑰簽章擷取至稱為簽章的檔案:

      openssl asn1parse -in ibm-hyper-protect-container-runtime-1-0-s390x-23-encrypt.crt -out signature -strparse <offset_value> -noout
      
    3. 將加密憑證文件的內文擷取至稱為 body 的檔案。

      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. 透過檢查下列指令的輸出,驗證加密憑證文件是否仍然有效:
    
    ```sh {: pre}
    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>,將認證金鑰簽章擷取至稱為簽章的檔案:

      openssl asn1parse -in ibm-hyper-protect-container-runtime-1-0-s390x-23-attestation.crt -out signature -strparse <offset_value> -noout
      
    3. 將認證憑證文件的主體擷取至稱為主體的檔案。

      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. 從證明或加密證書中提取並下載 CRL URL:

    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
      

    不得啟動具有已撤銷認證憑證文件的映像檔。