ca.cnf 2.5 KB

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