ubuntuで認証局を作成
$ cd /usr/lib/ssl/misc $ sudo ./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]:Osaka Locality Name (eg, city) []:Osaka Organization Name (eg, company) [Internet Widgits Pty Ltd]:Dummy Corp Organizational Unit Name (eg, section) []:Network Common Name (eg, YOUR name) []:dummy.example.com Email Address []:info@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 /usr/lib/ssl/openssl.cnf Enter pass phrase for ./demoCA/private/./cakey.pem: <== パスフレーズを入力 Check that the request matches the signature Signature ok Certificate Details: Serial Number: 0 (0x0) Validity Not Before: Feb 28 12:31:18 2013 GMT Not After : Feb 28 12:31:18 2016 GMT Subject: countryName = JP stateOrProvinceName = Osaka organizationName = Dummy Corp organizationalUnitName = Network commonName = dummy.example.com emailAddress = info@example.com X509v3 extensions: X509v3 Subject Key Identifier: 34:69:EA:58:C0:EB:D3:43:AB:65:6C:EA:65:BC:60:87:21:95:93:C3 X509v3 Authority Key Identifier: keyid:34:69:EA:58:C0:EB:D3:43:AB:65:6C:EA:65:BC:60:87:21:95:93:C3 DirName:/C=JP/ST=Osaka/O=Dummy Corp/OU=Network/CN=dummy.example.com/emailAddress=info@example.com serial:00 X509v3 Basic Constraints: CA:TRUE Certificate is to be certified until Feb 28 12:31:18 2016 GMT (1095 days) Write out database with 1 new entries Data Base Updated
これでCA局の秘密鍵(/usr/lib/ssl/misc/demoCA/private/cakey.pem)と自己署名証明書(/usr/lib/ssl/misc/demoCA/cacert.pem)が作成される