wolfssl.cnf 8.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256
  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. # CA with pathlen 0
  103. [ pathlen_0 ]
  104. subjectKeyIdentifier=hash
  105. authorityKeyIdentifier=keyid:always,issuer:always
  106. basicConstraints=CA:true,pathlen:0
  107. keyUsage=keyCertSign, cRLSign
  108. # CA with pathlen 1
  109. [ pathlen_1 ]
  110. subjectKeyIdentifier=hash
  111. authorityKeyIdentifier=keyid:always,issuer:always
  112. basicConstraints=CA:true,pathlen:1
  113. keyUsage=keyCertSign, cRLSign
  114. # CA with pathlen 127
  115. [ pathlen_127 ]
  116. subjectKeyIdentifier=hash
  117. authorityKeyIdentifier=keyid:always,issuer:always
  118. basicConstraints=CA:true,pathlen:127
  119. keyUsage=keyCertSign, cRLSign
  120. # CA with pathlen 128
  121. [ pathlen_128 ]
  122. subjectKeyIdentifier=hash
  123. authorityKeyIdentifier=keyid:always,issuer:always
  124. basicConstraints=CA:true,pathlen:128
  125. keyUsage=keyCertSign, cRLSign
  126. # test pathlen server cert
  127. [ test_pathlen ]
  128. subjectKeyIdentifier=hash
  129. authorityKeyIdentifier=keyid:always,issuer:always
  130. basicConstraints=CA:false
  131. # Extensions to add to a certificate request
  132. [ v3_req ]
  133. basicConstraints = CA:FALSE
  134. keyUsage = nonRepudiation, digitalSignature, keyEncipherment
  135. # Extensions for a typical CA
  136. [ v3_ca ]
  137. subjectKeyIdentifier=hash
  138. authorityKeyIdentifier=keyid:always,issuer:always
  139. basicConstraints = CA:true
  140. # CRL extensions.
  141. [ crl_ext ]
  142. authorityKeyIdentifier=keyid:always
  143. # These extensions should be added when creating a proxy certificate
  144. [ proxy_cert_ext ]
  145. basicConstraints=CA:FALSE
  146. nsComment = "wolfSSL Generated Certificate using openSSL command line utility"
  147. subjectKeyIdentifier=hash
  148. authorityKeyIdentifier=keyid,issuer
  149. proxyCertInfo=critical,language:id-ppl-anyLanguage,pathlen:3,policy:foo
  150. # Test of rejecting duplicate policy extension OIDs
  151. [ policy_test ]
  152. subjectKeyIdentifier=hash
  153. authorityKeyIdentifier=keyid:always,issuer:always
  154. basicConstraints=CA:FALSE
  155. certificatePolicies=1.2.3.4,@policy_add
  156. [ policy_add ]
  157. policyIdentifier=1.2.3.4
  158. CPS.1="www.wolfssl.com"
  159. userNotice.1=@policy_usr
  160. [ policy_usr ]
  161. explicitText="Test of duplicate OIDs with different qualifiers"
  162. # create certificate without the digitalSignature bit set and uses sha1 sig
  163. [ digsigku ]
  164. subjectKeyIdentifier=hash
  165. authorityKeyIdentifier=keyid:always,issuer:always
  166. basicConstraints=critical, CA:TRUE
  167. keyUsage=critical, nonRepudiation, keyEncipherment
  168. # ca-ecc-cert extensions
  169. [ ca_ecc_cert ]
  170. subjectKeyIdentifier=hash
  171. authorityKeyIdentifier=keyid:always
  172. basicConstraints=critical, CA:TRUE
  173. keyUsage=critical, digitalSignature, keyCertSign, cRLSign
  174. # server-ecc extensions
  175. [ server_ecc ]
  176. subjectKeyIdentifier=hash
  177. authorityKeyIdentifier=keyid:always
  178. basicConstraints=critical, CA:FALSE
  179. keyUsage=critical, digitalSignature, keyEncipherment, keyAgreement
  180. extendedKeyUsage=serverAuth
  181. nsCertType=server
  182. # test parsing URI
  183. [ uri ]
  184. subjectKeyIdentifier=hash
  185. authorityKeyIdentifier=keyid:always,issuer:always
  186. basicConstraints=CA:false
  187. subjectAltName=URI:https://www.wolfssl.com
  188. # test parsing relative URI
  189. [ relative_uri ]
  190. subjectKeyIdentifier=hash
  191. authorityKeyIdentifier=keyid:always,issuer:always
  192. basicConstraints=CA:false
  193. subjectAltName=URI:../relative/page.html
  194. #tsa default
  195. [ tsa ]
  196. default_tsa = tsa_config1
  197. # These are used by the TSA reply generation only.
  198. [ tsa_config1 ]
  199. dir = ./demoCA # directory
  200. serial = $dir/tsaserial # (mandatory)
  201. crypto_device = builtin # engine
  202. signer_cert = $dir/tsacert.pem # certificate
  203. certs = $dir/cacert.pem # chain
  204. signer_key = $dir/private/tsakey.pem # (optional)
  205. default_policy = tsa_policy1 # Policy
  206. other_policies = tsa_policy2, tsa_policy3 # (optional)
  207. digests = md5, sha1 # (mandatory)
  208. accuracy = secs:1, millisecs:500, microsecs:100 # (optional)
  209. clock_precision_digits = 0 # (optional)
  210. ordering = yes # timestamps?
  211. tsa_name = yes # include?
  212. ess_cert_id_chain = no # include chain?