openssl.cnf 4.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213
  1. HOME = .
  2. RANDFILE = $ENV::HOME/.rnd
  3. oid_section = new_oids
  4. [ new_oids ]
  5. tsa_policy1 = 1.2.3.4.1
  6. tsa_policy2 = 1.2.3.4.5.6
  7. tsa_policy3 = 1.2.3.4.5.7
  8. [ ca ]
  9. default_ca = CA_default # The default ca section
  10. [ CA_default ]
  11. dir = ./demoCA # Where everything is kept
  12. certs = $dir/certs # Where the issued certs are kept
  13. crl_dir = $dir/crl # Where the issued crl are kept
  14. database = $dir/index.txt # database index file.
  15. # several ctificates with same subject.
  16. new_certs_dir = $dir/newcerts # default place for new certs.
  17. certificate = $dir/cacert.pem # The CA certificate
  18. serial = $dir/serial # The current serial number
  19. crlnumber = $dir/crlnumber # the current crl number
  20. # must be commented out to leave a V1 CRL
  21. crl = $dir/crl.pem # The current CRL
  22. private_key = $dir/private/cakey.pem# The private key
  23. RANDFILE = $dir/private/.rand # private random number file
  24. x509_extensions = usr_cert # The extentions to add to the cert
  25. name_opt = ca_default # Subject Name options
  26. cert_opt = ca_default # Certificate field options
  27. copy_extensions = copy
  28. default_days = 365 # how long to certify for
  29. default_crl_days= 30 # how long before next CRL
  30. default_md = default # use public key default MD
  31. preserve = no # keep passed DN ordering
  32. policy = policy_match
  33. [ policy_match ]
  34. countryName = match
  35. stateOrProvinceName = match
  36. organizationName = match
  37. organizationalUnitName = optional
  38. commonName = supplied
  39. emailAddress = optional
  40. [ policy_anything ]
  41. countryName = optional
  42. stateOrProvinceName = optional
  43. localityName = optional
  44. organizationName = optional
  45. organizationalUnitName = optional
  46. commonName = supplied
  47. emailAddress = optional
  48. [ req ]
  49. default_bits = 2048
  50. default_keyfile = privkey.pem
  51. distinguished_name = req_distinguished_name
  52. attributes = req_attributes
  53. x509_extensions = v3_ca # The extentions to add to the self signed cert
  54. string_mask = utf8only
  55. req_extensions = v3_req # The extensions to add to a certificate request
  56. [ req_distinguished_name ]
  57. countryName = Country Name (2 letter code)
  58. countryName_default = AU
  59. countryName_min = 2
  60. countryName_max = 2
  61. stateOrProvinceName = State or Province Name (full name)
  62. stateOrProvinceName_default = Some-State
  63. localityName = Locality Name (eg, city)
  64. 0.organizationName = Organization Name (eg, company)
  65. 0.organizationName_default = Internet Widgits Pty Ltd
  66. organizationalUnitName = Organizational Unit Name (eg, section)
  67. commonName = Common Name (e.g. server FQDN or YOUR name)
  68. commonName_max = 64
  69. emailAddress = Email Address
  70. emailAddress_max = 64
  71. [ req_attributes ]
  72. challengePassword = A challenge password
  73. challengePassword_min = 4
  74. challengePassword_max = 20
  75. unstructuredName = An optional company name
  76. [ usr_cert ]
  77. basicConstraints=CA:FALSE
  78. nsComment = "OpenSSL Generated Certificate"
  79. subjectKeyIdentifier=hash
  80. authorityKeyIdentifier=keyid,issuer
  81. [ v3_req ]
  82. basicConstraints = CA:FALSE
  83. keyUsage = nonRepudiation, digitalSignature, keyEncipherment
  84. subjectAltName = @alt_names
  85. [ alt_names ]
  86. DNS.1 = localhost
  87. DNS.2 = *.ronething.cn
  88. DNS.3 = *.ronething.com
  89. [ v3_ca ]
  90. subjectKeyIdentifier=hash
  91. authorityKeyIdentifier=keyid:always,issuer
  92. basicConstraints = CA:true
  93. [ crl_ext ]
  94. authorityKeyIdentifier=keyid:always
  95. [ proxy_cert_ext ]
  96. basicConstraints=CA:FALSE
  97. nsComment = "OpenSSL Generated Certificate"
  98. subjectKeyIdentifier=hash
  99. authorityKeyIdentifier=keyid,issuer
  100. proxyCertInfo=critical,language:id-ppl-anyLanguage,pathlen:3,policy:foo
  101. [ tsa ]
  102. default_tsa = tsa_config1 # the default TSA section
  103. [ tsa_config1 ]
  104. dir = ./demoCA # TSA root directory
  105. serial = $dir/tsaserial # The current serial number (mandatory)
  106. crypto_device = builtin # OpenSSL engine to use for signing
  107. signer_cert = $dir/tsacert.pem # The TSA signing certificate
  108. # (optional)
  109. certs = $dir/cacert.pem # Certificate chain to include in reply
  110. # (optional)
  111. signer_key = $dir/private/tsakey.pem # The TSA private key (optional)
  112. default_policy = tsa_policy1 # Policy if request did not specify it
  113. # (optional)
  114. other_policies = tsa_policy2, tsa_policy3 # acceptable policies (optional)
  115. digests = md5, sha1 # Acceptable message digests (mandatory)
  116. accuracy = secs:1, millisecs:500, microsecs:100 # (optional)
  117. clock_precision_digits = 0 # number of digits after dot. (optional)
  118. ordering = yes # Is ordering defined for timestamps?
  119. # (optional, default: no)
  120. tsa_name = yes # Must the TSA name be included in the reply?
  121. # (optional, default: no)
  122. ess_cert_id_chain = no # Must the ESS cert id chain be included?
  123. # (optional, default: no)