1############################################################### 2# 3# Licensed to the Apache Software Foundation (ASF) under one 4# or more contributor license agreements. See the NOTICE file 5# distributed with this work for additional information 6# regarding copyright ownership. The ASF licenses this file 7# to you under the Apache License, Version 2.0 (the 8# "License"); you may not use this file except in compliance 9# with the License. You may obtain a copy of the License at 10# 11# http://www.apache.org/licenses/LICENSE-2.0 12# 13# Unless required by applicable law or agreed to in writing, 14# software distributed under the License is distributed on an 15# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 16# KIND, either express or implied. See the License for the 17# specific language governing permissions and limitations 18# under the License. 19# 20############################################################### 21 22# 23# OpenSSL example configuration file. 24# This is mostly being used for generation of certificate requests. 25# 26 27# This definition stops the following lines choking if HOME isn't 28# defined. 29HOME = . 30RANDFILE = $ENV::HOME/.rnd 31 32# Extra OBJECT IDENTIFIER info: 33#oid_file = $ENV::HOME/.oid 34oid_section = new_oids 35 36# To use this configuration file with the "-extfile" option of the 37# "openssl x509" utility, name here the section containing the 38# X.509v3 extensions to use: 39# extensions = 40# (Alternatively, use a configuration file that has only 41# X.509v3 extensions in its main [= default] section.) 42 43[ new_oids ] 44 45# We can add new OIDs in here for use by 'ca' and 'req'. 46# Add a simple OID like this: 47# testoid1=1.2.3.4 48# Or use config file substitution like this: 49# testoid2=${testoid1}.5.6 50 51#################################################################### 52[ ca ] 53default_ca = CA_default # The default ca section 54 55#################################################################### 56[ CA_default ] 57 58dir = ./demoCA # Where everything is kept 59certs = $dir/certs # Where the issued certs are kept 60crl_dir = $dir/crl # Where the issued crl are kept 61database = $dir/index.txt # database index file. 62#unique_subject = no # Set to 'no' to allow creation of 63 # several ctificates with same subject. 64new_certs_dir = $dir/newcerts # default place for new certs. 65 66certificate = $dir/cacert.pem # The CA certificate 67serial = $dir/serial # The current serial number 68crlnumber = $dir/crlnumber # the current crl number 69 # must be commented out to leave a V1 CRL 70crl = $dir/crl.pem # The current CRL 71private_key = $dir/private/cakey.pem # The private key 72RANDFILE = $dir/private/.rand # private random number file 73 74x509_extensions = usr_cert # The extentions to add to the cert 75 76# Comment out the following two lines for the "traditional" 77# (and highly broken) format. 78name_opt = ca_default # Subject Name options 79cert_opt = ca_default # Certificate field options 80 81# Extension copying option: use with caution. 82# copy_extensions = copy 83 84# Extensions to add to a CRL. Note: Netscape communicator chokes on V2 CRLs 85# so this is commented out by default to leave a V1 CRL. 86# crlnumber must also be commented out to leave a V1 CRL. 87# crl_extensions = crl_ext 88 89default_days = 365 # how long to certify for 90default_crl_days= 30 # how long before next CRL 91default_md = sha1 # which md to use. 92preserve = no # keep passed DN ordering 93 94# A few difference way of specifying how similar the request should look 95# For type CA, the listed attributes must be the same, and the optional 96# and supplied fields are just that :-) 97policy = policy_match 98 99# For the CA policy 100[ policy_match ] 101countryName = match 102stateOrProvinceName = match 103organizationName = match 104organizationalUnitName = optional 105commonName = supplied 106emailAddress = optional 107 108# For the 'anything' policy 109# At this point in time, you must list all acceptable 'object' 110# types. 111[ policy_anything ] 112countryName = optional 113stateOrProvinceName = optional 114localityName = optional 115organizationName = optional 116organizationalUnitName = optional 117commonName = supplied 118emailAddress = optional 119 120#################################################################### 121[ req ] 122default_bits = 1024 123default_keyfile = privkey.pem 124distinguished_name = req_distinguished_name 125attributes = req_attributes 126x509_extensions = v3_ca # The extentions to add to the self signed cert 127utf8 = yes 128# Passwords for private keys if not present they will be prompted for 129# input_password = secret 130# output_password = secret 131 132# This sets a mask for permitted string types. There are several options. 133# default: PrintableString, T61String, BMPString. 134# pkix : PrintableString, BMPString. 135# utf8only: only UTF8Strings. 136# nombstr : PrintableString, T61String (no BMPStrings or UTF8Strings). 137# MASK:XXXX a literal mask value. 138# WARNING: current versions of Netscape crash on BMPStrings or UTF8Strings 139# so use this option with caution! 140string_mask =pkix 141 142# req_extensions = v3_req # The extensions to add to a certificate request 143 144[ req_distinguished_name ] 145countryName = Country Name (2 letter code) 146countryName_default = DE 147countryName_min = 2 148countryName_max = 2 149 150stateOrProvinceName = State or Province Name (full name) 151stateOrProvinceName_default = Hamburg 152 153localityName = Locality Name (eg, city) 154 1550.organizationName = Organization Name (eg, company) 1560.organizationName_default = OpenOffice.org 157 158# we can do this but it is not needed normally :-) 159#1.organizationName = Second Organization Name (eg, company) 160#1.organizationName_default = World Wide Web Pty Ltd 161 162organizationalUnitName = Organizational Unit Name (eg, section) 163organizationalUnitName_default = Development 164 165commonName = Common Name (eg, YOUR name) 166commonName_max = 64 167commonName_default =User 14 \",middle quote 168 169emailAddress = Email Address 170emailAddress_max = 64 171 172# SET-ex3 = SET extension number 3 173 174[ req_attributes ] 175challengePassword = A challenge password 176challengePassword_min = 4 177challengePassword_max = 20 178 179unstructuredName = An optional company name 180 181[ usr_cert ] 182 183# These extensions are added when 'ca' signs a request. 184#authorityInfoAccess = OCSP;URI:http://localhost:8888/ 185 186# This is typical in keyUsage for a client certificate. 187keyUsage = nonRepudiation, digitalSignature, keyEncipherment 188 189# This will be displayed in Netscape's comment listbox. 190#nsComment = "OpenSSL Generated Certificate" 191 192# PKIX recommendations harmless if included in all certificates. 193subjectKeyIdentifier=hash 194authorityKeyIdentifier=keyid,issuer 195 196# This stuff is for subjectAltName and issuerAltname. 197# Import the email address. 198# subjectAltName=email:copy 199# An alternative to produce certificates that aren't 200# deprecated according to PKIX. 201# subjectAltName=email:move 202subjectAltName=DNS:alt.openoffice.org,IP:192.168.7.1,IP:13::17,email:my@other.address,RID:1.2.3.4,otherName:1.2.3.4;UTF8:some other identifier,dirName:dir_sect,URI:http://my.url.here/ 203# Copy subject details 204# issuerAltName=issuer:copy 205 206 207[dir_sect] 208C=DE 209O=OpenOffice.org 210OU=Development 211CN=User 32 Root 11 212 213[ v3_req ] 214 215# Extensions to add to a certificate request 216 217basicConstraints = CA:FALSE 218keyUsage = nonRepudiation, digitalSignature, keyEncipherment 219#authorityInfoAccess = OCSP;URI:http://localhost:8888/ 220 221[ v3_ca ] 222 223 224# Extensions for a typical CA 225 226 227# PKIX recommendation. 228 229subjectKeyIdentifier=hash 230 231authorityKeyIdentifier=keyid:always,issuer:always 232 233#authorityInfoAccess = OCSP;URI:http://localhost:8888 234#crlDistributionPoints=URI:http://localhost:8901/demoCA/crl/Root_7.crl 235# This is what PKIX recommends but some broken software chokes on critical 236# extensions. 237#basicConstraints = critical,CA:true 238# So we do this instead. 239basicConstraints = critical, CA:true 240 241# Key usage: this is typical for a CA certificate. However since it will 242# prevent it being used as an test self-signed certificate it is best 243# left out by default. 244# keyUsage = cRLSign, keyCertSign 245 246# Some might want this also 247# nsCertType = sslCA, emailCA 248 249# Include email address in subject alt name: another PKIX recommendation 250# subjectAltName=email:copy 251# Copy issuer details 252# issuerAltName=issuer:copy 253 254# DER hex encoding of an extension: beware experts only! 255# obj=DER:02:03 256# Where 'obj' is a standard or added object 257# You can even override a supported extension: 258# basicConstraints= critical, DER:30:03:01:01:FF 259 260[ crl_ext ] 261 262# CRL extensions. 263# Only issuerAltName and authorityKeyIdentifier make any sense in a CRL. 264 265# issuerAltName=issuer:copy 266authorityKeyIdentifier=keyid:always,issuer:always 267 268[ proxy_cert_ext ] 269# These extensions should be added when creating a proxy certificate 270 271# This goes against PKIX guidelines but some CAs do it and some software 272# requires this to avoid interpreting an end user certificate as a CA. 273 274basicConstraints=CA:FALSE 275 276# Here are some examples of the usage of nsCertType. If it is omitted 277# the certificate can be used for anything *except* object signing. 278 279# This is OK for an SSL server. 280# nsCertType = server 281 282# For an object signing certificate this would be used. 283# nsCertType = objsign 284 285# For normal client use this is typical 286# nsCertType = client, email 287 288# and for everything including object signing: 289# nsCertType = client, email, objsign 290 291# This is typical in keyUsage for a client certificate. 292# keyUsage = nonRepudiation, digitalSignature, keyEncipherment 293 294# This will be displayed in Netscape's comment listbox. 295nsComment = "OpenSSL Generated Certificate" 296 297# PKIX recommendations harmless if included in all certificates. 298subjectKeyIdentifier=hash 299authorityKeyIdentifier=keyid,issuer:always 300 301# This stuff is for subjectAltName and issuerAltname. 302# Import the email address. 303# subjectAltName=email:copy 304# An alternative to produce certificates that aren't 305# deprecated according to PKIX. 306# subjectAltName=email:move 307 308# Copy subject details 309# issuerAltName=issuer:copy 310 311#nsCaRevocationUrl = http://www.domain.dom/ca-crl.pem 312#nsBaseUrl 313#nsRevocationUrl 314#nsRenewalUrl 315#nsCaPolicyUrl 316#nsSslServerName 317 318# This really needs to be in place for it to be a proxy certificate. 319proxyCertInfo=critical,language:id-ppl-anyLanguage,pathlen:3,policy:foo 320