openssl2.cnf 2.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146
  1. HOME = .
  2. RANDFILE = $ENV::HOME/.rnd
  3. oid_section = new_oids
  4. [ new_oids ]
  5. [ ca ]
  6. default_ca = CA_default
  7. [ CA_default ]
  8. dir = ./test-ca
  9. certs = $dir/certs
  10. crl_dir = $dir/crl
  11. database = $dir/index.txt
  12. unique_subject = no
  13. new_certs_dir = $dir/newcerts
  14. certificate = $dir/cacert.pem
  15. serial = $dir/serial
  16. crlnumber = $dir/crlnumber
  17. crl = $dir/crl.pem
  18. private_key = $dir/private/cakey.pem
  19. RANDFILE = $dir/private/.rand
  20. x509_extensions = usr_cert
  21. name_opt = ca_default
  22. cert_opt = ca_default
  23. default_days = 365
  24. default_crl_days= 30
  25. default_md = default
  26. preserve = no
  27. policy = policy_match
  28. [ policy_match ]
  29. countryName = match
  30. stateOrProvinceName = optional
  31. organizationName = match
  32. organizationalUnitName = optional
  33. commonName = supplied
  34. emailAddress = optional
  35. [ policy_anything ]
  36. countryName = optional
  37. stateOrProvinceName = optional
  38. localityName = optional
  39. organizationName = optional
  40. organizationalUnitName = optional
  41. commonName = supplied
  42. emailAddress = optional
  43. [ req ]
  44. default_bits = 1024
  45. default_keyfile = privkey.pem
  46. distinguished_name = req_distinguished_name
  47. attributes = req_attributes
  48. x509_extensions = v3_ca
  49. string_mask = utf8only
  50. [ req_distinguished_name ]
  51. countryName = Country Name (2 letter code)
  52. countryName_default = FI
  53. countryName_min = 2
  54. countryName_max = 2
  55. localityName = Locality Name (eg, city)
  56. localityName_default = Tuusula
  57. 0.organizationName = Organization Name (eg, company)
  58. 0.organizationName_default = w1.fi
  59. commonName = Common Name (e.g. server FQDN or YOUR name)
  60. #@CN@
  61. commonName_max = 64
  62. emailAddress = Email Address
  63. emailAddress_max = 64
  64. ##0.subjectAltName = dNSName:server.w1.fi
  65. [ req_attributes ]
  66. [ usr_cert ]
  67. basicConstraints=CA:FALSE
  68. subjectKeyIdentifier=hash
  69. authorityKeyIdentifier=keyid,issuer
  70. authorityInfoAccess = OCSP;URI:http://server.w1.fi:8888/
  71. [ v3_req ]
  72. basicConstraints = CA:FALSE
  73. keyUsage = nonRepudiation, digitalSignature, keyEncipherment
  74. subjectAltName=DNS:example.com,DNS:another.example.com
  75. [ v3_ca ]
  76. subjectKeyIdentifier=hash
  77. authorityKeyIdentifier=keyid:always,issuer
  78. basicConstraints = CA:true
  79. [ crl_ext ]
  80. authorityKeyIdentifier=keyid:always
  81. [ v3_OCSP ]
  82. basicConstraints = CA:FALSE
  83. keyUsage = nonRepudiation, digitalSignature, keyEncipherment
  84. extendedKeyUsage = OCSPSigning
  85. [ ext_client ]
  86. basicConstraints=CA:FALSE
  87. subjectKeyIdentifier=hash
  88. authorityKeyIdentifier=keyid,issuer
  89. authorityInfoAccess = OCSP;URI:http://server.w1.fi:8888/
  90. #@ALTNAME@
  91. extendedKeyUsage = clientAuth
  92. [ ext_server ]
  93. basicConstraints=CA:FALSE
  94. subjectKeyIdentifier=hash
  95. authorityKeyIdentifier=keyid,issuer
  96. authorityInfoAccess = OCSP;URI:http://server.w1.fi:8888/
  97. #@ALTNAME@
  98. extendedKeyUsage = serverAuth
  99. [ ext_client_server ]
  100. basicConstraints=CA:FALSE
  101. subjectKeyIdentifier=hash
  102. authorityKeyIdentifier=keyid,issuer
  103. authorityInfoAccess = OCSP;URI:http://server.w1.fi:8888/
  104. #@ALTNAME@
  105. extendedKeyUsage = clientAuth, serverAuth