1
1
mirror of https://github.com/wader/fq.git synced 2024-12-25 14:23:18 +03:00
fq/format/asn1/testdata/laymans_guide_examples.json
Mattias Wadman 0829c167cc asn1_ber: Add decoder
Basic support, can also do CER and DER but without any extra validation.
No schema support.

Redo format doc.md usage a bit, now format/<dir>/<format>.md instead.

Related to #20
2022-02-06 22:13:03 +01:00

37 lines
2.8 KiB
JSON

[
{"hex": "03 04 06 6e 5d c0", "decoded": "011011100101110111"},
{"hex": "03 04 06 6e 5d e0", "decoded": "011011100101110111"},
{"hex": "03 81 04 06 6e 5d c0", "decoded": "011011100101110111"},
{"hex": "23 09 | 03 03 00 6e 5d | 03 02 06 c0", "decoded": "011011100101110111"},
{"hex": "16 0d 74 65 73 74 31 40 72 73 61 2e 63 6f 6d", "decoded": "test1@rsa.com"},
{"hex": "16 81 0d | 74 65 73 74 31 40 72 73 61 2e 63 6f 6d", "decoded": "test1@rsa.com"},
{"hex": "36 13 | 16 05 74 65 73 74 31 | 16 01 40 | 16 07 72 73 61 2e 63 6f 6d", "decoded": "test1@rsa.com"},
{"hex": "02 01 00", "decoded": 0},
{"hex": "02 01 7f", "decoded": 127},
{"hex": "02 02 00 80", "decoded": 128},
{"hex": "02 02 01 00", "decoded": 256},
{"hex": "02 01 80", "decoded": -128},
{"hex": "02 02 ff 7f", "decoded": -129},
{"hex": "04 08 01 23 45 67 89 ab cd ef", "decoded": "01 23 45 67 89 ab cd ef"},
{"hex": "04 81 08 01 23 45 67 89 ab cd ef", "decoded": "01 23 45 67 89 ab cd ef"},
{"hex": "24 0c | 04 04 01 23 45 67 | 04 04 89 ab cd ef", "decoded": "01 23 45 67 89 ab cd ef"},
{"hex": "13 0b 54 65 73 74 20 55 73 65 72 20 31", "decoded": "Test User 1"},
{"hex": "13 81 0b | 54 65 73 74 20 55 73 65 72 20 31", "decoded": "Test User 1"},
{"hex": "33 0f | 13 05 54 65 73 74 20 | 13 06 55 73 65 72 20 31", "decoded": "Test User 1"},
{"hex": "14 0f | 63 6c c2 65 73 20 70 75 62 6c 69 71 75 65 73", "decoded": "cl'es publiques"},
{"hex": "14 81 0f | 63 6c c2 65 73 20 70 75 62 6c 69 71 75 65 73", "decoded": "cl'es publiques"},
{"hex": "34 15 | 14 05 63 6c c2 65 73 | 14 01 20 | 14 09 70 75 62 6c 69 71 75 65 73", "decoded": "cl'es publiques"},
{"hex": "17 0d 39 31 30 35 30 36 32 33 34 35 34 30 5a", "decoded": "910506164540-0700"},
{"hex": "17 11 39 31 30 35 30 36 31 36 34 35 34 30 2d 30 37 30 30", "decoded": "910506234540Z"},
{"hex": "06 03 55 04 06", "decoded": "countryName"},
{"hex": "06 03 55 04 0a", "decoded": "organizationName"},
{"hex": "06 03 55 04 03", "decoded": "commonName"},
{"hex": "13 02 55 53", "decoded": "US"},
{"hex": "13 14 | 45 78 61 6d 70 6c 65 20 4f 72 67 61 6e 69 7a 61 | 74 69 6f 6e", "decoded": "Example Organization"},
{"hex": "13 0b | 54 65 73 74 20 55 73 65 72 20 31", "decoded": "Test User 1"},
{"hex": "30 09 | 06 03 55 04 06 | 13 02 55 53", "decoded": "US"},
{"hex": "30 1b | 06 03 55 04 0a | 13 14 45 78 61 6d 70 6c 65 20 4f 72 67 61 6e 69 7a 61 | 74 69 6f 6e", "decoded": "organizationName = Example Organization"},
{"hex": "30 12 | 06 03 55 04 0b | 13 0b 54 65 73 74 20 55 73 65 72 20 31", "decoded": "commonName = Test User 1"},
{"hex": "31 0b | 30 09 | 06 03 55 04 06 | 13 02 55 53", "decoded": ""},
{"hex": "31 1d | 30 1b | 06 03 55 04 0a | 13 14 45 78 61 6d 70 6c 65 20 4f 72 67 61 6e 69 7a 61 | 74 69 6f 6e", "decoded": ""}
]