* CA.shを使ってCAを作成 [#x6ac88e5]

** 前提 [#x9ad6504]
ここではLinuxのUbuntuをOSとする。

** 手順 [#mc6b017b]
*** CA作成スクリプトの用意 [#sea152d2]
** CA作成スクリプトの用意 [#sea152d2]
 mkdir /etc/ssl/CA
 cd /etc/ssl/CA
 cp /usr/lib/ssl/misc/CA.sh ,
 vi CA.sh
CA.shを編集して、CADAYS="-days 3650"とした。

*** CAの作成 [#scc46081]
** CAの作成 [#scc46081]
 DAYS=3650 CATOP=myCA ./CA.sh -newca

 CA certificate filename (or enter to create)
 
 Making CA certificate ...
 Generating a 1024 bit RSA private key
 .....++++++
 ...++++++
 writing new private key to './demoCA/private/./cakey.pem'
 Enter PEM pass phrase:
 Verifying - Enter PEM pass phrase:
 -----
 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]:N/A
 Locality Name (eg, city) []:N/A
 Organization Name (eg, company) [Internet Widgits Pty Ltd]:N/A
 Organizational Unit Name (eg, section) []:N/A
 Common Name (eg, YOUR name) []:myCA0531.local
 Email Address []:

*** CA証明書作成時の質問について [#u59baf63]
CAとCSRを発行するホストが同一の場合、Country NameやOrganization Name等が同じで無ければならないらしいので、必要な箇所だけ入力し、後は適当な文字で埋めると良い。

** openssl.cnfの修正 [#ma97c962]
 cp /usr/lib/ssl/openssl.cnf .
 vi openssl.cnf
dir = ./myCAとする。以後、opensslコマンドを使う場合はこのcnfファイルを読み込むように指定すると良い。


トップ   編集 差分 バックアップ 添付 複製 名前変更 リロード   新規 一覧 検索 最終更新   ヘルプ   最終更新のRSS