gpt4 book ai didi

ssl - 将 SSL 证书上传到 Cloudfront 的 IAM

转载 作者:太空宇宙 更新时间:2023-11-03 13:09:05 25 4
gpt4 key购买 nike

存在大量 Cloudfront 问题,但对可能问题的谷歌搜索仍然让我感到惊讶。这是我的...

我目前正在尝试的是将 SSL 证书上传到 IAM,这样我就可以为 Cloudfront 使用自定义域名(例如 https://assets.mydomain.com)。然而,这并不是那么顺利。这些证书是从 DNSimple 购买的。 AWS cli 上传是这样的:

aws iam upload-server-certificate \
--server-certificate-name MyDomainProduction \
--path /cloudfront/ \
--certificate-body file://~/Downloads/STAR_mydomain_com/STAR_mydomain_com.crt \
--private-key file://~/Downloads/STAR_mydomain_com.key \
--certificate-chain file://~/Downloads/STAR_mydomain_com.pem

错误:

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

我想我已经尝试了 500 种不同的可能性,但我不知道为什么我无法让事情发挥作用。这是我在工具箱中得到的 DNSimple 和 Comodo 交还给我的东西:

  • STAR_mydomain_com.pem
  • STAR_mydomain_com.key
  • STAR_mydomain_com/AddTrustExternalCARoot.crt
  • STAR_mydomain_com/COMODORSADomainValidationSecureServerCA.crt
  • STAR_mydomain_com/COMODORSAAddTrustCA.crt
  • STAR_mydomain_com/STAR_mydomain_com.crt

要使 SSL 在 Cloudfront 上运行,crts、pem 和 key 的正确组合是什么?

最佳答案

你快完成了。错误是您使用了错误的中间证书文件。您应该使用仅包含链而不包含主证书的 bundle 。

换句话说,从 DNSimple 安装向导中,选择其他 并下载文件 (1)、(2) 和 (4)。您下载了 (3) 而不是 (4)。

主要区别在于 (3) 是 (4) + (1)。但是由于您已经使用 --certificate-body 参数显式传递 (1),Cloudfront 只需要没有主链的链。

enter image description here

关于ssl - 将 SSL 证书上传到 Cloudfront 的 IAM,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/32678557/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com