提供的证书不是有效的自签名证书。请在 aws 中提供有效的自签名证书或证书链

Provided certificate is not a valid self signed. Please provide either a valid self-signed certificate or certificate chain in aws

我有一个包含 those 4 files 的证书,我想将这个证书导入 aws,首先我使用这个命令转换了密钥

openssl rsa -in FILENAME.key -out FILENAME.key.rsa

然后我复制了 cer 文件的内容和 aws 的密钥,但它显示了这个错误

Provided certificate is not a valid self signed. Please provide either a valid self-signed certificate or certificate chain.

通过添加这个(p7b 文件)解决

-----BEGIN CERTIFICATE-----
[certificate chain data]
-----END CERTIFICATE----

然后

openssl pkcs7 -in cert.p7b -print_certs -out out.certs