/usr/lib/ssl/misc# cp demoCA demoCA_bak
cp: omitting directory `demoCA’
/usr/lib/ssl/misc# ls  c_hash  c_issuer  demoCA       newkey.pem  c_info  c_name    newcert.pem  newreq.pem
/usr/lib/ssl/misc# mv demoCA/ demoCA_bak
/usr/lib/ssl/misc# ls  c_hash  c_issuer  demoCA_bak   newkey.pem  c_info  c_name    newcert.pem  newreq.pem
/usr/lib/ssl/misc# ./ -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]:Tokyo
Locality Name (eg, city) []:Edogawa
Organization Name (eg, company) [Internet Widgits Pty Ltd]:
Organizational Unit Name (eg, section) []:
Common Name (eg, YOUR name) []
Email Address []

Please enter the following ‘extra’ attributes
to be sent with your certificate request
A challenge password []:gen039
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)
            Not Before: Jan 11 12:36:55 2010 GMT
            Not After : Jan 10 12:36:55 2013 GMT
            countryName               = JP
            stateOrProvinceName       = Tokyo
            organizationName          = Internet Widgits Pty Ltd
            commonName                =
            emailAddress              =
        X509v3 extensions:
            X509v3 Subject Key Identifier:
            X509v3 Authority Key Identifier:
                DirName:/C=JP/ST=Tokyo/O=Internet Widgits Pty Ltd/

            X509v3 Basic Constraints:
            Netscape Cert Type:
                SSL CA, S/MIME CA
Certificate is to be certified until Jan 10 12:36:55 2013 GMT (1095 days)

Write out database with 1 new entries
Data Base Updated


/usr/lib/ssl/misc# openssl rsa -in ./demoCA/private/cakey.pem -out ./demoCA/private/cakey.pem
Enter pass phrase for ./demoCA/private/cakey.pem:
writing RSA key
/usr/lib/ssl/misc# openssl x509 -in ./demoCA/cacert.pem -out ./demoCA/cacert.crt
/usr/lib/ssl/misc# cd demoCA
/debian:/usr/lib/ssl/misc/demoCA# cp cacert.crt /etc/apache2/ssl/cacert.crt
/debian:/usr/lib/ssl/misc/demoCA# cd private/
/usr/lib/ssl/misc/demoCA/private# cp cakey.pem /etc/apache2/ssl/private/cakey.pem
/usr/lib/ssl/misc/demoCA/private# cp cakey.pem /etc/postfix/wwwprkey.pem
/usr/lib/ssl/misc/demoCA# cp cacert.crt /etc/postfix/wwwcrt.pem


メールアドレスが公開されることはありません。 * が付いている欄は必須項目です