简体   繁体   English

将通配符证书安装到AWS EC2负载均衡器上

[英]Install Wildcard Certificate onto AWS EC2 Load Balancer

I'm having trouble. 我遇到了麻烦。 I followed a guide that I found here 我按照我在这里找到的指南

http://www.thenetworkadministrator.net/index.php/2011/12/iis-ssl-certificate-into-amazon-elastic-load-balancer/ http://www.thenetworkadministrator.net/index.php/2011/12/iis-ssl-certificate-into-amazon-elastic-load-balancer/

And exported by cert and created all those files, but it doesn't tell you which file goes in which field. 并通过cert导出并创建了所有这些文件,但它并没有告诉您哪个文件在哪个字段中。 I tried what I think is all the combinations but it doesn't accept it 我尝试了我认为的所有组合,但它不接受它

I Setup the balancer as follows 我按如下方式设置平衡器

在此输入图像描述

Then I try to setup the certificate 然后我尝试设置证书

在此输入图像描述

Then you can see it tells me it's invalid. 然后你可以看到它告诉我它无效。

In case it helps I exported from IIS and followed the tutorial on the link provided and the certificate is a DigiCert Wildcard Certificate ie (*.domain.com) 如果它帮助我从IIS导出并按照提供的链接上的教程,证书是DigiCert通配符证书,即(* .domain.com)

Please read the post: AWS Load Balancer SSL limitations . 请阅读帖子: AWS Load Balancer SSL限制 The following solution worked for me: 以下解决方案适合我:

openssl rsa -in server.key -text

Then copy and paste the produced output between (including): 然后在(包括)之间复制并粘贴生成的输出:

-----BEGIN RSA PRIVATE KEY-----

and

-----END RSA PRIVATE KEY-----

AWS Load Balancer had accepted this key successfully. AWS Load Balancer已成功接受此密钥。

Hmmh, everything looks correct at first sight, but let's double check on a few details. 嗯,一切看起来都是正确的,但让我们仔细检查几个细节。

And exported by cert and created all those files, but it doesn't tell you which file goes in which field. 并通过cert导出并创建了所有这些文件,但它并没有告诉您哪个文件在哪个字段中。

I can't quite follow, insofar the linked guide clearly states where to put he files: 我不能完全遵循,因为链接指南明确说明了将文件放在何处:

When prompted for the certificate keys do the following: 提示输入证书密钥时,请执行以下操作:

  • Open the file server.key that was created from above with openssl and paste into the Private Key textbox 使用openssl打开从上面创建的文件server.key,然后粘贴到私钥文本框中
  • Open the file cert.pem that was created from above with openssl and copy the text from —-BEGIN till the end of the file and paste that into Public Key Certificate textbox 使用openssl打开从上面创建的文件cert.pem,并将文本从--BEGIN复制到文件末尾并将其粘贴到公钥证书文本框中

Note: I did not put anything into the certificate chain 注意:我没有在证书链中添加任何内容

The screenshot you provided indicates you have chosen the correct combination in fact, however ... 您提供的屏幕截图表明您实际上选择了正确的组合,但是......

I tried what I think is all the combinations but it doesn't accept it 我尝试了我认为的所有组合,但它不接受它

... I assume you have deliberately shortened the textarea input widgets for Private Key and Public Key Certificate to decrease image size or hide the actual keys? ...我假设您故意缩短了私钥公钥证书的textarea输入小部件以减小图像大小或隐藏实际的密钥? Otherwise the text to be pasted has mostly gone lost somehow, insofar it should look something like: 否则,要粘贴的文本大部分都会以某种方式丢失,只要看起来应该是这样的:

-----BEGIN CERTIFICATE-----
MIICeDCCAeGgAwIBAgIGAOABb24uY29tMQwwCgb3DQEBBQUAMFMxCzAJBgNVBAYT
[...]
A WHOLE LOT MORE HEX DIGITS HERE!
[...]
q04lCMxITAfBgNVBAMTAAJW26+adw9C063H7I846ZbxHl6BkcTPsjL3b5JoZhyim
jbzH4dktTFNIkX4o
-----END CERTIFICATE-----

