1 1.1 christos # 2 1.1 christos # OpenSSL example configuration file. 3 1.1 christos # This is mostly being used for generation of certificate requests. 4 1.1 christos # 5 1.1 christos 6 1.1.1.2 christos # Note that you can include other files from the main configuration 7 1.1.1.2 christos # file using the .include directive. 8 1.1.1.2 christos #.include filename 9 1.1.1.2 christos 10 1.1 christos # This definition stops the following lines choking if HOME isn't 11 1.1 christos # defined. 12 1.1 christos HOME = . 13 1.1 christos 14 1.1 christos # Extra OBJECT IDENTIFIER info: 15 1.1 christos #oid_file = $ENV::HOME/.oid 16 1.1 christos oid_section = new_oids 17 1.1 christos 18 1.1 christos # To use this configuration file with the "-extfile" option of the 19 1.1 christos # "openssl x509" utility, name here the section containing the 20 1.1 christos # X.509v3 extensions to use: 21 1.1.1.2 christos # extensions = 22 1.1 christos # (Alternatively, use a configuration file that has only 23 1.1 christos # X.509v3 extensions in its main [= default] section.) 24 1.1 christos 25 1.1 christos [ new_oids ] 26 1.1 christos 27 1.1 christos # We can add new OIDs in here for use by 'ca', 'req' and 'ts'. 28 1.1 christos # Add a simple OID like this: 29 1.1 christos # testoid1=1.2.3.4 30 1.1 christos # Or use config file substitution like this: 31 1.1 christos # testoid2=${testoid1}.5.6 32 1.1 christos 33 1.1 christos # Policies used by the TSA examples. 34 1.1 christos tsa_policy1 = 1.2.3.4.1 35 1.1 christos tsa_policy2 = 1.2.3.4.5.6 36 1.1 christos tsa_policy3 = 1.2.3.4.5.7 37 1.1 christos 38 1.1 christos #################################################################### 39 1.1 christos [ ca ] 40 1.1 christos default_ca = CA_default # The default ca section 41 1.1 christos 42 1.1 christos #################################################################### 43 1.1 christos [ CA_default ] 44 1.1 christos 45 1.1 christos dir = ./demoCA # Where everything is kept 46 1.1 christos certs = $dir/certs # Where the issued certs are kept 47 1.1 christos crl_dir = $dir/crl # Where the issued crl are kept 48 1.1 christos database = $dir/index.txt # database index file. 49 1.1 christos #unique_subject = no # Set to 'no' to allow creation of 50 1.1.1.2 christos # several certs with same subject. 51 1.1 christos new_certs_dir = $dir/newcerts # default place for new certs. 52 1.1 christos 53 1.1 christos certificate = $dir/cacert.pem # The CA certificate 54 1.1 christos serial = $dir/serial # The current serial number 55 1.1 christos crlnumber = $dir/crlnumber # the current crl number 56 1.1 christos # must be commented out to leave a V1 CRL 57 1.1 christos crl = $dir/crl.pem # The current CRL 58 1.1 christos private_key = $dir/private/cakey.pem# The private key 59 1.1 christos 60 1.1.1.2 christos x509_extensions = usr_cert # The extensions to add to the cert 61 1.1 christos 62 1.1 christos # Comment out the following two lines for the "traditional" 63 1.1 christos # (and highly broken) format. 64 1.1 christos name_opt = ca_default # Subject Name options 65 1.1 christos cert_opt = ca_default # Certificate field options 66 1.1 christos 67 1.1 christos # Extension copying option: use with caution. 68 1.1 christos # copy_extensions = copy 69 1.1 christos 70 1.1 christos # Extensions to add to a CRL. Note: Netscape communicator chokes on V2 CRLs 71 1.1 christos # so this is commented out by default to leave a V1 CRL. 72 1.1 christos # crlnumber must also be commented out to leave a V1 CRL. 73 1.1 christos # crl_extensions = crl_ext 74 1.1 christos 75 1.1 christos default_days = 365 # how long to certify for 76 1.1 christos default_crl_days= 30 # how long before next CRL 77 1.1 christos default_md = default # use public key default MD 78 1.1 christos preserve = no # keep passed DN ordering 79 1.1 christos 80 1.1 christos # A few difference way of specifying how similar the request should look 81 1.1 christos # For type CA, the listed attributes must be the same, and the optional 82 1.1 christos # and supplied fields are just that :-) 83 1.1 christos policy = policy_match 84 1.1 christos 85 1.1 christos # For the CA policy 86 1.1 christos [ policy_match ] 87 1.1 christos countryName = match 88 1.1 christos stateOrProvinceName = match 89 1.1 christos organizationName = match 90 1.1 christos organizationalUnitName = optional 91 1.1 christos commonName = supplied 92 1.1 christos emailAddress = optional 93 1.1 christos 94 1.1 christos # For the 'anything' policy 95 1.1 christos # At this point in time, you must list all acceptable 'object' 96 1.1 christos # types. 97 1.1 christos [ policy_anything ] 98 1.1 christos countryName = optional 99 1.1 christos stateOrProvinceName = optional 100 1.1 christos localityName = optional 101 1.1 christos organizationName = optional 102 1.1 christos organizationalUnitName = optional 103 1.1 christos commonName = supplied 104 1.1 christos emailAddress = optional 105 1.1 christos 106 1.1 christos #################################################################### 107 1.1 christos [ req ] 108 1.1 christos default_bits = 2048 109 1.1 christos default_keyfile = privkey.pem 110 1.1 christos distinguished_name = req_distinguished_name 111 1.1 christos attributes = req_attributes 112 1.1.1.2 christos x509_extensions = v3_ca # The extensions to add to the self signed cert 113 1.1 christos 114 1.1 christos # Passwords for private keys if not present they will be prompted for 115 1.1 christos # input_password = secret 116 1.1 christos # output_password = secret 117 1.1 christos 118 1.1.1.2 christos # This sets a mask for permitted string types. There are several options. 119 1.1 christos # default: PrintableString, T61String, BMPString. 120 1.1 christos # pkix : PrintableString, BMPString (PKIX recommendation before 2004) 121 1.1 christos # utf8only: only UTF8Strings (PKIX recommendation after 2004). 122 1.1 christos # nombstr : PrintableString, T61String (no BMPStrings or UTF8Strings). 123 1.1 christos # MASK:XXXX a literal mask value. 124 1.1 christos # WARNING: ancient versions of Netscape crash on BMPStrings or UTF8Strings. 125 1.1 christos string_mask = utf8only 126 1.1 christos 127 1.1 christos # req_extensions = v3_req # The extensions to add to a certificate request 128 1.1 christos 129 1.1 christos [ req_distinguished_name ] 130 1.1 christos countryName = Country Name (2 letter code) 131 1.1 christos countryName_default = AU 132 1.1 christos countryName_min = 2 133 1.1 christos countryName_max = 2 134 1.1 christos 135 1.1 christos stateOrProvinceName = State or Province Name (full name) 136 1.1 christos stateOrProvinceName_default = Some-State 137 1.1 christos 138 1.1 christos localityName = Locality Name (eg, city) 139 1.1 christos 140 1.1 christos 0.organizationName = Organization Name (eg, company) 141 1.1 christos 0.organizationName_default = Internet Widgits Pty Ltd 142 1.1 christos 143 1.1 christos # we can do this but it is not needed normally :-) 144 1.1 christos #1.organizationName = Second Organization Name (eg, company) 145 1.1 christos #1.organizationName_default = World Wide Web Pty Ltd 146 1.1 christos 147 1.1 christos organizationalUnitName = Organizational Unit Name (eg, section) 148 1.1 christos #organizationalUnitName_default = 149 1.1 christos 150 1.1 christos commonName = Common Name (e.g. server FQDN or YOUR name) 151 1.1 christos commonName_max = 64 152 1.1 christos 153 1.1 christos emailAddress = Email Address 154 1.1 christos emailAddress_max = 64 155 1.1 christos 156 1.1 christos # SET-ex3 = SET extension number 3 157 1.1 christos 158 1.1 christos [ req_attributes ] 159 1.1 christos challengePassword = A challenge password 160 1.1 christos challengePassword_min = 4 161 1.1 christos challengePassword_max = 20 162 1.1 christos 163 1.1 christos unstructuredName = An optional company name 164 1.1 christos 165 1.1 christos [ usr_cert ] 166 1.1 christos 167 1.1 christos # These extensions are added when 'ca' signs a request. 168 1.1 christos 169 1.1 christos # This goes against PKIX guidelines but some CAs do it and some software 170 1.1 christos # requires this to avoid interpreting an end user certificate as a CA. 171 1.1 christos 172 1.1 christos basicConstraints=CA:FALSE 173 1.1 christos 174 1.1 christos # Here are some examples of the usage of nsCertType. If it is omitted 175 1.1 christos # the certificate can be used for anything *except* object signing. 176 1.1 christos 177 1.1 christos # This is OK for an SSL server. 178 1.1 christos # nsCertType = server 179 1.1 christos 180 1.1 christos # For an object signing certificate this would be used. 181 1.1 christos # nsCertType = objsign 182 1.1 christos 183 1.1 christos # For normal client use this is typical 184 1.1 christos # nsCertType = client, email 185 1.1 christos 186 1.1 christos # and for everything including object signing: 187 1.1 christos # nsCertType = client, email, objsign 188 1.1 christos 189 1.1 christos # This is typical in keyUsage for a client certificate. 190 1.1 christos # keyUsage = nonRepudiation, digitalSignature, keyEncipherment 191 1.1 christos 192 1.1 christos # This will be displayed in Netscape's comment listbox. 193 1.1 christos nsComment = "OpenSSL Generated Certificate" 194 1.1 christos 195 1.1 christos # PKIX recommendations harmless if included in all certificates. 196 1.1 christos subjectKeyIdentifier=hash 197 1.1 christos authorityKeyIdentifier=keyid,issuer 198 1.1 christos 199 1.1 christos # This stuff is for subjectAltName and issuerAltname. 200 1.1 christos # Import the email address. 201 1.1 christos # subjectAltName=email:copy 202 1.1 christos # An alternative to produce certificates that aren't 203 1.1 christos # deprecated according to PKIX. 204 1.1 christos # subjectAltName=email:move 205 1.1 christos 206 1.1 christos # Copy subject details 207 1.1 christos # issuerAltName=issuer:copy 208 1.1 christos 209 1.1 christos #nsCaRevocationUrl = http://www.domain.dom/ca-crl.pem 210 1.1 christos #nsBaseUrl 211 1.1 christos #nsRevocationUrl 212 1.1 christos #nsRenewalUrl 213 1.1 christos #nsCaPolicyUrl 214 1.1 christos #nsSslServerName 215 1.1 christos 216 1.1 christos # This is required for TSA certificates. 217 1.1 christos # extendedKeyUsage = critical,timeStamping 218 1.1 christos 219 1.1 christos [ v3_req ] 220 1.1 christos 221 1.1 christos # Extensions to add to a certificate request 222 1.1 christos 223 1.1 christos basicConstraints = CA:FALSE 224 1.1 christos keyUsage = nonRepudiation, digitalSignature, keyEncipherment 225 1.1 christos 226 1.1 christos [ v3_ca ] 227 1.1 christos 228 1.1 christos 229 1.1 christos # Extensions for a typical CA 230 1.1 christos 231 1.1 christos 232 1.1 christos # PKIX recommendation. 233 1.1 christos 234 1.1 christos subjectKeyIdentifier=hash 235 1.1 christos 236 1.1 christos authorityKeyIdentifier=keyid:always,issuer 237 1.1 christos 238 1.1.1.2 christos basicConstraints = critical,CA:true 239 1.1 christos 240 1.1 christos # Key usage: this is typical for a CA certificate. However since it will 241 1.1 christos # prevent it being used as an test self-signed certificate it is best 242 1.1 christos # left out by default. 243 1.1 christos # keyUsage = cRLSign, keyCertSign 244 1.1 christos 245 1.1 christos # Some might want this also 246 1.1 christos # nsCertType = sslCA, emailCA 247 1.1 christos 248 1.1 christos # Include email address in subject alt name: another PKIX recommendation 249 1.1 christos # subjectAltName=email:copy 250 1.1 christos # Copy issuer details 251 1.1 christos # issuerAltName=issuer:copy 252 1.1 christos 253 1.1 christos # DER hex encoding of an extension: beware experts only! 254 1.1 christos # obj=DER:02:03 255 1.1 christos # Where 'obj' is a standard or added object 256 1.1 christos # You can even override a supported extension: 257 1.1 christos # basicConstraints= critical, DER:30:03:01:01:FF 258 1.1 christos 259 1.1 christos [ crl_ext ] 260 1.1 christos 261 1.1 christos # CRL extensions. 262 1.1 christos # Only issuerAltName and authorityKeyIdentifier make any sense in a CRL. 263 1.1 christos 264 1.1 christos # issuerAltName=issuer:copy 265 1.1 christos authorityKeyIdentifier=keyid:always 266 1.1 christos 267 1.1 christos [ proxy_cert_ext ] 268 1.1 christos # These extensions should be added when creating a proxy certificate 269 1.1 christos 270 1.1 christos # This goes against PKIX guidelines but some CAs do it and some software 271 1.1 christos # requires this to avoid interpreting an end user certificate as a CA. 272 1.1 christos 273 1.1 christos basicConstraints=CA:FALSE 274 1.1 christos 275 1.1 christos # Here are some examples of the usage of nsCertType. If it is omitted 276 1.1 christos # the certificate can be used for anything *except* object signing. 277 1.1 christos 278 1.1 christos # This is OK for an SSL server. 279 1.1 christos # nsCertType = server 280 1.1 christos 281 1.1 christos # For an object signing certificate this would be used. 282 1.1 christos # nsCertType = objsign 283 1.1 christos 284 1.1 christos # For normal client use this is typical 285 1.1 christos # nsCertType = client, email 286 1.1 christos 287 1.1 christos # and for everything including object signing: 288 1.1 christos # nsCertType = client, email, objsign 289 1.1 christos 290 1.1 christos # This is typical in keyUsage for a client certificate. 291 1.1 christos # keyUsage = nonRepudiation, digitalSignature, keyEncipherment 292 1.1 christos 293 1.1 christos # This will be displayed in Netscape's comment listbox. 294 1.1 christos nsComment = "OpenSSL Generated Certificate" 295 1.1 christos 296 1.1 christos # PKIX recommendations harmless if included in all certificates. 297 1.1 christos subjectKeyIdentifier=hash 298 1.1 christos authorityKeyIdentifier=keyid,issuer 299 1.1 christos 300 1.1 christos # This stuff is for subjectAltName and issuerAltname. 301 1.1 christos # Import the email address. 302 1.1 christos # subjectAltName=email:copy 303 1.1 christos # An alternative to produce certificates that aren't 304 1.1 christos # deprecated according to PKIX. 305 1.1 christos # subjectAltName=email:move 306 1.1 christos 307 1.1 christos # Copy subject details 308 1.1 christos # issuerAltName=issuer:copy 309 1.1 christos 310 1.1 christos #nsCaRevocationUrl = http://www.domain.dom/ca-crl.pem 311 1.1 christos #nsBaseUrl 312 1.1 christos #nsRevocationUrl 313 1.1 christos #nsRenewalUrl 314 1.1 christos #nsCaPolicyUrl 315 1.1 christos #nsSslServerName 316 1.1 christos 317 1.1 christos # This really needs to be in place for it to be a proxy certificate. 318 1.1 christos proxyCertInfo=critical,language:id-ppl-anyLanguage,pathlen:3,policy:foo 319 1.1 christos 320 1.1 christos #################################################################### 321 1.1 christos [ tsa ] 322 1.1 christos 323 1.1 christos default_tsa = tsa_config1 # the default TSA section 324 1.1 christos 325 1.1 christos [ tsa_config1 ] 326 1.1 christos 327 1.1 christos # These are used by the TSA reply generation only. 328 1.1 christos dir = ./demoCA # TSA root directory 329 1.1 christos serial = $dir/tsaserial # The current serial number (mandatory) 330 1.1 christos crypto_device = builtin # OpenSSL engine to use for signing 331 1.1 christos signer_cert = $dir/tsacert.pem # The TSA signing certificate 332 1.1 christos # (optional) 333 1.1 christos certs = $dir/cacert.pem # Certificate chain to include in reply 334 1.1 christos # (optional) 335 1.1 christos signer_key = $dir/private/tsakey.pem # The TSA private key (optional) 336 1.1.1.2 christos signer_digest = sha256 # Signing digest to use. (Optional) 337 1.1 christos default_policy = tsa_policy1 # Policy if request did not specify it 338 1.1 christos # (optional) 339 1.1 christos other_policies = tsa_policy2, tsa_policy3 # acceptable policies (optional) 340 1.1.1.2 christos digests = sha1, sha256, sha384, sha512 # Acceptable message digests (mandatory) 341 1.1 christos accuracy = secs:1, millisecs:500, microsecs:100 # (optional) 342 1.1 christos clock_precision_digits = 0 # number of digits after dot. (optional) 343 1.1 christos ordering = yes # Is ordering defined for timestamps? 344 1.1 christos # (optional, default: no) 345 1.1 christos tsa_name = yes # Must the TSA name be included in the reply? 346 1.1 christos # (optional, default: no) 347 1.1 christos ess_cert_id_chain = no # Must the ESS cert id chain be included? 348 1.1 christos # (optional, default: no) 349 1.1.1.2 christos ess_cert_id_alg = sha1 # algorithm to compute certificate 350 1.1.1.2 christos # identifier (optional, default: sha1) 351