intermediate.cnf 2.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596
  1. SAN = "email:copy"
  2. KU = "nonRepudiation, digitalSignature, keyEncipherment"
  3. ICA = "IntermediateCA"
  4. [ ca ]
  5. # `man ca`
  6. default_ca = CA_default
  7. [ CA_default ]
  8. # Directory and file locations.
  9. dir = /etc/ssl/certs
  10. certs = $dir
  11. crl_dir = /tmp
  12. new_certs_dir = $dir
  13. database = /tmp/index.txt
  14. serial = /tmp/serial
  15. RANDFILE = /tmp/rand
  16. # The intermediate key and intermediate certificate.
  17. private_key = $dir/${ENV::ICA}.key
  18. certificate = $dir/${ENV::ICA}.crt
  19. # For certificate revocation lists.
  20. crlnumber = /tmp/crlnumber
  21. crl = /tmp/${ENV::ICA}.crl
  22. crl_extensions = crl_ext
  23. default_crl_days = 30
  24. # SHA-1 is deprecated, so use SHA-2 instead.
  25. default_md = sha256
  26. name_opt = ca_default
  27. cert_opt = ca_default
  28. default_days = 375
  29. preserve = no
  30. policy = policy_loose
  31. [ policy_loose ]
  32. # Allow the intermediate CA to sign a more diverse range of certificates.
  33. # See the POLICY FORMAT section of the `ca` man page.
  34. countryName = optional
  35. stateOrProvinceName = optional
  36. localityName = optional
  37. organizationName = optional
  38. organizationalUnitName = optional
  39. commonName = supplied
  40. emailAddress = optional
  41. [ req ]
  42. # Options for the `req` tool (`man req`).
  43. default_bits = 2048
  44. distinguished_name = req_distinguished_name
  45. string_mask = utf8only
  46. # SHA-1 is deprecated, so use SHA-2 instead.
  47. default_md = sha256
  48. # Extension to add when the -x509 option is used.
  49. x509_extensions = v3_ca
  50. [ req_distinguished_name ]
  51. # See <https://en.wikipedia.org/wiki/Certificate_signing_request>.
  52. countryName = Country Name (2 letter code)
  53. stateOrProvinceName = State or Province Name
  54. localityName = Locality Name
  55. 0.organizationName = Organization Name
  56. organizationalUnitName = Organizational Unit Name
  57. commonName = Common Name
  58. emailAddress = Email Address
  59. [ v3_ca ]
  60. # Extensions for a typical CA (`man x509v3_config`).
  61. subjectKeyIdentifier = hash
  62. authorityKeyIdentifier = keyid:always,issuer
  63. basicConstraints = critical, CA:true
  64. keyUsage = critical, digitalSignature, cRLSign, keyCertSign
  65. [ v3_intermediate_ca ]
  66. # Extensions for a typical intermediate CA (`man x509v3_config`).
  67. subjectKeyIdentifier = hash
  68. authorityKeyIdentifier = keyid:always,issuer
  69. basicConstraints = critical, CA:true, pathlen:0
  70. keyUsage = critical, digitalSignature, cRLSign, keyCertSign
  71. [ crl_ext ]
  72. # Extension for CRLs (`man x509v3_config`).
  73. authorityKeyIdentifier=keyid:always
  74. [smime]
  75. # Extension for S/MIME certificates (`man smime`).
  76. basicConstraints = CA:FALSE
  77. keyUsage = ${ENV::KU}
  78. subjectKeyIdentifier = hash
  79. authorityKeyIdentifier = keyid,issuer
  80. subjectAltName = ${ENV::SAN}
  81. extendedKeyUsage = emailProtection