ca-and-certs.cnf 2.1 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586
  1. CN2 = Brother 2
  2. ####################################################################
  3. [ req ]
  4. distinguished_name = req_distinguished_name
  5. encrypt_rsa_key = no
  6. default_md = sha1
  7. [ req_distinguished_name ]
  8. countryName = Country Name (2 letter code)
  9. countryName_value = AU
  10. organizationName = Organization Name (eg, company)
  11. organizationName_value = Dodgy Brothers
  12. commonName = Common Name (eg, YOUR name)
  13. commonName_value = Dodgy CA
  14. ####################################################################
  15. [ userreq ]
  16. distinguished_name = user_dn
  17. encrypt_rsa_key = no
  18. default_md = sha256
  19. prompt = no
  20. [ user_dn ]
  21. countryName = AU
  22. organizationName = Dodgy Brothers
  23. 0.commonName = Brother 1
  24. 1.commonName = $ENV::CN2
  25. [ v3_ee ]
  26. subjectKeyIdentifier = hash
  27. authorityKeyIdentifier = keyid,issuer:always
  28. basicConstraints = CA:false
  29. keyUsage = nonRepudiation, digitalSignature, keyEncipherment
  30. [ v3_ee_dsa ]
  31. subjectKeyIdentifier = hash
  32. authorityKeyIdentifier = keyid:always
  33. basicConstraints = CA:false
  34. keyUsage = nonRepudiation, digitalSignature
  35. [ v3_ee_ec ]
  36. subjectKeyIdentifier = hash
  37. authorityKeyIdentifier = keyid:always
  38. basicConstraints = CA:false
  39. keyUsage = nonRepudiation, digitalSignature, keyAgreement
  40. ####################################################################
  41. [ ca ]
  42. default_ca = CA_default
  43. [ CA_default ]
  44. dir = ./demoCA
  45. certs = $dir/certs
  46. crl_dir = $dir/crl
  47. database = $dir/index.txt
  48. new_certs_dir = $dir/newcerts
  49. certificate = $dir/cacert.pem
  50. serial = $dir/serial
  51. crl = $dir/crl.pem
  52. private_key = $dir/private/cakey.pem
  53. x509_extensions = v3_ca
  54. name_opt = ca_default
  55. cert_opt = ca_default
  56. default_days = 365
  57. default_crl_days= 30
  58. default_md = sha1
  59. preserve = no
  60. policy = policy_anything
  61. [ policy_anything ]
  62. countryName = optional
  63. stateOrProvinceName = optional
  64. localityName = optional
  65. organizationName = optional
  66. organizationalUnitName = optional
  67. commonName = supplied
  68. emailAddress = optional
  69. [ v3_ca ]
  70. subjectKeyIdentifier = hash
  71. authorityKeyIdentifier = keyid:always,issuer:always
  72. basicConstraints = critical,CA:true,pathlen:1
  73. keyUsage = cRLSign, keyCertSign
  74. issuerAltName = issuer:copy