7
4

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 5 years have passed since last update.

AWSのELB向けに、SSL証明書を簡単に作成する方法

7
Last updated at Posted at 2017-02-05

以下、3つのコマンドを実行するだけ

1. 秘密鍵を作成(Private Key)

$ openssl genrsa -out server.key 2048
※ポイント
上記の通り、ELB向けには、秘密鍵にはパスフレーズを設定しないこと。でないとエラーとなる。

2. 証明書署名要求を作成 (CSR: Certificate Signing Request)

$ openssl req -new -key server.key -out server.csr

3. サーバ証明書を作成(CRT)

$ openssl x509 -in server.csr -days 365000 -req -signkey server.key > server.crt

※ポイント

  • 「プライベートキー」は「-----BEGIN RSA PRIVATE KEY-----」で始まり、「-----END RSA PRIVATE KEY-----」で終わる
  • 「パブリックキー証明書」「証明書チェーン」は「-----BEGIN CERTIFICATE-----」で始まり、「-----END CERTIFICATE-----」で終わる
  • 上記の文字列も入力しなければならないこと、無駄な改行などは入れないこと

参考:
オレオレ証明書をopensslで作る(詳細版)
http://d.hatena.ne.jp/ozuma/20130511/1368284304

【初心者向け】ELBにSSL証明書をインストールする
http://dev.classmethod.jp/cloud/aws/aws-beginner-elb-ssl/

7
4
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
7
4

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?