簡體   English   中英

適用於AWS Load Balancer的SSL證書

[英]SSL Certificate For AWS Load Balancer

首先按照AWS文檔上的說明進行操作: http : //docs.aws.amazon.com/ElasticLoadBalancing/latest/DeveloperGuide/ssl-server-cert.html#generate-key-submit-csr

openssl genrsa -out mykey-private-key-file.pem 2048 openssl ecparam -name prime256v1 -out mykey-private-key-file.pem -genkey openssl req -sha512 -new -key mykey-private-key-file.pem -out mykey-csr.pem

但是,當我們嘗試提交自己的CSR時, 它抱怨了,因此我遵循了Rapidssl上的指示

https://knowledge.rapidssl.com/support/ssl-certificate-support/index?page=content&actp=CROSSLINK&id=SO13985

openssl genrsa -des3 -out mykey-private-key-file.pem 2048 openssl req -new -key mykey-private-key-file.pem -out mykey-csr.pem openssl req -new -key mykey-private-key-file.pem -out mykey-csr.pem

我們收到了x.509 Web服務器證書和中間CA的批准回復。

當我將mykey-private-key-file.pem復制到EC2管理控制台上的“私鑰”字段中時,它抱怨:

“創建證書時出錯,無法解析密鑰;主體已加密。”

我真的不知道我在做什么。 我嘗試按照他們的建議在這里轉換私鑰: https//www.geekpete.com/blog/converting-ssl-pem-format-aws/,但隨后不匹配。 這是否意味着我必須重新經歷整個過程?

由於花了我一段時間才弄清楚這一點,因此我認為我將在這里發布流程(希望它可以節省一些時間)。

此過程假定您已經知道如何向您喜歡的證書頒發者請求證書。

您可以在“ yourDomain”上進行查找和替換,然后在bash提示符下運行命令。 OSX或幾乎任何風格的Linux都可以正常運行。

# to generate a certificate request
openssl req -new -newkey rsa:2048 -nodes -keyout yourDomain.key -out yourDomain.csr

# Sumbit the CSR. When the CRT file comes back...
# Open the cert in a text editor...
# create a new file
vi yourDomain.crt

# press 'i' to start insert mode
# paste the contents of the CRT file you received
# prese ESC, then 'wq', then enter. This saves the file and exits VIM

# convert the CRT you just wrote to disk into the PEM format expected by ELB
openssl x509 -in yourDomain.crt -out yourDomain.pem -outform PEM

# convert the private key to PEM format expected by ELB
openssl rsa -in yourDomain.key -outform PEM -out yourDomain.pem.key

# display the contents of the private key file and certificate file so you can paste them into the dialog when setting up the listener on the ELB
cat yourDomain.pem.key
cat yourDomain.pem

實際上是因為我的電子郵件中有復制和粘貼。 即使我先將其復制到文本編輯器中。 完全la腳的錯誤消息。

但是我確實必須從geekpete鏈接運行此步驟。

openssl rsa -in yourwebsite_private.key -out pem-yourwebsite_private.key

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM