openssl.conf 2.8 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485
  1. [ ca ]
  2. default_ca = defaultCA
  3. [ defaultCA ]
  4. dir = . # Where everything is kept
  5. new_certs_dir = $ENV::BIN # Default place for new certs
  6. certificate = $ENV::BIN/ca.crt # The CA certificate
  7. database = $ENV::BIN/ca.db # Database index file
  8. serial = $ENV::BIN/ca.srl # The current serial number
  9. private_key = $ENV::BIN/ca.key # The private key
  10. default_crl_days = 7 # How long before next CRL
  11. default_days = 3650 # How long to certify for
  12. default_md = default # Which md to use
  13. policy = policyMatch
  14. x509_extensions = client
  15. copy_extensions = copy
  16. name_opt = ca_default
  17. cert_opt = ca_default
  18. [ policyMatch ]
  19. countryName = supplied
  20. stateOrProvinceName = supplied
  21. organizationName = supplied
  22. organizationalUnitName = supplied
  23. commonName = supplied
  24. emailAddress = supplied
  25. # Keygen, requests and self-signed certs
  26. [ req ]
  27. default_bits = 2048
  28. default_keyfile = $ENV::BIN/ca.key
  29. default_md = default
  30. prompt = no
  31. distinguished_name = distinguishedName
  32. x509_extensions = selfExtensions # Extensions to add to self-signed cert
  33. req_extensions = reqExtensions # Extensions for certificate request
  34. # [ reqAttributes ]
  35. [ distinguishedName ]
  36. countryName = US
  37. stateOrProvinceName = Washington
  38. localityName = Seattle
  39. 0.organizationName = Example.com
  40. organizationalUnitName = Licensing
  41. commonName = example.com
  42. emailAddress = licensing@example.com
  43. [ caExtensions ]
  44. basicConstraints = CA:true
  45. subjectKeyIdentifier = hash
  46. authorityKeyIdentifier = keyid:always, issuer:always
  47. keyUsage = cRLSign, keyCertSign, digitalSignature, keyEncipherment
  48. [ selfExtensions ]
  49. basicConstraints = CA:true
  50. subjectKeyIdentifier = hash
  51. authorityKeyIdentifier = keyid:always, issuer:always
  52. [ client ]
  53. basicConstraints = CA:FALSE
  54. subjectKeyIdentifier = hash
  55. authorityKeyIdentifier = keyid, issuer:always
  56. keyUsage = digitalSignature, keyEncipherment
  57. extendedKeyUsage = clientAuth
  58. [ server ]
  59. basicConstraints = CA:FALSE
  60. subjectKeyIdentifier = hash
  61. authorityKeyIdentifier = keyid
  62. keyUsage = nonRepudiation, digitalSignature, keyEncipherment
  63. extendedKeyUsage = clientAuth
  64. nsComment = "device"
  65. #nsCertType
  66. [ reqExtensions ]
  67. basicConstraints = CA:FALSE
  68. subjectKeyIdentifier = hash
  69. keyUsage = nonRepudiation, digitalSignature, keyEncipherment