【问题标题】:Uploading certificate with command line使用命令行上传证书
【发布时间】:2016-02-07 16:00:38
【问题描述】:

我正在尝试使用 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

我不知道是什么问题。而且,我有两个 pem:

naosalvo1-ca.pemnaosalvo2-ca.pem

我不应该同时上传吗?怎么样?

【问题讨论】:

    标签: amazon-web-services ssl amazon-s3 certificate


    【解决方案1】:

    您需要确定链证书的顺序,并将它们合并到一个文件中。您收到的错误是由于没有所有链证书。

    【讨论】:

    • 我已经知道@datasage 的顺序,所以我只需要在第一个中复制并过去第二个?
    • 是的,这就是你需要做的所有事情。
    • 同样的错误@datasage,我有这个--BEGIN CERTIFICATE--和--END CERTIFICATE-。我在中间连接两者。
    • 您可以将其连接起来,以便有多个开始和结束证书行。
    猜你喜欢
    • 1970-01-01
    • 2015-05-15
    • 2012-08-13
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2020-11-17
    • 2013-10-04
    • 2020-07-03
    相关资源
    最近更新 更多