验证证书
用于 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>将加密密钥签名解压缩到名为 signature 的文件中:openssl asn1parse -in ibm-hyper-protect-container-runtime-1-0-s390x-29-encrypt.crt -out signature -strparse <offset_value> -noout- 将加密证书文档的主体解压缩到称为主体的文件中。
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>将认证密钥签名抽取到名为 signature 的文件中:openssl asn1parse -in ibm-hyper-protect-container-runtime-1-0-s390x-29-attestation.crt -out signature -strparse <offset_value> -noout- 将认证证书文档的主体抽取到名为 body 的文件中。
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 来验证证书是否有效 (未撤销)。
-
从认证或加密证书中提取并下载 CRLURL:
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不得启动具有已撤销认证证书文档的映像。