This document details how to create a certificate authority, create and sign keys.
| | |
| | |
Assumptions and notes:
Conventions of this document:
This font and colour is to indicate screen output This font indicates information typed by the user This font and colour represents data within files, either edited or produced This is a commentThis font and color represent filenames
Creating a Certificate Authority
1) Generate a certificate
Use the command:
That will create a request and private key in the file "newreq.pem"
which should look something like this:
[fred@serv test]$ /usr/share/ssl/misc/CA -newca
CA certificate filename (or enter to create)
Making CA certificate ...
Using configuration from /usr/share/ssl/openssl.cnf
Generating a 2048 bit RSA private key
...+++
......+++
writing new private key to './demoCA/private/./cakey.pem'
Enter PEM pass phrase:
Verifying password - 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) [GB]: Au
State or Province Name (full name) [Berkshire]: WA
Locality Name (eg, city) [Newbury]: Perth
Organization Name (eg, company) [My Company Ltd]: UWA
Organizational Unit Name (eg, section) []: CS
Common Name (eg, your name or your server's hostname) []: Fred
Email Address []: fred@cs.uwa.edu.au
/usr/share/ssl/misc/CA -newreq
This will prompt for a password and then you'll be asked about information
about your certificate. Most of this is self explainitory.
Country code
What country you're in (Au for Australia)
US for the US, etc
State or provance name
Your state (denial)
Locality
Where you are within the state (city)
Organizational Name
Who you work for
Unit name
Who you work for within your organisation (Department)
Common name
A (meaningful) name for the connection
Email address
Your email address
Set a blank challenge password
I didn't bother with an optional company name
-----BEGIN RSA PRIVATE KEY-----
Proc-Type: 4,ENCRYPTED
DEK-Info: DES-EDE3-CBC,B6C82F213AF99975
UFC7dt01sSs345ndHwHNlmkWfg4QA7U1ZYuYGcbavtDmN+cQCxSNOZN+Xx5sFLKr
Shw+pEeAI34MZemYmf4PVu+0IX9VvoIF35Ou3fiMqh0J7kYVJYCIvRcbsZA+KKiF
snip
QhJSNpTNrouv/ESuiZf72z+jy/y51rKH2ES/p5bfvBrN6z8zJLsBZr4yKVB3u3eQ
-----END RSA PRIVATE KEY-----
-----BEGIN CERTIFICATE REQUEST-----
BxMFUGVydGgxDDAKBgNVBAoTA1VXQTELMAkGA1UECxMCQ1MxGTAXBgNVBAMUEEZy
Shw+pEeAI34MZemYmf4PVu+0IX9VvoIF35Ou3fiMqh0J7kYVJYCIvRcbsZA+KKiF
snip
FP8sdpQreKjL1RSaC2wKjTfXcxXGFk3+B2PshJf2sbXuazKz9qRchjDoL+lv
-----END CERTIFICATE REQUEST-----