| 1 |
# |
| 2 |
# Based on the OpenSSL example configuration file. |
| 3 |
# This is mostly being used for generation of certificate requests. |
| 4 |
# |
| 5 |
|
| 6 |
# This definition stops the following lines choking if HOME isn't |
| 7 |
# defined. |
| 8 |
HOME = . |
| 9 |
RANDFILE = $ENV::HOME/.rnd |
| 10 |
|
| 11 |
#CRLDISTPT = [CRL Distribution Point; e.g., http://crl-list.base/w4edom-l4.base.crl] |
| 12 |
CRLDISTPT = http://www.samba.example.com/crls/CA-samba.example.com-crl.crl |
| 13 |
|
| 14 |
# Extra OBJECT IDENTIFIER info: |
| 15 |
oid_section = new_oids |
| 16 |
|
| 17 |
# To use this configuration file with the "-extfile" option of the |
| 18 |
# "openssl x509" utility, name here the section containing the |
| 19 |
# X.509v3 extensions to use: |
| 20 |
# extensions = |
| 21 |
# (Alternatively, use a configuration file that has only |
| 22 |
# X.509v3 extensions in its main [= default] section.) |
| 23 |
|
| 24 |
[ new_oids ] |
| 25 |
# Ordinarily, certificates must have this oid as an enhanced key usage in order for Windows to allow them to be used as a login credential |
| 26 |
scardLogin=1.3.6.1.4.1.311.20.2.2 |
| 27 |
# Used in a smart card login certificate's subject alternative name |
| 28 |
msUPN=1.3.6.1.4.1.311.20.2.3 |
| 29 |
# Ordinarily, certificates must have this oid as an enhanced key usage in order for Windows to allow them to be used to identify a domain controller |
| 30 |
msKDC=1.3.6.1.5.2.3.5 |
| 31 |
# Identifies the AD GUID |
| 32 |
msADGUID=1.3.6.1.4.1.311.25.1 |
| 33 |
|
| 34 |
#################################################################### |
| 35 |
[ ca ] |
| 36 |
default_ca = CA_default # The default ca section |
| 37 |
|
| 38 |
#################################################################### |
| 39 |
[ CA_default ] |
| 40 |
|
| 41 |
dir = CA-samba.example.com # Where everything is kept |
| 42 |
certs = $dir/_none_certs # Where the issued certs are kept |
| 43 |
crl_dir = $dir/_none_crl # Where the issued crl are kept |
| 44 |
database = $dir/Private/CA-samba.example.com-index.txt # database index file. |
| 45 |
unique_subject = yes # Set to 'no' to allow creation of |
| 46 |
# several certificates with same subject. |
| 47 |
new_certs_dir = $dir/NewCerts # default place for new certs. |
| 48 |
|
| 49 |
certificate = $dir/Public/CA-samba.example.com-cert.pem # The CA certificate |
| 50 |
serial = $dir/Private/CA-samba.example.com-serial.txt # The current serial number |
| 51 |
crlnumber = $dir/Private/CA-samba.example.com-crlnumber.txt # the current crl number |
| 52 |
# must be commented out to leave a V1 CRL |
| 53 |
|
| 54 |
#crl = $dir/Public/CA-samba.example.com-crl.pem # The current CRL |
| 55 |
crl = $dir/Public/CA-samba.example.com-crl.crl # The current CRL |
| 56 |
private_key = $dir/Private/CA-samba.example.com-private-key.pem # The private key |
| 57 |
RANDFILE = $dir/Private/CA-samba.example.com.rand # private random number file |
| 58 |
|
| 59 |
#x509_extensions = # The extensions to add to the cert |
| 60 |
x509_extensions = template_x509_extensions |
| 61 |
|
| 62 |
# Comment out the following two lines for the "traditional" |
| 63 |
# (and highly broken) format. |
| 64 |
name_opt = ca_default # Subject Name options |
| 65 |
cert_opt = ca_default # Certificate field options |
| 66 |
|
| 67 |
# Extension copying option: use with caution. |
| 68 |
# copy_extensions = copy |
| 69 |
|
| 70 |
# Extensions to add to a CRL. Note: Netscape communicator chokes on V2 CRLs |
| 71 |
# so this is commented out by default to leave a V1 CRL. |
| 72 |
# crlnumber must also be commented out to leave a V1 CRL. |
| 73 |
crl_extensions = crl_ext |
| 74 |
|
| 75 |
default_days = 1 # how long to certify for |
| 76 |
default_crl_days= 7300 # how long before next CRL |
| 77 |
default_md = sha256 # use public key default MD |
| 78 |
preserve = no # keep passed DN ordering |
| 79 |
|
| 80 |
# A few difference way of specifying how similar the request should look |
| 81 |
# For type CA, the listed attributes must be the same, and the optional |
| 82 |
# and supplied fields are just that :-) |
| 83 |
policy = policy_match |
| 84 |
|
| 85 |
# For the CA policy |
| 86 |
[ policy_match ] |
| 87 |
countryName = match |
| 88 |
stateOrProvinceName = match |
| 89 |
organizationName = match |
| 90 |
organizationalUnitName = optional |
| 91 |
commonName = supplied |
| 92 |
emailAddress = optional |
| 93 |
|
| 94 |
# For the 'anything' policy |
| 95 |
# At this point in time, you must list all acceptable 'object' |
| 96 |
# types. |
| 97 |
[ policy_anything ] |
| 98 |
countryName = match |
| 99 |
stateOrProvinceName = match |
| 100 |
localityName = match |
| 101 |
organizationName = match |
| 102 |
organizationalUnitName = match |
| 103 |
commonName = supplied |
| 104 |
emailAddress = supplied |
| 105 |
|
| 106 |
#################################################################### |
| 107 |
[ req ] |
| 108 |
default_bits = 8192 |
| 109 |
distinguished_name = req_distinguished_name |
| 110 |
attributes = req_attributes |
| 111 |
x509_extensions = v3_ca # The extensions to add to the self signed cert |
| 112 |
|
| 113 |
# Passwords for private keys if not present they will be prompted for |
| 114 |
# input_password = secret |
| 115 |
# output_password = secret |
| 116 |
|
| 117 |
# This sets a mask for permitted string types. There are several options. |
| 118 |
# default: PrintableString, T61String, BMPString. |
| 119 |
# pkix : PrintableString, BMPString (PKIX recommendation before 2004) |
| 120 |
# utf8only: only UTF8Strings (PKIX recommendation after 2004). |
| 121 |
# nombstr : PrintableString, T61String (no BMPStrings or UTF8Strings). |
| 122 |
# MASK:XXXX a literal mask value. |
| 123 |
# WARNING: ancient versions of Netscape crash on BMPStrings or UTF8Strings. |
| 124 |
string_mask = utf8only |
| 125 |
|
| 126 |
# req_extensions = v3_req # The extensions to add to a certificate request |
| 127 |
|
| 128 |
[ req_distinguished_name ] |
| 129 |
countryName = Country Name (2 letter code) |
| 130 |
countryName_default = US |
| 131 |
countryName_min = 2 |
| 132 |
countryName_max = 2 |
| 133 |
|
| 134 |
stateOrProvinceName = State or Province Name (full name) |
| 135 |
stateOrProvinceName_default = SambaState |
| 136 |
|
| 137 |
localityName = Locality Name (eg, city) |
| 138 |
localityName_default = SambaCity |
| 139 |
|
| 140 |
organizationName = Organization Name (eg, company) |
| 141 |
organizationName_default = SambaSelfTesting |
| 142 |
|
| 143 |
organizationalUnitName = Organizational Unit Name (eg, section) |
| 144 |
organizationalUnitName_default = CA Administration |
| 145 |
|
| 146 |
commonName = Common Name (eg, YOUR name) |
| 147 |
commonName_default = CA of samba.example.com |
| 148 |
commonName_max = 64 |
| 149 |
|
| 150 |
emailAddress = Email Address |
| 151 |
emailAddress_default = [email protected] |
| 152 |
emailAddress_max = 64 |
| 153 |
|
| 154 |
# SET-ex3 = SET extension number 3 |
| 155 |
|
| 156 |
[ req_attributes ] |
| 157 |
#challengePassword = A challenge password |
| 158 |
#challengePassword_min = 4 |
| 159 |
#challengePassword_max = 20 |
| 160 |
# |
| 161 |
#unstructuredName = An optional company name |
| 162 |
|
| 163 |
[ v3_req ] |
| 164 |
|
| 165 |
# Extensions to add to a certificate request |
| 166 |
|
| 167 |
basicConstraints = CA:FALSE |
| 168 |
keyUsage = nonRepudiation, digitalSignature, keyEncipherment |
| 169 |
|
| 170 |
[ v3_ca ] |
| 171 |
# Extensions for a typical CA |
| 172 |
# PKIX recommendation. |
| 173 |
subjectKeyIdentifier=hash |
| 174 |
authorityKeyIdentifier=keyid:always,issuer |
| 175 |
|
| 176 |
# This is what PKIX recommends but some broken software chokes on critical |
| 177 |
# extensions. |
| 178 |
#basicConstraints = critical,CA:true |
| 179 |
# So we do this instead. |
| 180 |
basicConstraints = CA:true |
| 181 |
|
| 182 |
# Key usage: this is typical for a CA certificate. |
| 183 |
keyUsage = cRLSign, keyCertSign |
| 184 |
|
| 185 |
crlDistributionPoints=URI:$CRLDISTPT |
| 186 |
|
| 187 |
# Some might want this also |
| 188 |
nsCertType = sslCA, emailCA |
| 189 |
|
| 190 |
# Include email address in subject alt name: another PKIX recommendation |
| 191 |
subjectAltName=email:copy |
| 192 |
# Copy issuer details |
| 193 |
issuerAltName=issuer:copy |
| 194 |
|
| 195 |
[ crl_ext ] |
| 196 |
# CRL extensions. |
| 197 |
# Only issuerAltName and authorityKeyIdentifier make any sense in a CRL. |
| 198 |
|
| 199 |
issuerAltName=issuer:copy |
| 200 |
authorityKeyIdentifier=keyid:always |
| 201 |
|
| 202 |
[ template_x509_extensions ] |
| 203 |
|