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