certs.cnf 1.8 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768
  1. ID=1
  2. CA_DIR=out
  3. [ca]
  4. default_ca = ca_settings
  5. [ca_settings]
  6. dir = ${ENV::CA_DIR}
  7. database = $dir/${ENV::ID}-index.txt
  8. new_certs_dir = $dir
  9. serial = $dir/${ENV::ID}-serial
  10. certificate = $dir/${ENV::ID}.pem
  11. private_key = $dir/${ENV::ID}.key
  12. RANDFILE = $dir/rand
  13. default_md = sha256
  14. default_days = 3650
  15. policy = policy_anything
  16. preserve = no
  17. [policy_anything]
  18. # Default signing policy
  19. countryName = optional
  20. stateOrProvinceName = optional
  21. localityName = optional
  22. organizationName = optional
  23. organizationalUnitName = optional
  24. commonName = supplied
  25. emailAddress = optional
  26. [req]
  27. default_bits = 2048
  28. default_md = sha256
  29. string_mask = utf8only
  30. distinguished_name = req_env_dn
  31. prompt = no
  32. [user_cert]
  33. basicConstraints = CA:FALSE
  34. nsCertType = client
  35. nsComment = "OpenSSL Generated Client Certificate"
  36. subjectKeyIdentifier = hash
  37. authorityKeyIdentifier = keyid,issuer
  38. keyUsage = critical, nonRepudiation, digitalSignature, keyEncipherment
  39. extendedKeyUsage = clientAuth, emailProtection
  40. [server_cert]
  41. basicConstraints = CA:FALSE
  42. nsCertType = server
  43. nsComment = "OpenSSL Generated Server Certificate"
  44. subjectKeyIdentifier = hash
  45. authorityKeyIdentifier = keyid,issuer:always
  46. keyUsage = critical, digitalSignature, keyEncipherment
  47. extendedKeyUsage = serverAuth
  48. [ca_cert]
  49. subjectKeyIdentifier = hash
  50. authorityKeyIdentifier = keyid:always,issuer
  51. basicConstraints = critical, CA:true
  52. keyUsage = critical, digitalSignature, cRLSign, keyCertSign
  53. [ca_intermediate_cert]
  54. subjectKeyIdentifier = hash
  55. authorityKeyIdentifier = keyid:always,issuer
  56. basicConstraints = critical, CA:true, pathlen:0
  57. keyUsage = critical, digitalSignature, cRLSign, keyCertSign
  58. [req_env_dn]
  59. commonName = ${ENV::COMMON_NAME}