CAtsa.cnf 4.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161
  1. #
  2. # This config is used by the Time Stamp Authority tests.
  3. #
  4. # Extra OBJECT IDENTIFIER info:
  5. oid_section = new_oids
  6. TSDNSECT = ts_cert_dn
  7. INDEX = 1
  8. [ new_oids ]
  9. # Policies used by the TSA tests.
  10. tsa_policy1 = 1.2.3.4.1
  11. tsa_policy2 = 1.2.3.4.5.6
  12. tsa_policy3 = 1.2.3.4.5.7
  13. #----------------------------------------------------------------------
  14. [ ca ]
  15. default_ca = CA_default # The default ca section
  16. [ CA_default ]
  17. dir = ./demoCA
  18. certs = $dir/certs # Where the issued certs are kept
  19. database = $dir/index.txt # database index file.
  20. new_certs_dir = $dir/newcerts # default place for new certs.
  21. certificate = $dir/cacert.pem # The CA certificate
  22. serial = $dir/serial # The current serial number
  23. private_key = $dir/private/cakey.pem# The private key
  24. default_days = 365 # how long to certify for
  25. default_md = sha256 # which md to use.
  26. preserve = no # keep passed DN ordering
  27. policy = policy_match
  28. # For the CA policy
  29. [ policy_match ]
  30. countryName = supplied
  31. stateOrProvinceName = supplied
  32. organizationName = supplied
  33. organizationalUnitName = optional
  34. commonName = supplied
  35. emailAddress = optional
  36. #----------------------------------------------------------------------
  37. [ req ]
  38. default_md = sha1
  39. distinguished_name = $ENV::TSDNSECT
  40. encrypt_rsa_key = no
  41. prompt = no
  42. # attributes = req_attributes
  43. x509_extensions = v3_ca # The extensions to add to the self signed cert
  44. string_mask = nombstr
  45. [ ts_ca_dn ]
  46. countryName = HU
  47. stateOrProvinceName = Budapest
  48. localityName = Budapest
  49. organizationName = Gov-CA Ltd.
  50. commonName = ca1
  51. [ ts_cert_dn ]
  52. countryName = HU
  53. stateOrProvinceName = Budapest
  54. localityName = Buda
  55. organizationName = Hun-TSA Ltd.
  56. commonName = tsa$ENV::INDEX
  57. [ tsa_cert ]
  58. # TSA server cert is not a CA cert.
  59. basicConstraints=CA:FALSE
  60. # The following key usage flags are needed for TSA server certificates.
  61. keyUsage = nonRepudiation, digitalSignature
  62. extendedKeyUsage = critical,timeStamping
  63. # PKIX recommendations harmless if included in all certificates.
  64. subjectKeyIdentifier=hash
  65. authorityKeyIdentifier=keyid,issuer:always
  66. [ non_tsa_cert ]
  67. # This is not a CA cert and not a TSA cert, either (timeStamping usage missing)
  68. basicConstraints=CA:FALSE
  69. # The following key usage flags are needed for TSA server certificates.
  70. keyUsage = nonRepudiation, digitalSignature
  71. # timeStamping is not supported by this certificate
  72. # extendedKeyUsage = critical,timeStamping
  73. # PKIX recommendations harmless if included in all certificates.
  74. subjectKeyIdentifier=hash
  75. authorityKeyIdentifier=keyid,issuer:always
  76. [ v3_req ]
  77. # Extensions to add to a certificate request
  78. basicConstraints = CA:FALSE
  79. keyUsage = nonRepudiation, digitalSignature
  80. [ v3_ca ]
  81. # Extensions for a typical CA
  82. subjectKeyIdentifier=hash
  83. authorityKeyIdentifier=keyid:always,issuer:always
  84. basicConstraints = critical,CA:true
  85. keyUsage = cRLSign, keyCertSign
  86. #----------------------------------------------------------------------
  87. [ tsa ]
  88. default_tsa = tsa_config1 # the default TSA section
  89. [ tsa_config1 ]
  90. # These are used by the TSA reply generation only.
  91. dir = . # TSA root directory
  92. serial = $dir/tsa_serial # The current serial number (mandatory)
  93. signer_cert = $dir/tsa_cert1.pem # The TSA signing certificate
  94. # (optional)
  95. certs = $dir/tsaca.pem # Certificate chain to include in reply
  96. # (optional)
  97. signer_key = $dir/tsa_key1.pem # The TSA private key (optional)
  98. signer_digest = sha256 # Signing digest to use. (Optional)
  99. default_policy = tsa_policy1 # Policy if request did not specify it
  100. # (optional)
  101. other_policies = tsa_policy2, tsa_policy3 # acceptable policies (optional)
  102. digests = sha1, sha256, sha384, sha512 # Acceptable message digests (mandatory)
  103. accuracy = secs:1, millisecs:500, microsecs:100 # (optional)
  104. ordering = yes # Is ordering defined for timestamps?
  105. # (optional, default: no)
  106. tsa_name = yes # Must the TSA name be included in the reply?
  107. # (optional, default: no)
  108. ess_cert_id_chain = yes # Must the ESS cert id chain be included?
  109. # (optional, default: no)
  110. ess_cert_id_alg = sha256 # algorithm to compute certificate
  111. # identifier (optional, default: sha1)
  112. [ tsa_config2 ]
  113. # This configuration uses a certificate which doesn't have timeStamping usage.
  114. # These are used by the TSA reply generation only.
  115. dir = . # TSA root directory
  116. serial = $dir/tsa_serial # The current serial number (mandatory)
  117. signer_cert = $dir/tsa_cert2.pem # The TSA signing certificate
  118. # (optional)
  119. certs = $dir/demoCA/cacert.pem# Certificate chain to include in reply
  120. # (optional)
  121. signer_key = $dir/tsa_key2.pem # The TSA private key (optional)
  122. signer_digest = sha256 # Signing digest to use. (Optional)
  123. default_policy = tsa_policy1 # Policy if request did not specify it
  124. # (optional)
  125. other_policies = tsa_policy2, tsa_policy3 # acceptable policies (optional)
  126. digests = sha1, sha256, sha384, sha512 # Acceptable message digests (mandatory)