Warning: file_get_contents(/data/phpspider/zhask/data//catemap/1/amazon-web-services/14.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Amazon web services 如何为Amazon ELB SSL使用*.pfx证书_Amazon Web Services_Openssl_Ssl Certificate_Amazon Elb_Pfx - Fatal编程技术网

Amazon web services 如何为Amazon ELB SSL使用*.pfx证书

Amazon web services 如何为Amazon ELB SSL使用*.pfx证书,amazon-web-services,openssl,ssl-certificate,amazon-elb,pfx,Amazon Web Services,Openssl,Ssl Certificate,Amazon Elb,Pfx,我有cert.pfx文件,我需要安装以便在Amazon弹性负载平衡器中使用。 我怎么做 不使用密码提取私钥。第一个命令将请求pfx密码并提示输入key.pem的密码必须提供密钥.pem的密码。第二个命令要求为第一个命令提供key.pem密码 openssl pkcs12-in cert.pfx-nocerts-out key.pem openssl rsa-in key.pem-out server.key 摘录证书: openssl pkcs12-in cert.pfx-clcerts-no

我有cert.pfx文件,我需要安装以便在Amazon弹性负载平衡器中使用。 我怎么做

  • 不使用密码提取私钥。第一个命令将请求
    pfx
    密码并提示输入
    key.pem的密码必须提供
    密钥.pem
    的密码
    。第二个命令要求为第一个命令提供
    key.pem
    密码
  • openssl pkcs12-in cert.pfx-nocerts-out key.pem
    openssl rsa-in key.pem-out server.key
    

  • 摘录证书:
  • openssl pkcs12-in cert.pfx-clcerts-nokeys-out cert.pem
    

  • 提取证书链:
  • openssl pkcs12-in cert.pfx-nodes-nokeys-out chain.pem
    

  • 证书链包含若干项。您可能需要删除引用您的证书的项目,它位于顶部,不需要。尝试删除/不删除顶部项目。 之后,其他项目应按相反顺序放置

  • server.key是ELB中的私钥,cert.pem是ELB中的证书,output#4是证书链


  • 祝你好运

    您可以使用OpenSSL套件轻松地转换证书的格式

    这个过程非常简单,这里有一个很好的指南:

    关于不同的步骤(从我上面报告的链接中):

    现在,如果您有linux发行版,那么直接安装openSSL(在基于rpm的发行版上安装yum-install-openSSL)

    如果您没有安装linux发行版,那么最快的方法就是使用实时发行版(我个人喜欢fedora)


    我希望这有帮助

    首先转到证书管理器并导入您的证书[cert,key,chain],然后使用现有证书创建AWS LB

    这听起来像是一个你最喜欢的搜索引擎(或aws文档/客户支持)会回答的问题@m02ph3u5,因为这是一个QA风格的问题,我花了两天多的时间得到了一个清晰有效的答案,如下所示。一个男人为了得到更多的业力会做什么?甚至根本没有读过这个问题,它是针对Amazon ELB SSL的。实际上我只是想帮你。没有看到之前的回复是你的。我的建议是结束并接受你的回答,这样你的(不完整的问题)就不会再次出现在列表中。祝你有一个愉快的一天。如果是的话,我很乐意把我的答案标记为允许我这样做。事实上,我在发帖后48小时内都做不到,即使是问答式的。无论如何,谢谢。他没有证书、钥匙和锁链。他只有一个文件*.pfx。他主要抱怨(合法地)AWS不允许你像其他任何地方允许你那样导入pfx文件。确实要确保你为key.pem提供密码-如果你不提供密码,它不会抱怨,因此你最终会得到一个坏文件。有时证书不包含中间CA证书,在这种情况下,chain.pem是空的。AWS不接受这样的事情。我通过本文找到了一个解决方案:
    # Export the private key file from the pfx file
    openssl pkcs12 -in filename.pfx -nocerts -out key.pem
    
    # Export the certificate file from the pfx file
    openssl pkcs12 -in filename.pfx -clcerts -nokeys -out cert.pem
    
    # This removes the passphrase from the private key so Apache won't
    # prompt you for your passphase when it starts
    openssl rsa -in key.pem -out server.key