我尝试使用aws命令行工具上传证书。这就是我的尝试方式:
aws iam upload-server-certificate \
--server-certificate-name naosalvo.com \
--certificate-body file://naosalvo.crt \
--private-key file://naosalvo.key \
--certificate-chain file://naosalvo1-ca.pem \
--path /cloudfront/
我收到此错误:
A client error (MalformedCertificate) occurred when calling the UploadServerCertificate operation: Unable to validate certificate chain. The certificate chain must start with the immediate signing certificate, followed by any intermediaries in order. The index within the chain of the invalid certificate is: -1
我无法弄清楚问题是什么。而且,我有两个pems:
naosalvo1-ca.pem
和naosalvo2-ca.pem
我不能上传两者吗?怎么样?
答案 0 :(得分:1)
您需要确定链证书所处的顺序,并将它们合并到一个文件中。您收到的错误是由于没有所有的链证书。