Deprecated: The each() function is deprecated. This message will be suppressed on further calls in /home/zhenxiangba/zhenxiangba.com/public_html/phproxy-improved-master/index.php on line 456 SSL用中間CA証明書の作成(Linux編)
#
mkdir server
# mv *.pem server
# mv *.key server
# mv *.crt server
◆中間CA証明書作成用リクエストファイル(newreq.pem)の作成
ここでは、ルートCAに送るデジタル証明書のリクエストファイルを作成します。
# CA.pl -newreq
Generating a 1024 bit RSA private key
......++++++
...................++++++
writing new private key to 'newreq.pem'
Enter
PEM pass
phrase:xxxxx[Enter]
←
中間CA用パスフレーズ入力(画面上何も変化はないが処理されている)
Verifying
- Enter PEM pass phrase:xxxxx[Enter] ← 中間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)
[AU]:JP[Enter] (国コード)
State
or Province Name (full name) Some-State]:Tokyo[Enter] (都道府県
名)
Locality Name (eg, city) []:Edogawa[Enter] (市町村名)
Organization
Name (eg, company) [Internet Widgits Pty Ltd]:Private_CA1[Enter] (組織名*)
Organizational
Unit Name (eg, section) []:Admin[Enter] (組織内ユ
ニット名)
Common Name (eg, YOUR name) []:Private_CA1[Enter] (組織/サーバ名)
Email
Address []:oyaji@mail.aconus.com[Enter] (管理者メー
ルアドレス)
Please enter the following
'extra' attributes
to be sent with your certificate request
A
challenge password []:[Enter]
←
Enterのみ入力
An
optional company name []:[Enter] ← Enterのみ入力
Request (and private key) is
in newreq.pem
*: 組織名(ON)はルートCAとは異なる名前にすること。
◆中間CA証明書(newcert.pem)の作成
ルートCAの証明書とキーを使って、リクエストファイルから中間CAの証明書の作成と署名を行う。
# CA.pl -signCA
Using configuration from /etc/ssl/openssl.cnf
Enter pass phrase for ./demoCA/private/cakey.pem:xxxxx[Enter]
← ルートCA用パスフレーズ入力
Check
that the request matches the signature
Signature ok
Certificate Details:
Serial Number:
95:0b:8f:9e:34:4a:23:a2
Validity
Not Before: Mar 19 10:36:07 2008 GMT
Not After : Mar 19 10:36:07 2009 GMT
Subject:
countryName
= JP
stateOrProvinceName
= Tokyo
localityName
= Edogawa
organizationName
= Private_CA1
organizationalUnitName = Admin
commonName
= Private_CA1
emailAddress
= oyaji@mail.aconus.com
X509v3 extensions:
X509v3 Subject Key Identifier:
1F:81:10:DD:A1:83:13:3F:6D:7C:1B:3B:33:2F:C5:80:BA:CF:E7:69
X509v3 Authority Key Identifier:
keyid:CF:84:0E:3E:34:37:A2:D7:28:45:26:C4:B7:45:FF:D8:86:04:85:D3
DirName:/C=JP/ST=Tokyo/L=Edogawa/O=Private_CA/OU=Admin/CN=Private_CA/emailAddress=oyaji@mail.aconus.com
serial:95:0B:8F:9E:34:4A:23:A1
X509v3 Basic Constraints:
CA:TRUE
Netscape Cert Type:
SSL CA, S/MIME CA
Certificate is to be certified until Mar 19 10:36:07 2009 GMT (365 days)
Sign the certificate? [y/n]:y[Enter]
1 out of 1 certificate requests certified, commit? [y/n]y[Enter]
Write
out database with 1 new entries
Data Base Updated
Signed CA certificate is in newcert.pem