openssl-0.9.6.cnf 7.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268
  1. # For use with easy-rsa version 2.0
  2. #
  3. # OpenSSL example configuration file.
  4. # This is mostly being used for generation of certificate requests.
  5. #
  6. # This definition stops the following lines choking if HOME isn't
  7. # defined.
  8. HOME = .
  9. RANDFILE = $ENV::HOME/.rnd
  10. # Extra OBJECT IDENTIFIER info:
  11. #oid_file = $ENV::HOME/.oid
  12. oid_section = new_oids
  13. # To use this configuration file with the "-extfile" option of the
  14. # "openssl x509" utility, name here the section containing the
  15. # X.509v3 extensions to use:
  16. # extensions =
  17. # (Alternatively, use a configuration file that has only
  18. # X.509v3 extensions in its main [= default] section.)
  19. [ new_oids ]
  20. # We can add new OIDs in here for use by 'ca' and 'req'.
  21. # Add a simple OID like this:
  22. # testoid1=1.2.3.4
  23. # Or use config file substitution like this:
  24. # testoid2=${testoid1}.5.6
  25. ####################################################################
  26. [ ca ]
  27. default_ca = CA_default # The default ca section
  28. ####################################################################
  29. [ CA_default ]
  30. dir = $ENV::KEY_DIR # Where everything is kept
  31. certs = $dir # Where the issued certs are kept
  32. crl_dir = $dir # Where the issued crl are kept
  33. database = $dir/index.txt # database index file.
  34. new_certs_dir = $dir # default place for new certs.
  35. certificate = $dir/ca.crt # The CA certificate
  36. serial = $dir/serial # The current serial number
  37. crl = $dir/crl.pem # The current CRL
  38. private_key = $dir/ca.key # The private key
  39. RANDFILE = $dir/.rand # private random number file
  40. x509_extensions = usr_cert # The extentions to add to the cert
  41. # Extensions to add to a CRL. Note: Netscape communicator chokes on V2 CRLs
  42. # so this is commented out by default to leave a V1 CRL.
  43. # crl_extensions = crl_ext
  44. default_days = 3650 # how long to certify for
  45. default_crl_days= 30 # how long before next CRL
  46. default_md = sha256 # which md to use.
  47. preserve = no # keep passed DN ordering
  48. # A few difference way of specifying how similar the request should look
  49. # For type CA, the listed attributes must be the same, and the optional
  50. # and supplied fields are just that :-)
  51. policy = policy_anything
  52. # For the CA policy
  53. [ policy_match ]
  54. countryName = match
  55. stateOrProvinceName = match
  56. organizationName = match
  57. organizationalUnitName = optional
  58. commonName = supplied
  59. emailAddress = optional
  60. # For the 'anything' policy
  61. # At this point in time, you must list all acceptable 'object'
  62. # types.
  63. [ policy_anything ]
  64. countryName = optional
  65. stateOrProvinceName = optional
  66. localityName = optional
  67. organizationName = optional
  68. organizationalUnitName = optional
  69. commonName = supplied
  70. emailAddress = optional
  71. ####################################################################
  72. [ req ]
  73. default_bits = $ENV::KEY_SIZE
  74. default_keyfile = privkey.pem
  75. default_md = sha256
  76. distinguished_name = req_distinguished_name
  77. attributes = req_attributes
  78. x509_extensions = v3_ca # The extentions to add to the self signed cert
  79. # Passwords for private keys if not present they will be prompted for
  80. # input_password = secret
  81. # output_password = secret
  82. # This sets a mask for permitted string types. There are several options.
  83. # default: PrintableString, T61String, BMPString.
  84. # pkix : PrintableString, BMPString.
  85. # utf8only: only UTF8Strings.
  86. # nombstr : PrintableString, T61String (no BMPStrings or UTF8Strings).
  87. # MASK:XXXX a literal mask value.
  88. # WARNING: current versions of Netscape crash on BMPStrings or UTF8Strings
  89. # so use this option with caution!
  90. string_mask = nombstr
  91. # req_extensions = v3_req # The extensions to add to a certificate request
  92. [ req_distinguished_name ]
  93. countryName = Country Name (2 letter code)
  94. countryName_default = $ENV::KEY_COUNTRY
  95. countryName_min = 2
  96. countryName_max = 2
  97. stateOrProvinceName = State or Province Name (full name)
  98. stateOrProvinceName_default = $ENV::KEY_PROVINCE
  99. localityName = Locality Name (eg, city)
  100. localityName_default = $ENV::KEY_CITY
  101. 0.organizationName = Organization Name (eg, company)
  102. 0.organizationName_default = $ENV::KEY_ORG
  103. # we can do this but it is not needed normally :-)
  104. #1.organizationName = Second Organization Name (eg, company)
  105. #1.organizationName_default = World Wide Web Pty Ltd
  106. organizationalUnitName = Organizational Unit Name (eg, section)
  107. #organizationalUnitName_default =
  108. commonName = Common Name (eg, your name or your server\'s hostname)
  109. commonName_max = 64
  110. emailAddress = Email Address
  111. emailAddress_default = $ENV::KEY_EMAIL
  112. emailAddress_max = 40
  113. # JY -- added for batch mode
  114. organizationalUnitName_default = $ENV::KEY_OU
  115. commonName_default = $ENV::KEY_CN
  116. # SET-ex3 = SET extension number 3
  117. [ req_attributes ]
  118. challengePassword = A challenge password
  119. challengePassword_min = 4
  120. challengePassword_max = 20
  121. unstructuredName = An optional company name
  122. [ usr_cert ]
  123. # These extensions are added when 'ca' signs a request.
  124. # This goes against PKIX guidelines but some CAs do it and some software
  125. # requires this to avoid interpreting an end user certificate as a CA.
  126. basicConstraints=CA:FALSE
  127. # Here are some examples of the usage of nsCertType. If it is omitted
  128. # the certificate can be used for anything *except* object signing.
  129. # This is OK for an SSL server.
  130. # nsCertType = server
  131. # For an object signing certificate this would be used.
  132. # nsCertType = objsign
  133. # For normal client use this is typical
  134. # nsCertType = client, email
  135. # and for everything including object signing:
  136. # nsCertType = client, email, objsign
  137. # This is typical in keyUsage for a client certificate.
  138. # keyUsage = nonRepudiation, digitalSignature, keyEncipherment
  139. # This will be displayed in Netscape's comment listbox.
  140. nsComment = "Easy-RSA Generated Certificate"
  141. # PKIX recommendations harmless if included in all certificates.
  142. subjectKeyIdentifier=hash
  143. authorityKeyIdentifier=keyid,issuer:always
  144. extendedKeyUsage=clientAuth
  145. keyUsage = digitalSignature
  146. # This stuff is for subjectAltName and issuerAltname.
  147. # Import the email address.
  148. # subjectAltName=email:copy
  149. subjectAltName=$ENV::KEY_ALTNAMES
  150. # Copy subject details
  151. # issuerAltName=issuer:copy
  152. #nsCaRevocationUrl = http://www.domain.dom/ca-crl.pem
  153. #nsBaseUrl
  154. #nsRevocationUrl
  155. #nsRenewalUrl
  156. #nsCaPolicyUrl
  157. #nsSslServerName
  158. [ server ]
  159. # JY ADDED -- Make a cert with nsCertType set to "server"
  160. basicConstraints=CA:FALSE
  161. nsCertType = server
  162. nsComment = "Easy-RSA Generated Server Certificate"
  163. subjectKeyIdentifier=hash
  164. authorityKeyIdentifier=keyid,issuer:always
  165. extendedKeyUsage=serverAuth
  166. keyUsage = digitalSignature, keyEncipherment
  167. subjectAltName=$ENV::KEY_ALTNAMES
  168. [ v3_req ]
  169. # Extensions to add to a certificate request
  170. basicConstraints = CA:FALSE
  171. keyUsage = nonRepudiation, digitalSignature, keyEncipherment
  172. [ v3_ca ]
  173. # Extensions for a typical CA
  174. # PKIX recommendation.
  175. subjectKeyIdentifier=hash
  176. authorityKeyIdentifier=keyid:always,issuer:always
  177. # This is what PKIX recommends but some broken software chokes on critical
  178. # extensions.
  179. #basicConstraints = critical,CA:true
  180. # So we do this instead.
  181. basicConstraints = CA:true
  182. # Key usage: this is typical for a CA certificate. However since it will
  183. # prevent it being used as an test self-signed certificate it is best
  184. # left out by default.
  185. # keyUsage = cRLSign, keyCertSign
  186. # Some might want this also
  187. # nsCertType = sslCA, emailCA
  188. # Include email address in subject alt name: another PKIX recommendation
  189. # subjectAltName=email:copy
  190. # Copy issuer details
  191. # issuerAltName=issuer:copy
  192. # DER hex encoding of an extension: beware experts only!
  193. # obj=DER:02:03
  194. # Where 'obj' is a standard or added object
  195. # You can even override a supported extension:
  196. # basicConstraints= critical, DER:30:03:01:01:FF
  197. [ crl_ext ]
  198. # CRL extensions.
  199. # Only issuerAltName and authorityKeyIdentifier make any sense in a CRL.
  200. # issuerAltName=issuer:copy
  201. authorityKeyIdentifier=keyid:always,issuer:always