Readme-x509.txt 5.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131
  1. This documents the X.509 CAs, certificates, and CRLS used for testing.
  2. Certification authorities
  3. -------------------------
  4. There are two main CAs for use as trusted roots:
  5. - test-ca.crt aka "C=NL, O=PolarSSL, CN=PolarSSL Test CA"
  6. uses a RSA-2048 key
  7. test-ca-sha1.crt and test-ca-sha256.crt use the same key, signed with
  8. different hashes.
  9. - test-ca2*.crt aka "C=NL, O=PolarSSL, CN=Polarssl Test EC CA"
  10. uses an EC key with NIST P-384 (aka secp384r1)
  11. variants used to test the keyUsage extension
  12. The files test-ca_cat12 and test-ca_cat21 contain them concatenated both ways.
  13. Two intermediate CAs are signed by them:
  14. - test-int-ca.crt "C=NL, O=PolarSSL, CN=PolarSSL Test Intermediate CA"
  15. uses RSA-4096, signed by test-ca2
  16. - test-int-ca-exp.crt is a copy that is expired
  17. - test-int-ca2.crt "C=NL, O=PolarSSL, CN=PolarSSL Test Intermediate EC CA"
  18. uses an EC key with NIST P-384, signed by test-ca
  19. A third intermediate CA is signed by test-int-ca2.crt:
  20. - test-int-ca3.crt "C=UK, O=mbed TLS, CN=mbed TLS Test intermediate CA 3"
  21. uses an EC key with NIST P-256, signed by test-int-ca2
  22. Finally, other CAs for specific purposes:
  23. - enco-ca-prstr.pem: has its CN encoded as a printable string, but child cert
  24. enco-cert-utf8str.pem has its issuer's CN encoded as a UTF-8 string.
  25. - test-ca-v1.crt: v1 "CA", signs
  26. server1-v1.crt: v1 "intermediate CA", signs
  27. server2-v1*.crt: EE cert (without of with chain in same file)
  28. - keyUsage.decipherOnly.crt: has the decipherOnly keyUsage bit set
  29. End-entity certificates
  30. -----------------------
  31. Short information fields:
  32. - name or pattern
  33. - issuing CA: 1 -> test-ca.crt
  34. 2 -> test-ca2.crt
  35. I1 -> test-int-ca.crt
  36. I2 -> test-int-ca2.crt
  37. I3 -> test-int-ca3.crt
  38. O -> other
  39. - key type: R -> RSA, E -> EC
  40. - C -> there is a CRL revoking this cert (see below)
  41. - L -> CN=localhost (useful for local test servers)
  42. - P1, P2 if the file includes parent (resp. parent + grandparent)
  43. - free-form comments
  44. List of certificates:
  45. - cert_example_multi*.crt: 1/O R: subjectAltName
  46. - cert_example_wildcard.crt: 1 R: wildcard in subject's CN
  47. - cert_md*.crt, cert_sha*.crt: 1 R: signature hash
  48. - cert_v1_with_ext.crt: 1 R: v1 with extensions (illegal)
  49. - cli2.crt: 2 E: basic
  50. - cli-rsa.key, cli-rsa-*.crt: RSA key used for test clients, signed by
  51. the RSA test CA.
  52. - enco-cert-utf8str.pem: see enco-ca-prstr.pem above
  53. - server1*.crt: 1* R C* P1*: misc *(server1-v1 see test-ca-v1.crt above)
  54. *CRL for: .cert_type.crt, .crt, .key_usage.crt, .v1.crt
  55. P1 only for _ca.crt
  56. - server2-v1*.crt: O R: see test-ca-v1.crt above
  57. - server2*.crt: 1 R L: misc
  58. - server3.crt: 1 E L: EC cert signed by RSA CA
  59. - server4.crt: 2 R L: RSA cert signed by EC CA
  60. - server5*.crt: 2* E L: misc *(except -selfsigned and -ss-*)
  61. -sha*: hashes
  62. .eku*: extendeKeyUsage (cli/srv = www client/server, cs = codesign, etc)
  63. .ku*: keyUsage (ds = signatures, ke/ka = key exchange/agreement)
  64. .req*: CSR, not certificate
  65. -der*: trailing bytes in der (?)
  66. -badsign.crt: S5 with corrupted signature
  67. -expired.crt: S5 with "not after" date in the past
  68. -future.crt: S5 with "not before" date in the future
  69. -selfsigned.crt: Self-signed cert with S5 key
  70. -ss-expired.crt: Self-signed cert with S5 key, expired
  71. -ss-forgeca.crt: Copy of test-int-ca3 self-signed with S5 key
  72. - server6-ss-child.crt: O E: "child" of non-CA server5-selfsigned
  73. - server6.crt, server6.pem: 2 E L C: revoked
  74. - server7.crt: I1 E L P1(usually): EC signed by RSA signed by EC
  75. -badsign.crt: S7 with corrupted signature + I1
  76. -expired.crt: S7 with "not after" date in the past + I1
  77. -future.crt: S7 with "not before" date in the future + I1
  78. _int-ca-exp.crt: S7 + expired I1
  79. _int-ca.crt: S7 + I1
  80. _int-ca_ca2.crt: S7 + I1 + 2
  81. _all_space.crt: S7 + I1 both with misplaced spaces (invalid PEM)
  82. _pem_space.crt: S7 with misplace space (invalid PEM) + I1
  83. _trailing_space.crt: S7 + I1 both with trainling space (valid PEM)
  84. _spurious_int-ca.crt: S7 + I2(spurious) + I1
  85. - server8*.crt: I2 R L: RSA signed by EC signed by RSA (P1 for _int-ca2)
  86. - server9*.crt: 1 R C* L P1*: signed using RSASSA-PSS
  87. *CRL for: 9.crt, -badsign, -with-ca (P1)
  88. - server10.crt: I3 E L
  89. -badsign.crt: S10 with corrupted signature
  90. -bs_int3.pem: S10-badsign + I3
  91. _int3-bs.pem: S10 + I3-badsign
  92. _int3_int-ca2.crt: S10 + I3 + I2
  93. _int3_int-ca2_ca.crt: S10 + I3 + I2 + 1
  94. _int3_spurious_int-ca2.crt: S10 + I3 + I1(spurious) + I2
  95. Certificate revocation lists
  96. ----------------------------
  97. Signing CA in parentheses (same meaning as certificates).
  98. - crl-ec-sha*.pem: (2) server6.crt
  99. - crl-future.pem: (2) server6.crt + unknown
  100. - crl-rsa-pss-*.pem: (1) server9{,badsign,with-ca}.crt + cert_sha384.crt + unknown
  101. - crl.pem, crl-futureRevocationDate.pem, crl_expired.pem: (1) server1{,.cert_type,.key_usage,.v1}.crt + unknown
  102. - crl_md*.pem: crl_sha*.pem: (1) same as crl.pem
  103. - crt_cat_*.pem: (1+2) concatenations in various orders:
  104. ec = crl-ec-sha256.pem, ecfut = crl-future.pem
  105. rsa = crl.pem, rsabadpem = same with pem error, rsaexp = crl_expired.pem
  106. Note: crl_future would revoke server9 and cert_sha384.crt if signed by CA 1
  107. crl-rsa-pss* would revoke server6.crt if signed by CA 2
  108. Generation
  109. ----------
  110. Newer test files have been generated through commands in the Makefile. The
  111. resulting files are committed to the repository so that the tests can
  112. run without having to re-do the generation and so that the output is the
  113. same for everyone (the generation process is randomized).
  114. The origin of older certificates has not been recorded.