# openssl req -new -sha256 -key server.key -out server.csr Enter pass phrase for server.key: v6biM9MMByBO0SWFitcbnyF0VUsJLbZsizpP7K15
You are about to be asked to enter information that will be incorporated into your certificate request. What you are about to enter is what is called a Distinguished Name or a DN. There are quite a few fields but you can leave some blank For some fields there will be a default value, If you enter '.', the field will be left blank. ----- Country Name (2 letter code) [XX]:JP State or Province Name (full name) []:Tokyo Locality Name (eg, city) [Default City]:Setagaya-ku Organization Name (eg, company) [Default Company Ltd]:UmiyamaShouji inc. Organizational Unit Name (eg, section) []:Production Common Name (eg, your name or your server's hostname) []:ec2-xx-xx-xx-xx.ap-northeast-1.compute.amazonaws.com Email Address []: (空白のままEnter)
Please enter the following 'extra' attributes to be sent with your certificate request A challenge password []: (空白のままEnter) An optional company name []: (空白のままEnter)
確認
1 2 3 4 5 6
$ ls -al total 8 drwxr-xr-x. 2 root root 40 Aug 5 13:43 . drwxr-xr-x. 3 root root 17 Aug 5 13:32 .. -rw-r--r--. 1 root root 729 Aug 5 13:43 server.csr -rw-r--r--. 1 root root 963 Aug 5 13:37 server.key
RSA key作成
1 2
# openssl rsa -in server.key -out server.key Enter pass phrase for server.key: v6biM9MMByBO0SWFitcbnyF0VUsJLbZsizpP7K15