OpenSSLによるCA証明書・CA秘密鍵の作成

CA秘密鍵を作成

 openssl genrsa -rand /var/log/messages -out ca.key 2048

CA証明書の署名要求を作成

 openssl req -new -days 3650 -key ca.key -out ca.csr 

CA証明書を自己署名して発行

 openssl x509 -days 3650 -in ca.csr -out ca.crt -req -signkey ca.key 

CA証明書を確認

 openssl x509 -in ca.crt -text

CA証明書をPEMフォーマットからDERフォーマットへ変換

Windows IEなどにインストールするCA証明書はDERフォーマットである必要がある。

 openssl x509 -in ca.crt -outform DER -out cacert.der

CA証明書をWindowsPCへインストール

手順

  • DER形式のCA証明書ファイルをWindowsPCへコピーする。
  • CA証明書ファイル(拡張子.der)をダブルクリックする。
  • 証明書をすべて次のストアに配置するを選択し、証明書のストアは信頼されたルート証明機関を選択する。

参考

http://www.jcsinc.co.jp/support/vista7_root.html

サーバ署名要求(CSR)をCA証明書で署名してサーバ証明書を作成

openssl.cnfの修正

openssl.cnfを開いてポリシーの設定を変更する。

 policy = policy_anything

サーバ証明書を作成

 openssl ca -config ./openssl.cnf -in server.csr -out server.crt

参考

http://www.nina.jp/server/slackware/openssl/openssl-command.html


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

Last-modified: 2013-03-04 (月) 17:07:06