Guest User

openssl.cnf

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