openssl.cnf 7.0 KB

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