In this regard another cause might be addressed by this answer to Public key and private cert don't match : 在这方面, 公钥和私有证书的答案可能无法解决另一个原因:

Looks like the issue was the way in which I was copying the contents of the key and certs into the AWS Management console. 看起来问题是我将密钥和证书的内容复制到AWS管理控制台的方式。 I was using an Ubuntu desktop running in Virtual Box [...] Once I opened the key and cert files on the same box as the web browser (Windows in this case) the certs went through just fine. 我正在使用在Virtual Box中运行的Ubuntu桌面[...]一旦我在与Web浏览器(在本例中为Windows)相同的盒子上打开密钥和证书文件,证书就完成了。 I'm guessing some parts of the file aren't making it over correctly when using the shared clip board between Virtual Box client and host. 我猜测在Virtual Box客户端和主机之间使用共享剪辑板时,文件的某些部分没有正确完成。

Given the high probability of special characters appearing in the hex dump, this is entirely possible for various similar copy&paste scenarios as well, eg between SSH terminals with erroneous character encoding settings etc. 鉴于特殊字符出现在十六进制转储中的可能性很高,这对于各种类似的复制和粘贴方案也是完全可能的,例如在具有错误字符编码设置的SSH终端之间。

Simplest/most concise explanation that I have come across for creating a self-signed cert for AWS ELBs is... 我为AWS ELB创建自签名证书时遇到的最简单/最简洁的解释是......

openssl genrsa -out server_privatekey.pem 1024
openssl req -new -key server_privatekey.pem -out server_certificate_csr.pem
openssl x509 -req -days 3650 -in server_certificate_csr.pem -signkey server_privatekey.pem -out server_certificate.pem

And then in AWS; 然后在AWS中;

Certificate Name: mycert 证书名称:mycert

Private key: [content of server_privatekey.pem] 私钥:[server_privatekey.pem的内容]

Public key: [content of server_certificate.pem] 公钥:[server_certificate.pem的内容]

Certificate Chain: [content of server_certificate_csr.pem] 证书链:[server_certificate_csr.pem的内容]

Credit: https://forums.aws.amazon.com/message.jspa?messageID=381093 图片来源: https//forums.aws.amazon.com/message.jspa?messageID = 381093

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 带有弹性负载均衡器的 AWS EC2 不发送 SSL 证书 - AWS EC2 with Elastic Load balancer not sending SSL Certificate EC2 AWS中的负载均衡器 - Load balancer in EC2 AWS AWS EC2上的wordpress(2个实例和一个负载均衡器) - wordpress on AWS EC2 ( 2 instances and a load balancer) AWS - 使用 SSL 证书配置到端口 443 的 EC2 负载均衡器上的连接超时 - AWS - Connection timing out on an EC2 Load balancer configured to port 443 with an SSL certificate 使用负载均衡器的 ec2 实例上的 SSL 证书 - SSL certificate on ec2 instance using load balancer 带有负载均衡器和证书管理器的 EC2 实例上的 WSS 套接字 - WSS Socket on EC2 instance with Load Balancer and Certificate Manager AWS EC2: HTTPS 访问错误 – 浏览器看不到用于在 Elastic Load Balancer 中配置 SSL 的证书 - AWS EC2: HTTPS access error – browsers don’t see the certificate used for configuring SSL in Elastic Load Balancer AWS EC2负载均衡器-具体实例仅仅是“不可用”吗? - AWS EC2 Load Balancer - Specific is instance simply “not available”? Web部署到AWS Elastic Load Balancer后面的EC2实例 - Web Deploy to EC2 instances behind AWS Elastic Load Balancer ec2之间的AWS Load Balancer安全组 - AWS Load Balancer security group between ec2
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM