openssl.cnf 4.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139
  1. # Heavily borrowed from EasyRSA 3, for use with OpenSSL 1.0.*
  2. ####################################################################
  3. [ ca ]
  4. default_ca = CA_default # The default ca section
  5. ####################################################################
  6. [ CA_default ]
  7. dir = sample-ca # Where everything is kept
  8. certs = $dir # Where the issued certs are kept
  9. crl_dir = $dir # Where the issued crl are kept
  10. database = $dir/index.txt # database index file.
  11. new_certs_dir = $dir # default place for new certs.
  12. certificate = $dir/ca.crt # The CA certificate
  13. serial = $dir/serial # The current serial number
  14. crl = $dir/crl.pem # The current CRL
  15. private_key = $dir/ca.key # The private key
  16. RANDFILE = $dir/.rand # private random number file
  17. x509_extensions = basic_exts # The extentions to add to the cert
  18. # This allows a V2 CRL. Ancient browsers don't like it, but anything Easy-RSA
  19. # is designed for will. In return, we get the Issuer attached to CRLs.
  20. crl_extensions = crl_ext
  21. default_days = 3650 # how long to certify for
  22. default_crl_days= 30 # how long before next CRL
  23. default_md = sha256 # use public key default MD
  24. preserve = no # keep passed DN ordering
  25. # A few difference way of specifying how similar the request should look
  26. # For type CA, the listed attributes must be the same, and the optional
  27. # and supplied fields are just that :-)
  28. policy = policy_anything
  29. # For the 'anything' policy, which defines allowed DN fields
  30. [ policy_anything ]
  31. countryName = optional
  32. stateOrProvinceName = optional
  33. localityName = optional
  34. organizationName = optional
  35. organizationalUnitName = optional
  36. commonName = supplied
  37. name = optional
  38. emailAddress = optional
  39. ####################################################################
  40. # Easy-RSA request handling
  41. # We key off $DN_MODE to determine how to format the DN
  42. [ req ]
  43. default_bits = 2048
  44. default_keyfile = privkey.pem
  45. default_md = sha256
  46. distinguished_name = cn_only
  47. x509_extensions = easyrsa_ca # The extentions to add to the self signed cert
  48. # A placeholder to handle the $EXTRA_EXTS feature:
  49. #%EXTRA_EXTS% # Do NOT remove or change this line as $EXTRA_EXTS support requires it
  50. ####################################################################
  51. # Easy-RSA DN (Subject) handling
  52. # Easy-RSA DN for cn_only support:
  53. [ cn_only ]
  54. commonName = Common Name (eg: your user, host, or server name)
  55. commonName_max = 64
  56. commonName_default = changeme
  57. # Easy-RSA DN for org support:
  58. [ org ]
  59. countryName = Country Name (2 letter code)
  60. countryName_default = KG
  61. countryName_min = 2
  62. countryName_max = 2
  63. stateOrProvinceName = State or Province Name (full name)
  64. stateOrProvinceName_default = NA
  65. localityName = Locality Name (eg, city)
  66. localityName_default = BISHKEK
  67. 0.organizationName = Organization Name (eg, company)
  68. 0.organizationName_default = OpenVPN-TEST
  69. organizationalUnitName = Organizational Unit Name (eg, section)
  70. organizationalUnitName_default =
  71. commonName = Common Name (eg: your user, host, or server name)
  72. commonName_max = 64
  73. commonName_default =
  74. emailAddress = Email Address
  75. emailAddress_default = me@myhost.mydomain
  76. emailAddress_max = 64
  77. ####################################################################
  78. [ basic_exts ]
  79. basicConstraints = CA:FALSE
  80. subjectKeyIdentifier = hash
  81. authorityKeyIdentifier = keyid,issuer:always
  82. # The Easy-RSA CA extensions
  83. [ easyrsa_ca ]
  84. # PKIX recommendations:
  85. subjectKeyIdentifier=hash
  86. authorityKeyIdentifier=keyid:always,issuer:always
  87. # This could be marked critical, but it's nice to support reading by any
  88. # broken clients who attempt to do so.
  89. basicConstraints = CA:true
  90. # Limit key usage to CA tasks. If you really want to use the generated pair as
  91. # a self-signed cert, comment this out.
  92. keyUsage = cRLSign, keyCertSign
  93. # CRL extensions.
  94. [ crl_ext ]
  95. # Only issuerAltName and authorityKeyIdentifier make any sense in a CRL.
  96. # issuerAltName=issuer:copy
  97. authorityKeyIdentifier=keyid:always,issuer:always
  98. # Server extensions.
  99. [ server ]
  100. basicConstraints = CA:FALSE
  101. nsCertType = server
  102. nsComment = "OpenSSL Generated Server Certificate"
  103. subjectKeyIdentifier = hash
  104. authorityKeyIdentifier = keyid,issuer:always
  105. extendedKeyUsage = serverAuth
  106. keyUsage = digitalSignature, keyEncipherment