SSL証明書作成のメモ
とりあえず以下のコマンドで作成すれば2016年以降も使える。
### 秘密鍵作成 $ openssl genrsa 2048 -sha256 > server1.key
### 確認する $ openssl rsa -text -noout -in server.key
### 公開鍵作成 $ openssl req -new -sha256 -subj "/C=JP/ST=Tokyo/L=Shinjuku/O=CompanyName/OU=Department/CN=example.com/emailAddress=info@example.com" -out example-com.csr -newkey rsa:2048 -nodes -keyout server.key
### 公開鍵の確認 $ openssl req -text < example-com.csr
## 秘密鍵と公開鍵の比較し差分が無いことを確認する $ diff <(openssl rsa -in server.key -noout -modulus) <(openssl req -in example-com.csr -noout -modulus)