Fix unused variable warning of GCC
[openssl.git] / doc / ca.1
1 From eay@orb.mincom.oz.au Thu Dec 28 23:56:45 1995
2 Received: by orb.mincom.oz.au id AA07374
3   (5.65c/IDA-1.4.4 for eay); Thu, 28 Dec 1995 13:56:45 +1000
4 Date: Thu, 28 Dec 1995 13:56:45 +1000 (EST)
5 From: Eric Young <eay@mincom.oz.au>
6 X-Sender: eay@orb
7 To: sameer <sameer@c2.org>
8 Cc: ssleay@mincom.oz.au
9 Subject: Re: 'ca'
10 In-Reply-To: <199512230440.UAA23410@infinity.c2.org>
11 Message-Id: <Pine.SOL.3.91.951228133525.7269A-100000@orb>
12 Mime-Version: 1.0
13 Content-Type: TEXT/PLAIN; charset=US-ASCII
14 Status: RO
15 X-Status: 
16
17 On Fri, 22 Dec 1995, sameer wrote:
18 >       I could use documentation on 'ca'. Thanks.
19
20 Very quickly.
21 The ca program uses the ssleay.conf file for most of its configuration
22
23 ./ca -help
24
25  -verbose        - Talk alot while doing things
26  -config file    - A config file. If you don't want to use the
27                    default config file
28  -name arg       - The particular CA definition to use
29         In the config file, the section to use for parameters.  This lets 
30         multiple setups to be contained in the one file.  By default, the 
31         default_ca variable is looked up in the [ ca ] section.  So in the 
32         shipped ssleay.conf, the CA definition used is CA_default.  It could be 
33         any other name.
34  -gencrl days    - Generate a new CRL, days is when the next CRL is due
35         This will generate a new certificate revocion list.
36  -days arg       - number of days to certify the certificate for
37         When certifiying certificates, this is the number of days to use.
38  -md arg         - md to use, one of md2, md5, sha or sha1
39  -policy arg     - The CA 'policy' to support
40         I'll describe this later, but there are 2 policies definied in the 
41         shipped ssleay.conf
42  -keyfile arg    - PEM RSA private key file
43  -key arg        - key to decode the RSA private key if it is encrypted
44         since we need to keep the CA's RSA key encrypted
45  -cert           - The CA certificate
46  -in file        - The input PEM encoded certificate request(s)
47  -out file       - Where to put the output file(s)
48  -outdir dir     - Where to put output certificates
49         The -out options concatinates all the output certificied
50         certificates to one file, -outdir puts them in a directory,
51         named by serial number.
52  -infiles ....   - The last argument, requests to process
53         The certificate requests to process, -in is the same.
54
55 Just about all the above have default values defined in ssleay.conf.
56
57 The key variables in ssleay.conf are (for the pariticular '-name' being 
58 used, in the default, it is CA_default).
59
60 dir is where all the CA database stuff is kept.
61 certs is where all the previously issued certificates are kept.
62 The database is a simple text database containing the following tab separated 
63 fields.
64 status: a value of 'R' - revoked, 'E' -expired or 'V' valid.
65 issued date:  When the certificate was certified.
66 revoked date:  When it was revoked, blank if not revoked.
67 serial number:  The certificate serial number.
68 certificate:    Where the certificate is located.
69 CN:     The name of the certificate.
70
71 The demo file has quite a few made up values it it.  The last 2 were 
72 added by the ca program and are acurate.
73 The CA program does not update the 'certificate' file correctly right now.
74 The serial field should be unique as should the CN/status combination.
75 The ca program checks these at startup.  What still needs to be 
76 wrtten is a program to 'regenerate' the data base file from the issued 
77 certificate list (and a CRL list).
78
79 Back to the CA_default variables.
80
81 Most of the variables are commented.
82
83 policy is the default policy.
84
85 Ok for policies, they define the order and which fields must be present 
86 in the certificate request and what gets filled in.
87
88 So a value of
89 countryName             = match
90 means that the country name must match the CA certificate.
91 organizationalUnitName  = optional
92 The org.Unit,Name does not have to be present and
93 commonName              = supplied
94 commonName must be supplied in the certificate request.
95
96 For the 'policy_match' polocy, the order of the attributes in the 
97 generated certiticate would be
98 countryName
99 stateOrProvinceName
100 organizationName
101 organizationalUnitName
102 commonName
103 emailAddress
104
105 Have a play, it sort of makes sense.  If you think about how the persona 
106 requests operate, it is similar to the 'policy_match' policy and the
107 'policy_anything' is similar to what versign is doing.
108
109 I hope this helps a bit.  Some backend scripts are definitly needed to 
110 update the database and to make certificate revocion easy.  All 
111 certificates issued should also be kept forever (or until they expire?)
112
113 hope this helps
114 eric (who has to run off an buy some cheap knee pads for the caving in 4 
115 days time :-)
116
117 --
118 Eric Young                  | Signature removed since it was generating
119 AARNet: eay@mincom.oz.au    | more followups than the message contents :-)
120
121