test_suite_asn1parse.data 18 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632
  1. Empty length
  2. parse_prefixes:"04":MBEDTLS_ERR_ASN1_OUT_OF_DATA:UNPREDICTABLE_RESULT
  3. Incomplete length
  4. parse_prefixes:"0481":MBEDTLS_ERR_ASN1_OUT_OF_DATA:UNPREDICTABLE_RESULT
  5. Prefixes of OCTET STRING, length=0
  6. parse_prefixes:"0400":0:0
  7. Prefixes of OCTET STRING, length=0 (0 length bytes)
  8. parse_prefixes:"0480":MBEDTLS_ERR_ASN1_INVALID_LENGTH:MBEDTLS_ERR_ASN1_INVALID_LENGTH
  9. Prefixes of OCTET STRING, length=1
  10. parse_prefixes:"040141":0:0
  11. Prefixes of OCTET STRING, length=2
  12. parse_prefixes:"04024142":0:0
  13. Prefixes of BOOLEAN, length=0
  14. parse_prefixes:"0100":MBEDTLS_ERR_ASN1_INVALID_LENGTH:MBEDTLS_ERR_ASN1_INVALID_LENGTH
  15. Prefixes of BOOLEAN, length=1
  16. parse_prefixes:"010100":0:0
  17. Prefixes of BOOLEAN, length=2
  18. parse_prefixes:"01020000":MBEDTLS_ERR_ASN1_INVALID_LENGTH:MBEDTLS_ERR_ASN1_INVALID_LENGTH
  19. Prefixes of INTEGER, length=1
  20. parse_prefixes:"020141":0:0
  21. Prefixes of INTEGER, length=2
  22. parse_prefixes:"02024142":0:0
  23. Prefixes of INTEGER, length=5
  24. parse_prefixes:"02054142434445":0:0
  25. Prefixes of empty BIT STRING
  26. parse_prefixes:"0300":MBEDTLS_ERR_ASN1_OUT_OF_DATA:UNPREDICTABLE_RESULT
  27. Prefixes of BIT STRING, unused_bits=0, payload_length=0
  28. parse_prefixes:"030100":0:MBEDTLS_ERR_ASN1_LENGTH_MISMATCH
  29. Prefixes of BIT STRING, unused_bits=0, payload_length=1
  30. parse_prefixes:"0302002a":0:MBEDTLS_ERR_ASN1_LENGTH_MISMATCH
  31. Prefixes of BIT STRING, unused_bits=1, payload_length=1
  32. parse_prefixes:"0302012a":0:MBEDTLS_ERR_ASN1_LENGTH_MISMATCH
  33. Prefixes of empty SEQUENCE
  34. parse_prefixes:"3000":0:0
  35. Prefixes of SEQUENCE of BOOLEAN, INTEGER, INTEGER
  36. parse_prefixes:"300b01010102012a0203123456":0:0
  37. Prefixes of SEQUENCE of (SEQUENCE of INTEGER, INTEGER), INTEGER
  38. parse_prefixes:"300b3006020141020142020161":0:0
  39. length=0 (short form)
  40. get_len:"00":0
  41. length=0 (1 length byte)
  42. get_len:"8100":0
  43. length=0 (2 length bytes)
  44. get_len:"820000":0
  45. length=1 (short form)
  46. get_len:"01":1
  47. length=1 (1 length byte)
  48. get_len:"8101":1
  49. length=1 (2 length bytes)
  50. get_len:"820001":1
  51. length=1 (3 length bytes)
  52. get_len:"83000001":1
  53. length=1 (4 length bytes)
  54. get_len:"8400000001":1
  55. length=2 (short form)
  56. get_len:"02":2
  57. length=2 (1 length byte)
  58. get_len:"8102":2
  59. length=2 (2 length bytes)
  60. get_len:"820002":2
  61. length=2 (3 length bytes)
  62. get_len:"83000002":2
  63. length=2 (4 length bytes)
  64. get_len:"8400000002":2
  65. length=127 (short form)
  66. get_len:"7f":127
  67. length=128 (1 length byte)
  68. get_len:"8180":128
  69. length=128 (2 length bytes)
  70. get_len:"820080":128
  71. length=255 (1 length byte)
  72. get_len:"81ff":255
  73. length=255 (2 length bytes)
  74. get_len:"8200ff":255
  75. length=256 (2 length bytes)
  76. get_len:"820100":256
  77. length=256 (3 length bytes)
  78. get_len:"83000100":256
  79. length=258 (2 length bytes)
  80. get_len:"820102":258
  81. length=258 (3 length bytes)
  82. get_len:"83000102":258
  83. length=65535 (2 length bytes)
  84. get_len:"82ffff":65535
  85. length=65535 (3 length bytes)
  86. get_len:"8300ffff":65535
  87. length=65535 (4 length bytes)
  88. get_len:"840000ffff":65535
  89. length=65536 (3 length bytes)
  90. get_len:"83010000":65536
  91. length=65536 (4 length bytes)
  92. get_len:"8400010000":65536
  93. length=16777215 (3 length bytes)
  94. get_len:"83ffffff":16777215
  95. length=16777215 (4 length bytes)
  96. get_len:"8400ffffff":16777215
  97. length=16777216 (4 length bytes)
  98. get_len:"8401000000":16777216
  99. length=16909060 (4 length bytes)
  100. get_len:"8401020304":16909060
  101. BOOLEAN FALSE
  102. get_boolean:"010100":0:0
  103. BOOLEAN TRUE (1)
  104. get_boolean:"010101":1:0
  105. BOOLEAN TRUE (2)
  106. get_boolean:"010101":1:0
  107. BOOLEAN TRUE (128)
  108. get_boolean:"010180":1:0
  109. BOOLEAN TRUE (255)
  110. get_boolean:"0101ff":1:0
  111. Not BOOLEAN
  112. get_boolean:"020101":0:MBEDTLS_ERR_ASN1_UNEXPECTED_TAG
  113. Empty INTEGER
  114. empty_integer:"0200"
  115. INTEGER 0
  116. get_integer:"020100":"0":0
  117. INTEGER 0, extra leading 0
  118. get_integer:"02020000":"0":0
  119. INTEGER 1
  120. get_integer:"020101":"1":0:
  121. INTEGER 1, extra leading 0
  122. get_integer:"02020001":"1":0:
  123. INTEGER 0x7f
  124. get_integer:"02017f":"7f":0
  125. INTEGER 0x80
  126. get_integer:"02020080":"80":0
  127. INTEGER 0x80, extra leading 0
  128. get_integer:"0203000080":"80":0
  129. INTEGER 0xff
  130. get_integer:"020200ff":"ff":0
  131. INTEGER 0x7fff
  132. get_integer:"02027fff":"7fff":0
  133. INTEGER 0x12345678
  134. get_integer:"020412345678":"12345678":0
  135. INTEGER 0x12345678, extra leading 0
  136. get_integer:"02050012345678":"12345678":0
  137. INTEGER 0x7fffffff
  138. get_integer:"02047fffffff":"7fffffff":0
  139. INTEGER 0x7fffffff, extra leading 0
  140. get_integer:"0205007fffffff":"7fffffff":0
  141. INTEGER 0x80000000
  142. get_integer:"02050080000000":"80000000":0
  143. INTEGER 0xffffffff
  144. get_integer:"020500ffffffff":"ffffffff":0
  145. INTEGER 0x100000000
  146. get_integer:"02050100000000":"0100000000":0
  147. INTEGER 0x123456789abcdef0
  148. get_integer:"0208123456789abcdef0":"123456789abcdef0":0
  149. INTEGER 0xfedcab9876543210
  150. get_integer:"020900fedcab9876543210":"fedcab9876543210":0
  151. INTEGER 0x1fedcab9876543210
  152. get_integer:"020901fedcab9876543210":"1fedcab9876543210":0
  153. INTEGER with 127 value octets
  154. get_integer:"027f0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcd":"0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcd":0
  155. INTEGER with 127 value octets (long length encoding)
  156. get_integer:"02817f0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcd":"0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcd":0
  157. INTEGER with 128 value octets
  158. get_integer:"0281800123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef":"0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef":0
  159. INTEGER with 128 value octets (leading 0 in length)
  160. get_integer:"028200800123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef":"0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef":0
  161. INTEGER -1
  162. get_integer:"0201ff":"-1":0
  163. INTEGER -1, extra leading ff
  164. get_integer:"0202ffff":"-1":0
  165. INTEGER -0x7f
  166. get_integer:"020181":"-7f":0
  167. INTEGER -0x80
  168. get_integer:"020180":"-80":0
  169. INTEGER -0x81
  170. get_integer:"0202ff7f":"-81":0
  171. INTEGER -0xff
  172. get_integer:"0202ff01":"-ff":0
  173. INTEGER -0x100
  174. get_integer:"0202ff00":"-100":0
  175. INTEGER -0x7fffffff
  176. get_integer:"020480000001":"-7fffffff":0
  177. INTEGER -0x80000000
  178. get_integer:"020480000000":"-80000000":0
  179. INTEGER -0x80000001
  180. get_integer:"0205ff7fffffff":"-80000001":0
  181. INTEGER -0xffffffff
  182. get_integer:"0205ff00000001":"-ffffffff":0
  183. INTEGER -0x100000000
  184. get_integer:"0205ff00000000":"-100000000":0
  185. INTEGER -0x123456789abcdef0
  186. get_integer:"0208edcba98765432110":"-123456789abcdef0":0
  187. INTEGER -0xfedcba9876543210
  188. get_integer:"0209ff0123456789abcdf0":"-fedcba9876543210":0
  189. INTEGER -0x1fedcab9876543210
  190. get_integer:"0209fe0123546789abcdf0":"-1fedcab9876543210":0
  191. Not INTEGER
  192. get_integer:"010101":"":MBEDTLS_ERR_ASN1_UNEXPECTED_TAG
  193. INTEGER too large for mpi
  194. get_mpi_too_large:
  195. ENUMERATED 0
  196. get_enum:"0A0100":"0":0
  197. ENUMERATED 0, extra leading 0
  198. get_enum:"0A020000":"0":0
  199. ENUMERATED 1
  200. get_enum:"0A0101":"1":0
  201. ENUMERATED 1, extra leading 0
  202. get_enum:"0A020001":"1":0
  203. ENUMERATED 0x7f
  204. get_enum:"0A017f":"7f":0
  205. ENUMERATED 0x80
  206. get_enum:"0A020080":"80":0
  207. ENUMERATED 0x80, extra leading 0
  208. get_enum:"0A03000080":"80":0
  209. ENUMERATED 0xff
  210. get_enum:"0A0200ff":"ff":0
  211. ENUMERATED 0x7fff
  212. get_enum:"0A027fff":"7fff":0
  213. ENUMERATED 0x12345678
  214. get_enum:"0A0412345678":"12345678":0
  215. ENUMERATED 0x12345678, extra leading 0
  216. get_enum:"0A050012345678":"12345678":0
  217. ENUMERATED 0x7fffffff
  218. get_enum:"0A047fffffff":"7fffffff":0
  219. ENUMERATED 0x7fffffff, extra leading 0
  220. get_enum:"0A05007fffffff":"7fffffff":0
  221. ENUMERATED 0x80000000
  222. get_enum:"0A050080000000":"80000000":0
  223. ENUMERATED 0xffffffff
  224. get_enum:"0A0500ffffffff":"ffffffff":0
  225. ENUMERATED 0x100000000
  226. get_enum:"0A050100000000":"0100000000":0
  227. ENUMERATED -1
  228. get_enum:"0A01ff":"-1":0
  229. ENUMERATED -1, extra leading ff
  230. get_enum:"0A02ffff":"-1":0
  231. ENUMERATED -0x7f
  232. get_enum:"0A0181":"-7f":0
  233. ENUMERATED -0x80
  234. get_enum:"0A0180":"-80":0
  235. ENUMERATED -0x81
  236. get_enum:"0A02ff7f":"-81":0
  237. ENUMERATED -0xff
  238. get_enum:"0A02ff01":"-ff":0
  239. ENUMERATED -0x100
  240. get_enum:"0A02ff00":"-100":0
  241. ENUMERATED -0x7fffffff
  242. get_enum:"0A0480000001":"-7fffffff":0
  243. ENUMERATED -0x80000000
  244. get_enum:"0A0480000000":"-80000000":0
  245. ENUMERATED -0x80000001
  246. get_enum:"0A05ff7fffffff":"-80000001":0
  247. ENUMERATED -0xffffffff
  248. get_enum:"0A05ff00000001":"-ffffffff":0
  249. ENUMERATED -0x100000000
  250. get_enum:"0A05ff00000000":"-100000000":0
  251. BIT STRING: empty
  252. get_bitstring:"0300":0:0:MBEDTLS_ERR_ASN1_OUT_OF_DATA:MBEDTLS_ERR_ASN1_INVALID_DATA
  253. BIT STRING: octets=0, unused_bits=0
  254. get_bitstring:"030100":0:0:0:0
  255. BIT STRING: octets=0, unused_bits=7
  256. get_bitstring:"030107":0:7:0:MBEDTLS_ERR_ASN1_INVALID_DATA
  257. BIT STRING: octets=0, unused_bits=8
  258. get_bitstring:"030108":0:0:MBEDTLS_ERR_ASN1_INVALID_LENGTH:MBEDTLS_ERR_ASN1_INVALID_DATA
  259. BIT STRING: octets=1, unused_bits=0
  260. get_bitstring:"03020041":1:0:0:0
  261. BIT STRING: octets=1, unused_bits=7
  262. get_bitstring:"03020741":1:7:0:MBEDTLS_ERR_ASN1_INVALID_DATA
  263. BIT STRING: octets=1, unused_bits=8
  264. get_bitstring:"03020841":1:8:MBEDTLS_ERR_ASN1_INVALID_LENGTH:MBEDTLS_ERR_ASN1_INVALID_DATA
  265. BIT STRING: octets=2, unused_bits=0
  266. get_bitstring:"0303004142":2:0:0:0
  267. BIT STRING: octets=2, unused_bits=7
  268. get_bitstring:"0303074142":2:7:0:MBEDTLS_ERR_ASN1_INVALID_DATA
  269. BIT STRING: octets=2, unused_bits=8
  270. get_bitstring:"0303084142":2:8:MBEDTLS_ERR_ASN1_INVALID_LENGTH:MBEDTLS_ERR_ASN1_INVALID_DATA
  271. BIT STRING with trailing garbage, unused_bits=0
  272. get_bitstring:"030200417e":1:0:MBEDTLS_ERR_ASN1_LENGTH_MISMATCH:0
  273. BIT STRING with trailing garbage, unused_bits=7
  274. get_bitstring:"030207417e":1:7:MBEDTLS_ERR_ASN1_LENGTH_MISMATCH:MBEDTLS_ERR_ASN1_INVALID_DATA
  275. BIT STRING with trailing garbage, unused_bits=8
  276. get_bitstring:"030208417e":1:8:MBEDTLS_ERR_ASN1_INVALID_LENGTH:MBEDTLS_ERR_ASN1_INVALID_DATA
  277. Not BIT STRING
  278. get_bitstring:"04020100":0:0:MBEDTLS_ERR_ASN1_UNEXPECTED_TAG:MBEDTLS_ERR_ASN1_UNEXPECTED_TAG
  279. SEQUENCE OF 0 OCTET STRING
  280. get_sequence_of:"3000":0x04:"":0
  281. SEQUENCE OF 0 OCTET STRING plus trailing garbage
  282. get_sequence_of:"30007e":0x04:"":MBEDTLS_ERR_ASN1_LENGTH_MISMATCH
  283. SEQUENCE of 1 OCTET STRING truncated after tag
  284. get_sequence_of:"300104":0x04:"":MBEDTLS_ERR_ASN1_OUT_OF_DATA
  285. SEQUENCE of 1 OCTET STRING truncated in length #1
  286. get_sequence_of:"30020481":0x04:"":MBEDTLS_ERR_ASN1_OUT_OF_DATA
  287. SEQUENCE of 1 OCTET STRING truncated in length #2
  288. get_sequence_of:"3003048201":0x04:"":MBEDTLS_ERR_ASN1_OUT_OF_DATA
  289. SEQUENCE of 1 OCTET STRING truncated in content #1
  290. get_sequence_of:"30020401":0x04:"":MBEDTLS_ERR_ASN1_OUT_OF_DATA
  291. SEQUENCE of 1 OCTET STRING truncated in content #2
  292. get_sequence_of:"3003040241":0x04:"":MBEDTLS_ERR_ASN1_OUT_OF_DATA
  293. SEQUENCE of 1 OCTET STRING truncated in content #3
  294. get_sequence_of:"300404034142":0x04:"":MBEDTLS_ERR_ASN1_OUT_OF_DATA
  295. SEQUENCE of 1 OCTET STRING (0)
  296. get_sequence_of:"30020400":0x04:"4,0":0
  297. SEQUENCE of 1 OCTET STRING (1)
  298. get_sequence_of:"3003040141":0x04:"4,1":0
  299. SEQUENCE of 1 OCTET STRING (126)
  300. get_sequence_of:"308180047e414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141":0x04:"5,126":0
  301. SEQUENCE of 2 OCTET STRINGs, second truncated after tag
  302. get_sequence_of:"30050402414104":0x04:"":MBEDTLS_ERR_ASN1_OUT_OF_DATA
  303. SEQUENCE of 2 OCTET STRINGs, second truncated in length #1
  304. get_sequence_of:"3006040241410481":0x04:"":MBEDTLS_ERR_ASN1_OUT_OF_DATA
  305. SEQUENCE of 2 OCTET STRINGs, second truncated in length #2
  306. get_sequence_of:"300704024141048201":0x04:"":MBEDTLS_ERR_ASN1_OUT_OF_DATA
  307. SEQUENCE of 2 OCTET STRINGs, second truncated in content #1
  308. get_sequence_of:"3006040241410401":0x04:"":MBEDTLS_ERR_ASN1_OUT_OF_DATA
  309. SEQUENCE of 2 OCTET STRINGs, second truncated in content #2
  310. get_sequence_of:"300704024141040241":0x04:"":MBEDTLS_ERR_ASN1_OUT_OF_DATA
  311. SEQUENCE of 2 OCTET STRINGs, second truncated in content #3
  312. get_sequence_of:"30080402414104034142":0x04:"":MBEDTLS_ERR_ASN1_OUT_OF_DATA
  313. SEQUENCE of 2 OCTET STRINGs (2, 0)
  314. get_sequence_of:"3006040241410400":0x04:"4,2,8,0":0
  315. SEQUENCE of 2 OCTET STRINGs (2, 1)
  316. get_sequence_of:"300704024141040142":0x04:"4,2,8,1":0
  317. SEQUENCE of 2 OCTET STRINGs (0, 2)
  318. get_sequence_of:"3006040004024141":0x04:"4,0,6,2":0
  319. SEQUENCE of 2 OCTET STRINGs (1, 2)
  320. get_sequence_of:"300704014104024242":0x04:"4,1,7,2":0
  321. Not a SEQUENCE (not CONSTRUCTED)
  322. get_sequence_of:"1000":0x04:"":MBEDTLS_ERR_ASN1_UNEXPECTED_TAG
  323. Not a SEQUENCE (not SEQUENCE)
  324. get_sequence_of:"3100":0x04:"":MBEDTLS_ERR_ASN1_UNEXPECTED_TAG
  325. Traverse empty SEQUENCE
  326. traverse_sequence_of:"3000":0:0:0:0:"":0
  327. Traverse empty SEQUENCE plus trailing garbage
  328. traverse_sequence_of:"30007e":0:0:0:0:"":MBEDTLS_ERR_ASN1_LENGTH_MISMATCH
  329. Traverse SEQUENCE of INTEGER: 1 INTEGER
  330. traverse_sequence_of:"30050203123456":0xff:0x02:0:0:"4,0x02,3":0
  331. Traverse SEQUENCE of INTEGER: 2 INTEGERs
  332. traverse_sequence_of:"30080203123456020178":0xff:0x02:0:0:"4,0x02,3,9,0x02,1":0
  333. Traverse SEQUENCE of INTEGER: INTEGER, NULL
  334. traverse_sequence_of:"300702031234560500":0xff:0x02:0:0:"4,0x02,3":MBEDTLS_ERR_ASN1_UNEXPECTED_TAG
  335. Traverse SEQUENCE of INTEGER: NULL, INTEGER
  336. traverse_sequence_of:"300705000203123456":0xff:0x02:0:0:"":MBEDTLS_ERR_ASN1_UNEXPECTED_TAG
  337. Traverse SEQUENCE of ANY: NULL, INTEGER
  338. traverse_sequence_of:"300705000203123456":0:0:0:0:"4,0x05,0,6,0x02,3":0
  339. Traverse SEQUENCE of ANY, skip non-INTEGER: INTEGER, NULL
  340. traverse_sequence_of:"300702031234560500":0:0:0xff:0x02:"4,0x02,3":0
  341. Traverse SEQUENCE of ANY, skip non-INTEGER: NULL, INTEGER
  342. traverse_sequence_of:"300705000203123456":0:0:0xff:0x02:"6,0x02,3":0
  343. Traverse SEQUENCE of INTEGER, skip everything
  344. traverse_sequence_of:"30080203123456020178":0xff:0x02:0:1:"":0
  345. Traverse SEQUENCE of {NULL, OCTET STRING}, skip NULL: OS, NULL
  346. traverse_sequence_of:"300704031234560500":0xfe:0x04:0xff:0x04:"4,0x04,3":0
  347. Traverse SEQUENCE of {NULL, OCTET STRING}, skip NULL: NULL, OS
  348. traverse_sequence_of:"300705000403123456":0xfe:0x04:0xff:0x04:"6,0x04,3":0
  349. Traverse SEQUENCE of {NULL, OCTET STRING}, skip everything
  350. traverse_sequence_of:"300705000403123456":0xfe:0x04:0:1:"":0
  351. Traverse SEQUENCE of INTEGER, stop at 0: NULL
  352. traverse_sequence_of:"30020500":0xff:0x02:0:0:"":MBEDTLS_ERR_ASN1_UNEXPECTED_TAG
  353. Traverse SEQUENCE of INTEGER, stop at 0: INTEGER
  354. traverse_sequence_of:"30050203123456":0xff:0x02:0:0:"":RET_TRAVERSE_STOP
  355. Traverse SEQUENCE of INTEGER, stop at 0: INTEGER, NULL
  356. traverse_sequence_of:"300702031234560500":0xff:0x02:0:0:"":RET_TRAVERSE_STOP
  357. Traverse SEQUENCE of INTEGER, stop at 1: INTEGER, NULL
  358. traverse_sequence_of:"300702031234560500":0xff:0x02:0:0:"4,0x02,3":MBEDTLS_ERR_ASN1_UNEXPECTED_TAG
  359. Traverse SEQUENCE of INTEGER, stop at 1: INTEGER, INTEGER
  360. traverse_sequence_of:"30080203123456020178":0xff:0x02:0:0:"4,0x02,3":RET_TRAVERSE_STOP
  361. AlgorithmIdentifier, no params
  362. get_alg:"300506034f4944":4:3:0:0:0:7:0
  363. AlgorithmIdentifier, no params, trailing garbage
  364. get_alg:"300506034f49447e":4:3:0:0:0:7:0
  365. AlgorithmIdentifier, null params
  366. get_alg:"300706034f49440500":4:3:0x05:9:0:9:0
  367. AlgorithmIdentifier, null params, trailing garbage
  368. get_alg:"300706034f494405007e":4:3:0x05:9:0:9:0
  369. AlgorithmIdentifier, OCTET STRING params
  370. get_alg:"300c06034f494404056162636465":4:3:0x04:9:5:14:0
  371. AlgorithmIdentifier, truncated before OID
  372. get_alg:"3000":4:3:0:0:0:2:MBEDTLS_ERR_ASN1_OUT_OF_DATA
  373. AlgorithmIdentifier, truncated in OID after tag
  374. get_alg:"300106":0:0:0:0:0:3:MBEDTLS_ERR_ASN1_OUT_OF_DATA
  375. AlgorithmIdentifier, truncated in OID after length
  376. get_alg:"30020603":4:3:0:0:0:4:MBEDTLS_ERR_ASN1_OUT_OF_DATA
  377. AlgorithmIdentifier, truncated inside OID content
  378. get_alg:"300406034f49":4:3:0:0:0:6:MBEDTLS_ERR_ASN1_OUT_OF_DATA
  379. AlgorithmIdentifier, truncated in params after tag
  380. get_alg:"300606034f494404":4:3:0x04:0:0:8:MBEDTLS_ERR_ASN1_OUT_OF_DATA
  381. AlgorithmIdentifier, truncated in params after length
  382. get_alg:"300706034f49440405":4:3:0x04:9:0:9:MBEDTLS_ERR_ASN1_OUT_OF_DATA
  383. AlgorithmIdentifier, truncated inside params content
  384. get_alg:"300806034f4944040561":4:3:0x04:9:5:10:MBEDTLS_ERR_ASN1_OUT_OF_DATA
  385. Not an AlgorithmIdentifier (not a SEQUENCE)
  386. get_alg:"310506034f4944":0:0:0:0:0:0:MBEDTLS_ERR_ASN1_UNEXPECTED_TAG
  387. Not an AlgorithmIdentifier (empty SEQUENCE)
  388. get_alg:"3000":0:0:0:0:0:0:MBEDTLS_ERR_ASN1_OUT_OF_DATA
  389. Not an AlgorithmIdentifier (not an OID)
  390. get_alg:"3006050006034f4944":0:0:0:0:0:0:MBEDTLS_ERR_ASN1_UNEXPECTED_TAG
  391. Not an AlgorithmIdentifier (too many elements)
  392. get_alg:"300f06034f494406034f494406034f4944":0:0:0:0:0:0:MBEDTLS_ERR_ASN1_LENGTH_MISMATCH
  393. Find named data: not found
  394. find_named_data:"414141":"424242":"434343":"444444":"7f7f7f":0:4
  395. Find named data: empty haystack
  396. find_named_data:"414141":"424242":"434343":"444444":"7f7f7f":4:4
  397. Find named data: first
  398. find_named_data:"414141":"424242":"434343":"444444":"414141":0:0
  399. Find named data: last
  400. find_named_data:"414141":"424242":"434343":"444444":"444444":0:3
  401. Find named data: skip suffix
  402. find_named_data:"41414141":"414141":"434343":"444444":"414141":0:1
  403. Find named data: skip prefix
  404. find_named_data:"4141":"414141":"434343":"444444":"414141":0:1
  405. Find named data: first match
  406. find_named_data:"414141":"414141":"434343":"444444":"414141":0:0
  407. Free named data: null pointer
  408. free_named_data_null:
  409. Free named data: all null
  410. free_named_data:0:0:0
  411. Free named data: with oid
  412. free_named_data:1:0:0
  413. Free named data: with val
  414. free_named_data:0:1:0
  415. Free named data: with next
  416. free_named_data:0:0:1
  417. Free named data list (empty)
  418. free_named_data_list:0
  419. Free named data list (1)
  420. free_named_data_list:1
  421. Free named data list (2)
  422. free_named_data_list:2