検索条件
全4件
(1/1ページ)
Last died with error (see error log for more information): kevent(EV_ADD, READ, 56) failed: Bad file descriptor(実際は改行しません)
basicConstraints=CA:false(CA:true を CA:false に)
basicConstraints=CA:false(CA:true を CA:false に)
# cd /root/BasekernelCA # openssl x509 -in cacet.pem -inform PEM -out cacert.der -outform DERここで作成した der 形式の証明書ファイルを Webサイト公開ディレクトリ等に設置し、Webページからダウンロード出来るようにしておきます。
# openssl genrsa -out private.key 2048この後生成する公開鍵とペアで使用されます。
# openssl req -new -sha512 -key private.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]:Hokkaido Locality Name (eg, city) []:Sapporo Organization Name (eg, company) [Internet Widgits Pty Ltd]:Base Kernel Co,.Ltd. Organizational Unit Name (eg, section) []:labo Common Name (e.g. server FQDN or YOUR name) []:clione.basekernel.ne.jp Email Address []: Please enter the following 'extra' attributes to be sent with your certificate request A challenge password []: An optional company name []:この手順で、当該の例では暗号化された CSR が server.csr ファイルに作成されます。
# openssl ca -out server.pem -infiles server.csrこの操作により、
Enter pass phrase for /root/BaseKernelCA/private/cakey.pem:と、プライベートCAを生成するときに設定したパスワードを入力後、
if [ -z "$DAYS" ] ; then DAYS="-days 395" ; fi # 13 month CADAYS="-days 14610" # 40 years REQ="$OPENSSL req $SSLEAY_CONFIG"(71行目付近)
if [ -z "$CATOP" ] ; then CATOP=/root/BaseKernelCA ; fiCADAYS はCAの有効日数。
# chmod +x /usr/src/crypto/openssl/apps/CA.shとして、スプリプトを実行可能状態にしておきます。
[ CA_default ] dir = /root/BaseKernelCA default_days = 7305 default_crl_days= 30 default_md = sha512 policy = policy_match [ policy_match ] countryName = match stateOrProvinceName = supplied organizationName = supplied organizationalUnitName = optional commonName = supplied emailAddress = optional [ req ] default_bits = 2048 default_md = sha512 [ req_distinguished_name ] countryName_default = JP stateOrProvinceName_default = Hokkaido 0.organizationName_default = Base Kernel Co., Ltd [ usr_cert ] basicConstraints=CA:true nsCertType = server [ v3_ca ] basicConstraints = CA:true nsCertType = sslCA, emailCAこの修正で、鍵長デフォルト 2,048bit、暗号化ハッシュ SHA-2(SHA512) に対応します。
# /usr/src/crypto/openssl/apps/CA.sh -newca
CA certificate filename (or enter to create) Making CA certificate ... Generating a 2048 bit RSA private key ...............................................................+++ .......................................+++ writing new private key to '/root/BaseKernelCA/private/./cakey.pem' Enter PEM pass phrase: (CAパスフレーズ入力) Verifying - Enter PEM pass phrase: (もう一度同じCAパスフレーズ入力) ----- 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) [JP]: (JP でよいのでこのままリターン) State or Province Name (full name) [Hokkaido]:(Hokkaido でよいのでこのままリターン) Locality Name (eg, city) []:Sapporo Organization Name (eg, company) [Base Kernel Co., Ltd]: Organizational Unit Name (eg, section) []:Base Net Common Name (eg, YOUR name) []:Base Kernel CA Email Address []:hoge@example.com Please enter the following 'extra' attributes to be sent with your certificate request A challenge password []: (このままリターン) An optional company name []: (このままリターン) Using configuration from /etc/ssl/openssl.cnf Enter pass phrase for /root/BaseKernelCA/private/./cakey.pem: Check that the request matches the signature Signature ok (以下省略)実際には続いてこんな感じで詳細が出力されます: