ca.cnf 1.9 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677
  1. #
  2. # OpenSSL example configuration file for automated certificate creation.
  3. #
  4. # Comment out the next line to ignore configuration errors
  5. config_diagnostics = 1
  6. # This definition stops the following lines choking if HOME or CN
  7. # is undefined.
  8. HOME = .
  9. CN = "Not Defined"
  10. default_ca = ca
  11. ####################################################################
  12. [ req ]
  13. default_bits = 2048
  14. default_keyfile = privkey.pem
  15. # Don't prompt for fields: use those in section directly
  16. prompt = no
  17. distinguished_name = req_distinguished_name
  18. x509_extensions = v3_ca # The extensions to add to the self signed cert
  19. string_mask = utf8only
  20. # req_extensions = v3_req # The extensions to add to a certificate request
  21. [ req_distinguished_name ]
  22. countryName = UK
  23. organizationName = OpenSSL Group
  24. # Take CN from environment so it can come from a script.
  25. commonName = $ENV::CN
  26. [ usr_cert ]
  27. # These extensions are added when 'ca' signs a request for an end entity
  28. # certificate
  29. basicConstraints=critical, CA:FALSE
  30. keyUsage=critical, nonRepudiation, digitalSignature, keyEncipherment
  31. # PKIX recommendations harmless if included in all certificates.
  32. subjectKeyIdentifier=hash
  33. authorityKeyIdentifier=keyid
  34. [ dh_cert ]
  35. # These extensions are added when 'ca' signs a request for an end entity
  36. # DH certificate
  37. basicConstraints=critical, CA:FALSE
  38. keyUsage=critical, keyAgreement
  39. # PKIX recommendations harmless if included in all certificates.
  40. subjectKeyIdentifier=hash
  41. authorityKeyIdentifier=keyid
  42. [ codesign_cert ]
  43. # These extensions are added when 'ca' signs a request for a code-signing
  44. # end-entity certificate
  45. basicConstraints=CA:FALSE
  46. keyUsage=critical, digitalSignature
  47. extendedKeyUsage=codeSigning
  48. [ v3_ca ]
  49. # Extensions for a typical CA
  50. # PKIX recommendation.
  51. subjectKeyIdentifier=hash
  52. authorityKeyIdentifier=keyid:always
  53. basicConstraints = critical,CA:true
  54. keyUsage = critical, cRLSign, keyCertSign