Debian 8 Jessie
Sponsored Link

SSL証明書を作成する2015/05/10

  SSLを用いた信頼性の高い通信経路を構築するために必要な証明書を作成します。
ここでは証明書は独自のものを作成します。
ただし、企業等で外向けに使う場合はベリサイン等の正規の認証局が発行する証明書を利用した方がよいでしょう。
root@dlp:~#
cd /etc/ssl/private

root@dlp:/etc/ssl/private#
openssl genrsa -aes128 -out server.key 2048

Generating RSA private key, 2048 bit long modulus
...................+++
.....+++
e is 65537 (0x10001)
Enter pass phrase for server.key:    
# パスフレーズ設定

Verifying - Enter pass phrase for server.key:    
# 確認再入力
# 秘密鍵からパスフレーズを削除

root@dlp:/etc/ssl/private#
openssl rsa -in server.key -out server.key

Enter pass phrase for server.key:    
# パスフレーズ

writing RSA key
root@www:/etc/ssl/private#
openssl req -new -days 3650 -key server.key -out server.csr

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) [AU]:
JP
   
# 国

State or Province Name (full name) [Some-State]:
Hiroshima
   
# 地域(県)

Locality Name (eg, city) []:
Hiroshima
   
# 都市

Organization Name (eg, company) [Internet Widgits Pty Ltd]:
GTS
   
# 組織名

Organizational Unit Name (eg, section) []:
Server World
   
# 組織の部門名

Common Name (e.g. server FQDN or YOUR name) []:
dlp.srv.world
   
# サーバーのFQDN

Email Address []:
xxx@srv.world
   
# 管理者アドレス
Please enter the following 'extra' attributes
to be sent with your certificate request
A challenge password []:
An optional company name []:
root@www:/etc/ssl/private#
openssl x509 -in server.csr -out server.crt -req -signkey server.key -days 3650

Signature ok
subject=/C=JP/ST=Hiroshima/L=Hiroshima/O=GTS/OU=Server World/CN=dlp.srv.world/emailAddress=xxx@srv.world
Getting Private key
root@dlp:/etc/ssl/private#
chmod 400 server.*
関連コンテンツ