驗證憑證

適用於 VPC 的 IBM Cloud Hyper Protect Virtual Servers 已經廢棄。 截至 2026 年 2 月 28 日,您無法建立新的實體。 現有的實例將支援至 2027 年 2 月 20 日為止。 該日期仍然存在的任何實例都將被刪除。 您可以透過使用 IBM 機密運算容器執行環境(前身為 Hyper Protect Virtual Servers ) 或 IBM Confidential Computing Container Runtime for Red Hat Virtualization Solutions (前身為 Red Hat 虛擬化解決方案的 Hyper Protect 容器執行環境) 來重新部署您的工作負載。 有關資料遷移的資訊,請參閱 遷移指南。 如需詳細資訊,請參閱 服務廢止公告。

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

下載憑證

下載下列憑證:

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

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

中級憑證有效期限
圖片版本 憑證連結 有效期限
ibm-hyper-protect-container-runtime-1-0-s390x-30 證書 2027年8月3日
ibm-hyper-protect-container-runtime-1-0-s390x-29 證書 2027年8月3日
ibm-hyper-protect-container-runtime-1-0-s390x-28 證書 2027年8月3日
ibm-hyper-protect-container-runtime-1-0-s390x-26 證書 2027年8月3日
ibm-hyper-protect-container-runtime-1-0-s390x-25 證書 2027年8月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-30-intermediate.crt
    

    如果 OpenSSL 指令無法執行,請下載 CRL 並使用下列指令手動驗證憑證:

    openssl verify -untrusted DigiCertTrustedG4CodeSigningRSA4096SHA3842021CA1.crt.pem -CRLfile DigiCertTrustedG4CodeSigningRSA4096SHA3842021CA1.crl ibm-hyper-protect-container-runtime-1-0-s390x-30-intermediate.crt
    
  3. 請完成以下步驟以驗證加密憑證文件的簽署:

    1. 將公開簽署金鑰解壓縮至檔案。 在以下範例中,檔案名為 pubkey.pem:
       openssl x509 -in ibm-hyper-protect-container-runtime-1-0-s390x-30-intermediate.crt -pubkey -noout >  pubkey.pem
    
    1. 從加密憑證文件擷取加密金鑰簽章。 要下載加密憑證,請參閱 《 下載加密憑證並提取公鑰 》一文。 下列指令會傳回簽章的偏移值:
       openssl asn1parse -in ibm-hyper-protect-container-runtime-1-0-s390x-30-encrypt.crt | tail -1 | cut -d : -f 1
    

    請考量指令的輸出是 <offset_value>。 使用此 <offset_value> 可將加密金鑰簽章擷取至稱為簽章的檔案:

    openssl asn1parse -in ibm-hyper-protect-container-runtime-1-0-s390x-30-encrypt.crt -out signature -strparse <offset_value> -noout
    
    1. 將加密憑證文件的內文擷取至稱為 body 的檔案。
       openssl asn1parse -in ibm-hyper-protect-container-runtime-1-0-s390x-30-encrypt.crt -out body -strparse 4 -noout
    
    1. 使用簽章和內文檔來驗證簽章:
       openssl sha512 -verify pubkey.pem -signature signature body
    
  4. 驗證證書頒發者。 比較下列兩個指令的輸出。 輸出需要匹配。

    openssl x509 -in ibm-hyper-protect-container-runtime-1-0-s390x-30-encrypt.crt  -issuer -noout
    openssl x509 -in ibm-hyper-protect-container-runtime-1-0-s390x-30-intermediate.crt -subject -noout
    
  5. 透過檢查下列指令的輸出,確認加密證書文件是否有效:

    openssl x509 -in ibm-hyper-protect-container-runtime-1-0-s390x-30-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-30-intermediate.crt
    

    如果 OpenSSL 指令無法執行,請下載 CRL 並使用下列指令手動驗證憑證:

    openssl verify -untrusted DigiCertTrustedG4CodeSigningRSA4096SHA3842021CA1.crt.pem -CRLfile DigiCertTrustedG4CodeSigningRSA4096SHA3842021CA1.crl ibm-hyper-protect-container-runtime-1-0-s390x-30-intermediate.crt
    
  3. 完成以下步驟來驗證認證證書文件的簽章:

    1. 將公開簽署金鑰解壓縮至檔案。 在以下範例中,檔案名為 pubkey.pem:
       openssl x509 -in ibm-hyper-protect-container-runtime-1-0-s390x-30-intermediate.crt -pubkey -noout >  pubkey.pem
    
    1. 從認證憑證文件中擷取認證金鑰簽章。 欲下載認證證明書,請造訪 Attestation。 下列指令會傳回簽章的偏移值:
       openssl asn1parse -in ibm-hyper-protect-container-runtime-1-0-s390x-30-attestation.crt | tail -1 | cut -d : -f 1
    

    請考量指令的輸出是 <offset_value>。 使用此 <offset_value>,將認證金鑰簽章擷取至稱為簽章的檔案:

    openssl asn1parse -in ibm-hyper-protect-container-runtime-1-0-s390x-30-attestation.crt -out signature -strparse <offset_value> -noout
    
    1. 將認證憑證文件的主體擷取至稱為主體的檔案。
       openssl asn1parse -in ibm-hyper-protect-container-runtime-1-0-s390x-30-attestation.crt -out body -strparse 4 -noout
    
    1. 使用簽章和內文檔來驗證簽章:
       openssl sha512 -verify pubkey.pem -signature signature body
    
  4. 驗證證書頒發者。 比較下列兩個指令的輸出。 輸出需要匹配。

    openssl x509 -in ibm-hyper-protect-container-runtime-1-0-s390x-30-attestation.crt -issuer -noout
    openssl x509 -in ibm-hyper-protect-container-runtime-1-0-s390x-30-intermediate.crt -subject -noout
    
  5. 透過檢查下列指令的輸出,驗證認證憑證文件是否仍然有效:

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

憑證撤銷清單

憑證包含 憑證撤銷清冊 (CRL) 配送點。 您可以使用 CRL 來驗證您的憑證是否有效 (未撤銷)。

  1. 從證明或加密證書中提取並下載 CRL URL:

    openssl x509 -in "ibm-hyper-protect-container-runtime-1-0-s390x-30-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-30-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-30-encrypt.crt -noout -serial
    

    請參閱以下輸出範例:

    serial=C775927D9F86D27D369FAC42B05144AA
    
    1. 執行下列指令,以匯出 'serial' 的值:
       export serial=C775927D9F86D27D369FAC42B05144AA
    

    您可以執行下列指令來驗證是否已設定值:

    echo $serial
    
    1. 驗證憑證未列在 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-30-attestation.crt -noout -serial
    

    請參閱以下輸出範例:

    serial=1E092517DAFBDAD0BFF3D0EAFEC38D00
    
    1. 執行下列指令,以匯出 'serial' 的值:
       export serial=1E092517DAFBDAD0BFF3D0EAFEC38D00
    

    您可以執行下列指令來驗證是否已設定值:

    echo $serial
    
    1. 驗證憑證未列在 CRL 內:
       openssl crl -text -noout -in "ibm-hyper-protect-container-runtime.crl" | grep -q "$serial" && echo REVOKED || echo OK
    

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