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