自局認証で「公開鍵証明書」と「秘密鍵」を作成するには

本プロキシサーバソフトウェアにてSMTP/POP3 Over SSLを利用するための可能にするには、以下の手順にて設定を行います。

  1. 「公開鍵証明書」と「秘密鍵」を作成する。
  2. 「公開鍵証明書」と「秘密鍵」を本プロキシサーバソフトウェアに設定する。
    なお、本手順で作成される証明書はあくまで試験を行う為に作成する為のものです。
    正式な証明書の発行は、証明書発行企業へお問合せください。
    利用可能な証明書としてジオトラスト クイックSSL プレミアムグローバルサイン クイック認証SSLなどが、2009.07現在存在します。

1.「公開鍵証明書」と「秘密鍵」を作成する。

 SSL-Keyをdownloadし、任意の場所に解凍してください。
 解凍されたファイルの"CERTIFICATE.BAT"*2を実行し、質問に合わせて順次入力すれば「公開鍵証明書」と
 「秘密鍵」が作成されます。
 *2)自前で認証局を作成し、必要な「公開鍵証明書」と「秘密鍵」を作る為に独自に用意したバッチファイルです。
   正規の認証局に公開鍵証明書を発行してもらう場合は、「登録申請書」を認証局に送付して「公開鍵証明書」を発行してもらってください。



 "CERTIFICATE.BAT"の実行例(赤のアンダーライン部が入力例になります。)
 自前での認証局(CA)の作成
 
     openssl req -config openssl.cnf -new -nodes -keyout cakey.pem -x509 -out cacert.pem

     Using configuration from openssl.cnf
     Loading 'screen' into random state - done
     Generating a 512 bit RSA private key
     ..++++++++++++
     ....++++++++++++
     writing new private key to 'key.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) [AU]:JP
     State or Province Name (full name) [Some-State]:Saitama
     Locality Name (eg, city) []:Kasukabe-shi
     Organization Name (eg, company) [Internet Widgits Pty Ltd]:K-TEC
     Organizational Unit Name (eg, section) []:Postmaster
     Common Name (eg, YOUR name) []:mail.ktinc.jp
     Email Address []:

 秘密鍵の作成と登録申請書の作成
     openssl req -config openssl.cnf -new -nodes -newkey rsa:512 -keyout mykey.pem -out myreq.pem

     Using configuration from openssl.cnf
     Loading 'screen' into random state - done
     Generating a 512 bit RSA private key
     ...++++++++++++
     .++++++++++++
     writing new private key to 'mykey.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) [AU]:JP
     State or Province Name (full name) [Some-State]:Saitama
     Locality Name (eg, city) []:Kasukabe-shi
     Organization Name (eg, company) [Internet Widgits Pty Ltd]:K-TEC
     Organizational Unit Name (eg, section) []:Postmaster
     Common Name (eg, YOUR name) []:mail.ktinc.jp
     Email Address []:

     Please enter the following 'extra' attributes
     to be sent with your certificate request
     A challenge password []:
     An optional company name []:

 認証局(CA)によって署名した「公開鍵証明書」を発行
     openssl ca -config openssl.cnf -in myreq.pem -keyfile cakey.pem -cert cacert.pem -out mycert.pem

     Using configuration from openssl.cnf
     Loading 'screen' into random state - done
     Check that the request matches the signature
     Signature ok
     The Subjects Distinguished Name is as follows
     countryName :PRINTABLE:'JP'
     stateOrProvinceName :PRINTABLE:'Saitama'
     localityName :PRINTABLE:'Kasukabe-shi'
     organizationName :PRINTABLE:'K-TEC'
     organizationalUnitName:PRINTABLE:'Postmaster'
     commonName :PRINTABLE:'mail.ktinc.jp'
     Certificate is to be certified until May 6 00:29:27 2003 GMT (365 days)
     Sign the certificate? [y/n]:y

     1 out of 1 certificate requests certified, commit? [y/n]y
     Write out database with 1 new entries
     Data Base Updated


2.「公開鍵証明書」と「秘密鍵」を本サーバーソフトウェアに設定する。

 上記"CERTIFICATE.BAT"の実行で作成されたファイルは、
     mycert.pem ---- 公開鍵証明書ファイル
     mykey.pem ---- 秘密鍵ファイル
 として作成されています。
 任意のフォルダに保存後、本プロキシサーバのSMTP/POP3用の「接続情報設定」の各欄にフルパスで指定して下さい。




<Prev                                             Next>