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