wolfssl.cnf 6.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170
  1. #
  2. # wolfssl configuration file
  3. #
  4. HOME = .
  5. RANDFILE = $ENV::HOME/.rnd
  6. oid_section = new_oids
  7. [ new_oids ]
  8. # Policies used by the TSA examples.
  9. tsa_policy1 = 1.2.3.4.1
  10. tsa_policy2 = 1.2.3.4.5.6
  11. tsa_policy3 = 1.2.3.4.5.7
  12. ####################################################################
  13. [ ca ]
  14. default_ca = CA_default # The default ca section
  15. ####################################################################
  16. [ CA_default ]
  17. ####################################################################
  18. # CHANGE THIS LINE TO BE YOUR WOLFSSL_ROOT DIRECTORY #
  19. # #
  20. dir = $HOME./.. #
  21. ####################################################################
  22. certs = $dir/certs # Where the issued certs are kept
  23. crl_dir = $dir/certs/crl # Where the issued crl are kept
  24. database = $dir/certs/crl/demoCA/index.txt # database index file.
  25. new_certs_dir = $dir/certs # default place for new certs.
  26. certificate = $dir/certs/ca-cert.pem # The CA certificate
  27. serial = $dir/certs/serial # The current serial number
  28. crlnumber = $dir/certs/crl/crlnumber # the current crl number
  29. crl = $dir/certs/crl/crl.pem # The current CRL
  30. private_key = $dir/certs/ca-key.pem # The private key
  31. RANDFILE = $dir/certs/private/.rand # private random number file
  32. x509_extensions = usr_cert # The extentions to add to the cert
  33. name_opt = ca_default # Subject Name options
  34. cert_opt = ca_default # Certificate field options
  35. default_days = 1000 # how long to certify for
  36. default_crl_days = 30 # how long before next CRL
  37. default_md = default # use public key default MD
  38. preserve = no # keep passed DN ordering
  39. policy = policy_match
  40. # For the CA policy
  41. [ policy_match ]
  42. countryName = match
  43. stateOrProvinceName = match
  44. organizationName = match
  45. organizationalUnitName = optional
  46. commonName = supplied
  47. emailAddress = optional
  48. # For the 'anything' policy
  49. [ policy_anything ]
  50. countryName = optional
  51. stateOrProvinceName = optional
  52. localityName = optional
  53. organizationName = optional
  54. organizationalUnitName = optional
  55. commonName = supplied
  56. emailAddress = optional
  57. # default req
  58. [ req ]
  59. default_bits = 2048
  60. default_keyfile = privkey.pem
  61. distinguished_name = req_distinguished_name
  62. attributes = req_attributes
  63. x509_extensions = v3_ca # The extentions to add to the self signed cert
  64. string_mask = utf8only
  65. #default req_dist_name
  66. [ req_distinguished_name ]
  67. countryName = Country Name (2 letter code)
  68. countryName_default = US
  69. countryName_min = 2
  70. countryName_max = 2
  71. stateOrProvinceName = State or Province Name (full name)
  72. stateOrProvinceName_default = Montana
  73. localityName = Locality Name (eg, city)
  74. localityName_default = Bozeman
  75. 0.organizationName = Organization Name (eg, company)
  76. 0.organizationName_default = Sawtooth
  77. organizationalUnitName = Organizational Unit Name (eg, section)
  78. organizationalUnitName_default = Consulting
  79. commonName = Common Name (e.g. server FQDN or YOUR name)
  80. commonName_default = www.wolfssl.com
  81. commonName_max = 64
  82. emailAddress = Email Address
  83. emailAddress_default = info@wolfssl.com
  84. emailAddress_max = 64
  85. #default req_attr
  86. [ req_attributes ]
  87. challengePassword = A challenge password
  88. challengePassword_min = 4
  89. challengePassword_max = 20
  90. unstructuredName = An optional company name
  91. # These extensions are added when 'ca' signs a request.
  92. [ usr_cert ]
  93. basicConstraints=CA:FALSE
  94. nsComment = "wolfSSL Generated Certificate using openSSL command line utility."
  95. subjectKeyIdentifier=hash
  96. authorityKeyIdentifier=keyid,issuer
  97. #wolfssl extensions
  98. [wolfssl_opts]
  99. subjectKeyIdentifier=hash
  100. authorityKeyIdentifier=keyid:always,issuer:always
  101. basicConstraints=CA:true
  102. # Extensions to add to a certificate request
  103. [ v3_req ]
  104. basicConstraints = CA:FALSE
  105. keyUsage = nonRepudiation, digitalSignature, keyEncipherment
  106. # Extensions for a typical CA
  107. [ v3_ca ]
  108. subjectKeyIdentifier=hash
  109. authorityKeyIdentifier=keyid:always,issuer:always
  110. basicConstraints = CA:true
  111. # CRL extensions.
  112. [ crl_ext ]
  113. authorityKeyIdentifier=keyid:always
  114. # These extensions should be added when creating a proxy certificate
  115. [ proxy_cert_ext ]
  116. basicConstraints=CA:FALSE
  117. nsComment = "wolfSSL Generated Certificate using openSSL command line utility"
  118. subjectKeyIdentifier=hash
  119. authorityKeyIdentifier=keyid,issuer
  120. proxyCertInfo=critical,language:id-ppl-anyLanguage,pathlen:3,policy:foo
  121. #tsa default
  122. [ tsa ]
  123. default_tsa = tsa_config1
  124. # These are used by the TSA reply generation only.
  125. [ tsa_config1 ]
  126. dir = ./demoCA # directory
  127. serial = $dir/tsaserial # (mandatory)
  128. crypto_device = builtin # engine
  129. signer_cert = $dir/tsacert.pem # certificate
  130. certs = $dir/cacert.pem # chain
  131. signer_key = $dir/private/tsakey.pem # (optional)
  132. default_policy = tsa_policy1 # Policy
  133. other_policies = tsa_policy2, tsa_policy3 # (optional)
  134. digests = md5, sha1 # (mandatory)
  135. accuracy = secs:1, millisecs:500, microsecs:100 # (optional)
  136. clock_precision_digits = 0 # (optional)
  137. ordering = yes # timestamps?
  138. tsa_name = yes # include?
  139. ess_cert_id_chain = no # include chain?