代码之家  ›  专栏  ›  技术社区  ›  csvan

调用importCertificate操作时出错(validationException):不支持私钥

  •  4
  • csvan  · 技术社区  · 6 年前

    我正在使用AWS CLI将证书导入区域 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
    

    问题可能是什么?

    1 回复  |  直到 6 年前
        1
  •  6
  •   BryanD    6 年前

    aws acm import-certificate --certificate file://cert.crt --private-key file://private.key --certificate-chain file://chain.crt --profile prof --region us-east-1