amazon-web-services - 调用 ImportCertificate 操作时发生错误(ValidationException):不支持私钥
问题描述
我正在使用 AWS CLI 将证书导入到 region us-east-1
,如下所示:
aws acm import-certificate --certificate cert.crt --private-key private.key --certificate-chain chain.crt --profile prof --region us-east-1
这在过去对其他证书有效,但是我最近开始看到以下错误:
An error occurred (ValidationException) when calling the ImportCertificate operation: The private key is not supported.
我已经通过openssl检查了私钥确实与证书匹配,所以我对这里可能出现的问题非常迷茫。
openssl rsa -in private.key -check
产量
RSA key ok
可能是什么问题?
解决方案
我也遇到了这个问题,并在其他地方发现了一个提示,建议在你的文件前加上“file://”。为我工作。试试看:
aws acm import-certificate --certificate file://cert.crt --private-key file://private.key --certificate-chain file://chain.crt --profile prof --region us-east-1
推荐阅读
- typescript - 打字稿通用参数未正确解析
- android - 从解析服务器检索数组并在列表视图中显示数据
- sql - Oracle中的半转置表
- python - 在 AWS Lambda 中使用 boto3 扫描后修改项目属性
- javascript - 如何在 TypeScript 中映射多种类型的数组?
- javascript - 有没有办法将一种 Blob 图像类型转换为 Javascript 中的一种文件类型?
- mysql - 查询在单独运行时返回结果,当我将其添加到更大的查询时返回不明确的引用
- python - 如何将url添加到html文件中
- javascript - 如何在打开 Android 应用程序的网页(不是 webview)上调用 JavaScript 函数?
- python - 如何将从多个 .vtp 文件中提取的点插入到单个多数据中