通信している他のサーバに鍵と証明書がない場合には、作成する必要があります。次の手順は、
linux.course.testという名前のホストに対して鍵と証明書を生成する方法について説明しています。
# openssl genrsa -out /tmp/linux_key.pem 1024
Generating RSA private key, 1024 bit long modulus
.....................................++++++
................++++++
e is 65537 (0x10001)
# openssl req -new -key /tmp/linux_key.pem -out /tmp/linux_req.pem
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) [GB]:DE
State or Province Name (full name) [Berkshire]:Bavaria
Locality Name (eg, city) [Newbury]:Munich
Organization Name (eg, company) [My Company Ltd]:Trend Micro
Organizational Unit Name (eg, section) []:Global Training
Common Name (eg, your name or your server's host name) []:linux.course.test
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>
この手順を完了すると、/tmp/linux_key.pemファイルに、PEM形式のlinux.course.test秘密鍵が追加されます。/tmp/linux_req.pemファイルには、PEM形式の未署名証明書 (認証要求) が追加されます。