ca-and-certs.cnf 2.2 KB

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