驗證憑證
適用於 VPC 的 IBM Cloud Hyper Protect Virtual Servers 已經廢棄。 截至 2026 年 2 月 28 日,您無法建立新的實體。 現有的實例將支援至 2027 年 2 月 20 日為止。 該日期仍然存在的任何實例都將被刪除。 您可以使用 IBM Confidential Computing Container Runtime(以前稱為 Hyper Protect Virtual Servers )或 IBM Confidential Computing Container Runtime for Red Hat Virtualization Solutions(以前稱為 Hyper Protect Container Runtime for Red Hat Virtualization Solutions) 來重新部署工作負載。 有關資料遷移的資訊,請參閱 遷移指南。 如需詳細資訊,請參閱 服務廢止公告。
您可以驗證您下載用於合約加密及認證的憑證。
下載憑證
下載下列憑證:
- 取得 DigiCert 憑證。 您可以在 這裡下載 DigiCert 授信主要 G4 憑證,也可以在 這裡下載 Digicert G4 中繼憑證。
- 取得 IBM 中繼憑證。 下表根據映像檔版本列出中繼憑證的到期日。
自 2025 年 3 月 25 日起,憑證連結會有所變更。
| 映像檔版本 | 憑證鏈結 | 到期日 |
|---|---|---|
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 系統上完成下列步驟,以驗證加密憑證:
-
使用下列指令來驗證 CA 憑證:
openssl verify -crl_download -crl_check DigiCertTrustedG4CodeSigningRSA4096SHA3842021CA1.crt.pem -
使用下列指令來驗證簽署金鑰憑證:
openssl verify -crl_download -crl_check -untrusted DigiCertTrustedG4CodeSigningRSA4096SHA3842021CA1.crt.pem ibm-hyper-protect-container-runtime-1-0-s390x-29-intermediate.crt如果
OpenSSL指令無法執行,請下載 CRL 並使用下列指令手動驗證憑證:openssl verify -untrusted DigiCertTrustedG4CodeSigningRSA4096SHA3842021CA1.crt.pem -CRLfile DigiCertTrustedG4CodeSigningRSA4096SHA3842021CA1.crl ibm-hyper-protect-container-runtime-1-0-s390x-29-intermediate.crt -
請完成以下步驟以驗證加密憑證文件的簽署:
- 將公開簽署金鑰解壓縮至檔案。 在以下範例中,檔案名為
pubkey.pem:
openssl x509 -in ibm-hyper-protect-container-runtime-1-0-s390x-29-intermediate.crt -pubkey -noout > pubkey.pem- 從加密憑證文件擷取加密金鑰簽章。 要下載加密憑證,請參閱 《 下載加密憑證並提取公鑰 》一文。 下列指令會傳回簽章的偏移值:
openssl asn1parse -in ibm-hyper-protect-container-runtime-1-0-s390x-29-encrypt.crt | tail -1 | cut -d : -f 1請考量指令的輸出是
<offset_value>。 使用此<offset_value>可將加密金鑰簽章擷取至稱為簽章的檔案:openssl asn1parse -in ibm-hyper-protect-container-runtime-1-0-s390x-29-encrypt.crt -out signature -strparse <offset_value> -noout- 將加密憑證文件的內文擷取至稱為 body 的檔案。
openssl asn1parse -in ibm-hyper-protect-container-runtime-1-0-s390x-29-encrypt.crt -out body -strparse 4 -noout- 使用簽章和內文檔來驗證簽章:
openssl sha512 -verify pubkey.pem -signature signature body - 將公開簽署金鑰解壓縮至檔案。 在以下範例中,檔案名為
-
驗證證書頒發者。 比較下列兩個指令的輸出。 輸出需要匹配。
openssl x509 -in ibm-hyper-protect-container-runtime-1-0-s390x-29-encrypt.crt -issuer -noout openssl x509 -in ibm-hyper-protect-container-runtime-1-0-s390x-29-intermediate.crt -subject -noout -
透過檢查下列指令的輸出,確認加密證書文件是否有效:
openssl x509 -in ibm-hyper-protect-container-runtime-1-0-s390x-29-encrypt.crt -dates -noout
驗證認證憑證
在 Ubuntu 系統上完成下列步驟,以驗證認證憑證:
-
使用下列指令來驗證 CA 憑證:
openssl verify -crl_download -crl_check DigiCertTrustedG4CodeSigningRSA4096SHA3842021CA1.crt.pem -
使用下列指令來驗證簽署金鑰憑證:
openssl verify -crl_download -crl_check -untrusted DigiCertTrustedG4CodeSigningRSA4096SHA3842021CA1.crt.pem ibm-hyper-protect-container-runtime-1-0-s390x-29-intermediate.crt如果
OpenSSL指令無法執行,請下載 CRL 並使用下列指令手動驗證憑證:openssl verify -untrusted DigiCertTrustedG4CodeSigningRSA4096SHA3842021CA1.crt.pem -CRLfile DigiCertTrustedG4CodeSigningRSA4096SHA3842021CA1.crl ibm-hyper-protect-container-runtime-1-0-s390x-29-intermediate.crt -
完成以下步驟來驗證認證證書文件的簽章:
- 將公開簽署金鑰解壓縮至檔案。 在以下範例中,檔案名為
pubkey.pem:
openssl x509 -in ibm-hyper-protect-container-runtime-1-0-s390x-29-intermediate.crt -pubkey -noout > pubkey.pem- 從認證憑證文件中擷取認證金鑰簽章。 欲下載認證證明書,請造訪 Attestation。 下列指令會傳回簽章的偏移值:
openssl asn1parse -in ibm-hyper-protect-container-runtime-1-0-s390x-29-attestation.crt | tail -1 | cut -d : -f 1請考量指令的輸出是
<offset_value>。 使用此<offset_value>,將認證金鑰簽章擷取至稱為簽章的檔案:openssl asn1parse -in ibm-hyper-protect-container-runtime-1-0-s390x-29-attestation.crt -out signature -strparse <offset_value> -noout- 將認證憑證文件的主體擷取至稱為主體的檔案。
openssl asn1parse -in ibm-hyper-protect-container-runtime-1-0-s390x-29-attestation.crt -out body -strparse 4 -noout- 使用簽章和內文檔來驗證簽章:
openssl sha512 -verify pubkey.pem -signature signature body - 將公開簽署金鑰解壓縮至檔案。 在以下範例中,檔案名為
-
驗證證書頒發者。 比較下列兩個指令的輸出。 輸出需要匹配。
openssl x509 -in ibm-hyper-protect-container-runtime-1-0-s390x-29-attestation.crt -issuer -noout openssl x509 -in ibm-hyper-protect-container-runtime-1-0-s390x-29-intermediate.crt -subject -noout -
透過檢查下列指令的輸出,驗證認證憑證文件是否仍然有效:
openssl x509 -in ibm-hyper-protect-container-runtime-1-0-s390x-29-attestation.crt -dates -noout
憑證撤銷清單
憑證包含 憑證撤銷清冊 (CRL) 配送點。 您可以使用 CRL 來驗證您的憑證是否有效 (未撤銷)。
-
從證明或加密證書中提取並下載 CRL URL:
openssl x509 -in "ibm-hyper-protect-container-runtime-1-0-s390x-29-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" -
驗證 CRL 是否有效 (檢查有效日期和發證者):
openssl crl -text -noout -in "ibm-hyper-protect-container-runtime.crl" -
驗證 CRL 簽章:
openssl x509 -in "ibm-hyper-protect-container-runtime-1-0-s390x-29-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 -
請確認加密憑證文件是否有效:
- 從加密憑證擷取序列:
openssl x509 -in ibm-hyper-protect-container-runtime-1-0-s390x-29-encrypt.crt -noout -serial請參閱以下輸出範例:
serial=C775927D9F86D27D369FAC42B05144AA- 執行下列指令,以匯出 'serial' 的值:
export serial=C775927D9F86D27D369FAC42B05144AA您可以執行下列指令來驗證是否已設定值:
echo $serial- 驗證憑證未列在 CRL 內:
openssl crl -text -noout -in "ibm-hyper-protect-container-runtime.crl" | grep -q "$serial" && echo REVOKED || echo OK已撤銷的加密憑證文件不得用於進一步加密。
-
請確認該證明書文件是否有效:
- 從認證憑證中擷取序列:
openssl x509 -in ibm-hyper-protect-container-runtime-1-0-s390x-29-attestation.crt -noout -serial請參閱以下輸出範例:
serial=B659E74BC091042416960F5AB9410D3F- 執行下列指令,以匯出 'serial' 的值:
export serial=B659E74BC091042416960F5AB9410D3F您可以執行下列指令來驗證是否已設定值:
echo $serial- 驗證憑證未列在 CRL 內:
openssl crl -text -noout -in "ibm-hyper-protect-container-runtime.crl" | grep -q "$serial" && echo REVOKED || echo OK不得啟動具有已撤銷認證憑證文件的映像檔。