Make CC,CFLAG etc get passed to make links and various Win32 fixes.
[openssl.git] / apps / openssl.cnf
1 #
2 # OpenSSL example configuration file.
3 # This is mostly being used for generation of certificate requests.
4 #
5
6 RANDFILE                = $ENV::HOME/.rnd
7 oid_file                = $ENV::HOME/.oid
8 oid_section             = new_oids
9
10 [ new_oids ]
11
12 # We can add new OIDs in here for use by 'ca' and 'req'.
13 # Add a simple OID like this:
14 # testoid1=1.2.3.4
15 # Or use config file substitution like this:
16 # testoid2=${testoid1}.5.6
17
18 ####################################################################
19 [ ca ]
20 default_ca      = CA_default            # The default ca section
21
22 ####################################################################
23 [ CA_default ]
24
25 dir             = ./demoCA              # Where everything is kept
26 certs           = $dir/certs            # Where the issued certs are kept
27 crl_dir         = $dir/crl              # Where the issued crl are kept
28 database        = $dir/index.txt        # database index file.
29 new_certs_dir   = $dir/newcerts         # default place for new certs.
30
31 certificate     = $dir/cacert.pem       # The CA certificate
32 serial          = $dir/serial           # The current serial number
33 crl             = $dir/crl.pem          # The current CRL
34 private_key     = $dir/private/cakey.pem# The private key
35 RANDFILE        = $dir/private/.rand    # private random number file
36
37 x509_extensions = usr_cert              # The extentions to add to the cert
38 crl_extensions  = crl_ext               # Extensions to add to CRL
39 default_days    = 365                   # how long to certify for
40 default_crl_days= 30                    # how long before next CRL
41 default_md      = md5                   # which md to use.
42 preserve        = no                    # keep passed DN ordering
43
44 # A few difference way of specifying how similar the request should look
45 # For type CA, the listed attributes must be the same, and the optional
46 # and supplied fields are just that :-)
47 policy          = policy_match
48
49 # For the CA policy
50 [ policy_match ]
51 countryName             = match
52 stateOrProvinceName     = match
53 organizationName        = match
54 organizationalUnitName  = optional
55 commonName              = supplied
56 emailAddress            = optional
57
58 # For the 'anything' policy
59 # At this point in time, you must list all acceptable 'object'
60 # types.
61 [ policy_anything ]
62 countryName             = optional
63 stateOrProvinceName     = optional
64 localityName            = optional
65 organizationName        = optional
66 organizationalUnitName  = optional
67 commonName              = supplied
68 emailAddress            = optional
69
70 ####################################################################
71 [ req ]
72 default_bits            = 1024
73 default_keyfile         = privkey.pem
74 distinguished_name      = req_distinguished_name
75 attributes              = req_attributes
76 x509_extensions = v3_ca # The extentions to add to the self signed cert
77
78 [ req_distinguished_name ]
79 countryName                     = Country Name (2 letter code)
80 countryName_default             = AU
81 countryName_min                 = 2
82 countryName_max                 = 2
83
84 stateOrProvinceName             = State or Province Name (full name)
85 stateOrProvinceName_default     = Some-State
86
87 localityName                    = Locality Name (eg, city)
88
89 0.organizationName              = Organization Name (eg, company)
90 0.organizationName_default      = Internet Widgits Pty Ltd
91
92 # we can do this but it is not needed normally :-)
93 #1.organizationName             = Second Organization Name (eg, company)
94 #1.organizationName_default     = World Wide Web Pty Ltd
95
96 organizationalUnitName          = Organizational Unit Name (eg, section)
97 #organizationalUnitName_default =
98
99 commonName                      = Common Name (eg, YOUR name)
100 commonName_max                  = 64
101
102 emailAddress                    = Email Address
103 emailAddress_max                = 40
104
105 # SET-ex3                       = SET extension number 3
106
107 [ req_attributes ]
108 challengePassword               = A challenge password
109 challengePassword_min           = 4
110 challengePassword_max           = 20
111
112 unstructuredName                = An optional company name
113
114 [ usr_cert ]
115
116 # These extensions are added when 'ca' signs a request.
117
118 # This goes against PKIX guidelines but some CAs do it and some software
119 # requires this to avoid interpreting an end user certificate as a CA.
120
121 basicConstraints=CA:FALSE
122
123 # Here are some examples of the usage of nsCertType. If it is omitted
124 # the certificate can be used for anything *except* object signing.
125
126 # This is OK for an SSL server.
127 #nsCertType                     = server
128
129 # For an object signing certificate this would be used.
130 #nsCertType = objsign
131
132 # For normal client use this is typical
133 #nsCertType = client, email
134
135 # This is typical also
136
137 keyUsage = nonRepudiation, digitalSignature, keyEncipherment
138
139 nsComment                       = "OpenSSL Generated Certificate"
140
141 # PKIX recommendations
142 subjectKeyIdentifier=hash
143 authorityKeyIdentifier=keyid,issuer:always
144
145 # Import the email address.
146
147 subjectAltName=email:copy
148
149 # Copy subject details
150
151 issuerAltName=issuer:copy
152
153 #nsCaRevocationUrl              = http://www.domain.dom/ca-crl.pem
154 #nsBaseUrl
155 #nsRevocationUrl
156 #nsRenewalUrl
157 #nsCaPolicyUrl
158 #nsSslServerName
159
160 [ v3_ca]
161
162 # Extensions for a typical CA
163
164 # It's a CA certificate
165 basicConstraints = CA:true
166
167 # PKIX recommendation.
168
169 subjectKeyIdentifier=hash
170
171 authorityKeyIdentifier=keyid:always,issuer:always
172
173 # This is what PKIX recommends but some broken software chokes on critical
174 # extensions.
175 #basicConstraints = critical,CA:true
176
177 # Key usage: again this should really be critical.
178 keyUsage = cRLSign, keyCertSign
179
180 # Some might want this also
181 #nsCertType = sslCA, emailCA
182
183 # Include email address in subject alt name: another PKIX recommendation
184 subjectAltName=email:copy
185 # Copy issuer details
186 issuerAltName=issuer:copy
187
188 # RAW DER hex encoding of an extension: beware experts only!
189 # 1.2.3.5=RAW:02:03
190 # You can even override a supported extension:
191 # basicConstraints= critical, RAW:30:03:01:01:FF
192
193 [ crl_ext ]
194
195 # CRL extensions.
196 # Only issuerAltName and authorityKeyIdentifier make any sense in a CRL.
197
198 issuerAltName=issuer:copy
199 authorityKeyIdentifier=keyid:always,issuer:always