xref: /openbsd-src/regress/lib/libcrypto/bio/bio_dump.c (revision 4322089e7b6b93a56ba1a35805ff3ec3982b2480)
1*4322089eStb /*	$OpenBSD: bio_dump.c,v 1.4 2024/02/09 12:48:32 tb Exp $ */
21cfde348Stb /*
31cfde348Stb  * Copyright (c) 2024 Theo Buehler <tb@openbsd.org>
41cfde348Stb  *
51cfde348Stb  * Permission to use, copy, modify, and distribute this software for any
61cfde348Stb  * purpose with or without fee is hereby granted, provided that the above
71cfde348Stb  * copyright notice and this permission notice appear in all copies.
81cfde348Stb  *
91cfde348Stb  * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
101cfde348Stb  * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
111cfde348Stb  * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
121cfde348Stb  * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
131cfde348Stb  * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
141cfde348Stb  * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
151cfde348Stb  * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
161cfde348Stb  */
171cfde348Stb 
181cfde348Stb #include <err.h>
191cfde348Stb #include <string.h>
201cfde348Stb 
211cfde348Stb #include <openssl/bio.h>
221cfde348Stb 
231cfde348Stb const uint8_t dump[] = {
241cfde348Stb 	0x74, 0x45, 0xc6, 0x20, 0x00, 0x00, 0x00, 0x00,
251cfde348Stb 	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
261cfde348Stb 	0x36, 0xd8, 0x61, 0x48, 0x68, 0x3c, 0xc0, 0x68,
271cfde348Stb 	0xaa, 0x15, 0x57, 0x77, 0xe3, 0xec, 0xb4, 0x98,
281cfde348Stb 	0xc6, 0x08, 0xfc, 0x59, 0xb3, 0x4f, 0x45, 0xcf,
291cfde348Stb 	0x4b, 0xc2, 0xae, 0x98, 0xb5, 0xeb, 0xe0, 0xb5,
301cfde348Stb 	0xc1, 0x68, 0xba, 0xcf, 0x7c, 0xf7, 0x7b, 0x38,
311cfde348Stb 	0x43, 0x2f, 0xb9, 0x0e, 0x23, 0x02, 0xb9, 0x4f,
321cfde348Stb 	0x8c, 0x26, 0xeb, 0xef, 0x70, 0x98, 0x82, 0xa7,
331cfde348Stb 	0xb9, 0x78, 0xc5, 0x08, 0x96, 0x99, 0xb3, 0x84,
341cfde348Stb 	0xa3, 0x4f, 0xfb, 0xd7, 0x38, 0xa9, 0xd9, 0xd4,
351cfde348Stb 	0x53, 0x0f, 0x4f, 0x64, 0x97, 0xdf, 0xcf, 0xf3,
361cfde348Stb 	0x4f, 0xc8, 0xd2, 0x56, 0x3f, 0x0d, 0x72, 0xd4,
371cfde348Stb 	0x55, 0x98, 0x89, 0xb0, 0x45, 0x26, 0x3f, 0x7a,
381cfde348Stb 	0xbd, 0x9d, 0x96, 0x15, 0xa2, 0x10, 0x14, 0x85,
391cfde348Stb 	0xaa, 0xa1, 0x7c, 0x84, 0xfb, 0xc4, 0xa5, 0x7b,
401cfde348Stb 	0xc6, 0xe3, 0xad, 0x85, 0x57, 0x96, 0xbb, 0x81,
411cfde348Stb 	0x18, 0x0c, 0xed, 0x2f, 0xf7, 0x6a, 0x4c, 0x4d,
421cfde348Stb 	0x59, 0xe1, 0xcc, 0xc5, 0x3a, 0x9f, 0x48, 0xfc,
431cfde348Stb 	0x1d, 0x7c, 0x0d, 0xa4, 0x79, 0x96, 0xe7, 0x2b,
441cfde348Stb 	0x39, 0x15, 0xf9, 0x3a, 0x6a, 0x5e, 0x7c, 0x4e,
451cfde348Stb 	0xc9, 0x3b, 0xaf, 0xeb, 0x3b, 0xcf, 0x8d, 0x6a,
461cfde348Stb 	0x57, 0xe6, 0xc5, 0xba, 0xbd, 0xa6, 0xa0, 0x6b,
471cfde348Stb 	0x03, 0xd5, 0xa3, 0x9f, 0x99, 0x2a, 0xea, 0x88,
481cfde348Stb 	0x72, 0x1b, 0x66, 0x6c, 0x5e, 0x1d, 0x49, 0xd5,
491cfde348Stb 	0x1e, 0x1e, 0xcc, 0x1a, 0xb1, 0xd8, 0xf7, 0x91,
501cfde348Stb 	0x1e, 0x1e, 0xcc, 0x1a, 0x20, 0x00, 0x20, 0x00,
511cfde348Stb 	0x20, 0x00, 0x20, 0x00, 0x20, 0x00, 0x20, 0x00,
521cfde348Stb 	0x20, 0x00, 0x20, 0x00, 0x20, 0x00, 0x20, 0x00,
531cfde348Stb 	0x20, 0x00, 0x20, 0x00, 0x20, 0x00, 0x20, 0x00,
541cfde348Stb 	0x20, 0x00, 0x20, 0x00, 0x20, 0x00,
551cfde348Stb };
561cfde348Stb #define DUMP_LEN (sizeof(dump) / sizeof(dump[0]))
571cfde348Stb 
58*4322089eStb const uint8_t bytes[] = {
59*4322089eStb 	0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07,
60*4322089eStb 	0x08, 0x09, 0x0a, 0x0b, 0x0c, 0x0d, 0x0e, 0x0f,
61*4322089eStb 	0x10, 0x11, 0x12, 0x13, 0x14, 0x15, 0x16, 0x17,
62*4322089eStb 	0x18, 0x19, 0x1a, 0x1b, 0x1c, 0x1d, 0x1e, 0x1f,
63*4322089eStb 	0x20, 0x21, 0x22, 0x23, 0x24, 0x25, 0x26, 0x27,
64*4322089eStb 	0x28, 0x29, 0x2a, 0x2b, 0x2c, 0x2d, 0x2e, 0x2f,
65*4322089eStb 	0x30, 0x31, 0x32, 0x33, 0x34, 0x35, 0x36, 0x37,
66*4322089eStb 	0x38, 0x39, 0x3a, 0x3b, 0x3c, 0x3d, 0x3e, 0x3f,
67*4322089eStb 	0x40, 0x41, 0x42, 0x43, 0x44, 0x45, 0x46, 0x47,
68*4322089eStb 	0x48, 0x49, 0x4a, 0x4b, 0x4c, 0x4d, 0x4e, 0x4f,
69*4322089eStb 	0x50, 0x51, 0x52, 0x53, 0x54, 0x55, 0x56, 0x57,
70*4322089eStb 	0x58, 0x59, 0x5a, 0x5b, 0x5c, 0x5d, 0x5e, 0x5f,
71*4322089eStb 	0x60, 0x61, 0x62, 0x63, 0x64, 0x65, 0x66, 0x67,
72*4322089eStb 	0x68, 0x69, 0x6a, 0x6b, 0x6c, 0x6d, 0x6e, 0x6f,
73*4322089eStb 	0x70, 0x71, 0x72, 0x73, 0x74, 0x75, 0x76, 0x77,
74*4322089eStb 	0x78, 0x79, 0x7a, 0x7b, 0x7c, 0x7d, 0x7e, 0x7f,
75*4322089eStb 	0x80, 0x81, 0x82, 0x83, 0x84, 0x85, 0x86, 0x87,
76*4322089eStb 	0x88, 0x89, 0x8a, 0x8b, 0x8c, 0x8d, 0x8e, 0x8f,
77*4322089eStb 	0x90, 0x91, 0x92, 0x93, 0x94, 0x95, 0x96, 0x97,
78*4322089eStb 	0x98, 0x99, 0x9a, 0x9b, 0x9c, 0x9d, 0x9e, 0x9f,
79*4322089eStb 	0xa0, 0xa1, 0xa2, 0xa3, 0xa4, 0xa5, 0xa6, 0xa7,
80*4322089eStb 	0xa8, 0xa9, 0xaa, 0xab, 0xac, 0xad, 0xae, 0xaf,
81*4322089eStb 	0xb0, 0xb1, 0xb2, 0xb3, 0xb4, 0xb5, 0xb6, 0xb7,
82*4322089eStb 	0xb8, 0xb9, 0xba, 0xbb, 0xbc, 0xbd, 0xbe, 0xbf,
83*4322089eStb 	0xc0, 0xc1, 0xc2, 0xc3, 0xc4, 0xc5, 0xc6, 0xc7,
84*4322089eStb 	0xc8, 0xc9, 0xca, 0xcb, 0xcc, 0xcd, 0xce, 0xcf,
85*4322089eStb 	0xd0, 0xd1, 0xd2, 0xd3, 0xd4, 0xd5, 0xd6, 0xd7,
86*4322089eStb 	0xd8, 0xd9, 0xda, 0xdb, 0xdc, 0xdd, 0xde, 0xdf,
87*4322089eStb 	0xe0, 0xe1, 0xe2, 0xe3, 0xe4, 0xe5, 0xe6, 0xe7,
88*4322089eStb 	0xe8, 0xe9, 0xea, 0xeb, 0xec, 0xed, 0xee, 0xef,
89*4322089eStb 	0xf0, 0xf1, 0xf2, 0xf3, 0xf4, 0xf5, 0xf6, 0xf7,
90*4322089eStb 	0xf8, 0xf9, 0xfa, 0xfb, 0xfc, 0xfd, 0xfe, 0xff,
91*4322089eStb };
92*4322089eStb #define BYTES_LEN (sizeof(bytes) / sizeof(bytes[0]))
93*4322089eStb 
941cfde348Stb static const struct bio_dump_testcase {
951cfde348Stb 	int indent;
961cfde348Stb 	const char *input;
971cfde348Stb 	int inlen;
981cfde348Stb 	const char *output;
991cfde348Stb } bio_dump_testcases[] = {
1001cfde348Stb 	{
1011cfde348Stb 		.indent = 0,
1021cfde348Stb 		.input = "",
1031cfde348Stb 		.inlen = 0,
1041cfde348Stb 		.output = "",
1051cfde348Stb 	},
1061cfde348Stb 	{
1071cfde348Stb 		.indent = 0,
1081cfde348Stb 		.input = "",
1091cfde348Stb 		.inlen = 1,
1101cfde348Stb 		.output = "0001 - <SPACES/NULS>\n",
1111cfde348Stb 	},
1121cfde348Stb 	{
1131cfde348Stb 		.indent = 6,
1141cfde348Stb 		.input = " ",
1151cfde348Stb 		.inlen = 1,
1161cfde348Stb 		.output = "      0001 - <SPACES/NULS>\n",
1171cfde348Stb 	},
1181cfde348Stb 	{
1191cfde348Stb 		.indent = -1,
1201cfde348Stb 		.input = "!",
1211cfde348Stb 		.inlen = 1,
1221cfde348Stb 		.output =
1231cfde348Stb "0000 - 21                                                !\n",
1241cfde348Stb 	},
1251cfde348Stb 	{
1261cfde348Stb 		.indent = -1,
1271cfde348Stb 		.input = "~",
1281cfde348Stb 		.inlen = 1,
1291cfde348Stb 		.output =
1301cfde348Stb "0000 - 7e                                                ~\n",
1311cfde348Stb 	},
1321cfde348Stb 	{
1331cfde348Stb 		.indent = 4,
1341cfde348Stb 		.input = dump,
1351cfde348Stb 		.inlen = DUMP_LEN,
1361cfde348Stb 		.output =
1371cfde348Stb "    0000 - 74 45 c6 20 00 00 00 00-00 00 00 00 00 00 00 00   tE. ............\n"
1381cfde348Stb "    0010 - 36 d8 61 48 68 3c c0 68-aa 15 57 77 e3 ec b4 98   6.aHh<.h..Ww....\n"
1391cfde348Stb "    0020 - c6 08 fc 59 b3 4f 45 cf-4b c2 ae 98 b5 eb e0 b5   ...Y.OE.K.......\n"
1401cfde348Stb "    0030 - c1 68 ba cf 7c f7 7b 38-43 2f b9 0e 23 02 b9 4f   .h..|.{8C/..#..O\n"
1411cfde348Stb "    0040 - 8c 26 eb ef 70 98 82 a7-b9 78 c5 08 96 99 b3 84   .&..p....x......\n"
1421cfde348Stb "    0050 - a3 4f fb d7 38 a9 d9 d4-53 0f 4f 64 97 df cf f3   .O..8...S.Od....\n"
1431cfde348Stb "    0060 - 4f c8 d2 56 3f 0d 72 d4-55 98 89 b0 45 26 3f 7a   O..V?.r.U...E&?z\n"
1441cfde348Stb "    0070 - bd 9d 96 15 a2 10 14 85-aa a1 7c 84 fb c4 a5 7b   ..........|....{\n"
1451cfde348Stb "    0080 - c6 e3 ad 85 57 96 bb 81-18 0c ed 2f f7 6a 4c 4d   ....W....../.jLM\n"
1461cfde348Stb "    0090 - 59 e1 cc c5 3a 9f 48 fc-1d 7c 0d a4 79 96 e7 2b   Y...:.H..|..y..+\n"
1471cfde348Stb "    00a0 - 39 15 f9 3a 6a 5e 7c 4e-c9 3b af eb 3b cf 8d 6a   9..:j^|N.;..;..j\n"
1481cfde348Stb "    00b0 - 57 e6 c5 ba bd a6 a0 6b-03 d5 a3 9f 99 2a ea 88   W......k.....*..\n"
1491cfde348Stb "    00c0 - 72 1b 66 6c 5e 1d 49 d5-1e 1e cc 1a b1 d8 f7 91   r.fl^.I.........\n"
1501cfde348Stb "    00d0 - 1e 1e cc 1a                                       ....\n"
1511cfde348Stb "    00f6 - <SPACES/NULS>\n",
1521cfde348Stb 	},
1531cfde348Stb 	{
1541cfde348Stb 		.indent = 11,
1551cfde348Stb 		.input = dump,
1561cfde348Stb 		.inlen = DUMP_LEN,
1571cfde348Stb 		.output =
1581cfde348Stb "           0000 - 74 45 c6 20 00 00 00 00-00 00 00 00 00 00   tE. ..........\n"
1591cfde348Stb "           000e - 00 00 36 d8 61 48 68 3c-c0 68 aa 15 57 77   ..6.aHh<.h..Ww\n"
1601cfde348Stb "           001c - e3 ec b4 98 c6 08 fc 59-b3 4f 45 cf 4b c2   .......Y.OE.K.\n"
1611cfde348Stb "           002a - ae 98 b5 eb e0 b5 c1 68-ba cf 7c f7 7b 38   .......h..|.{8\n"
1621cfde348Stb "           0038 - 43 2f b9 0e 23 02 b9 4f-8c 26 eb ef 70 98   C/..#..O.&..p.\n"
1631cfde348Stb "           0046 - 82 a7 b9 78 c5 08 96 99-b3 84 a3 4f fb d7   ...x.......O..\n"
1641cfde348Stb "           0054 - 38 a9 d9 d4 53 0f 4f 64-97 df cf f3 4f c8   8...S.Od....O.\n"
1651cfde348Stb "           0062 - d2 56 3f 0d 72 d4 55 98-89 b0 45 26 3f 7a   .V?.r.U...E&?z\n"
1661cfde348Stb "           0070 - bd 9d 96 15 a2 10 14 85-aa a1 7c 84 fb c4   ..........|...\n"
1671cfde348Stb "           007e - a5 7b c6 e3 ad 85 57 96-bb 81 18 0c ed 2f   .{....W....../\n"
1681cfde348Stb "           008c - f7 6a 4c 4d 59 e1 cc c5-3a 9f 48 fc 1d 7c   .jLMY...:.H..|\n"
1691cfde348Stb "           009a - 0d a4 79 96 e7 2b 39 15-f9 3a 6a 5e 7c 4e   ..y..+9..:j^|N\n"
1701cfde348Stb "           00a8 - c9 3b af eb 3b cf 8d 6a-57 e6 c5 ba bd a6   .;..;..jW.....\n"
1711cfde348Stb "           00b6 - a0 6b 03 d5 a3 9f 99 2a-ea 88 72 1b 66 6c   .k.....*..r.fl\n"
1721cfde348Stb "           00c4 - 5e 1d 49 d5 1e 1e cc 1a-b1 d8 f7 91 1e 1e   ^.I...........\n"
1731cfde348Stb "           00d2 - cc 1a                                       ..\n"
1741cfde348Stb "           00f6 - <SPACES/NULS>\n",
1751cfde348Stb 	},
1761cfde348Stb 	{
1771cfde348Stb 		.indent = 18,
1781cfde348Stb 		.input = dump,
1791cfde348Stb 		.inlen = DUMP_LEN,
1801cfde348Stb 		.output =
1811cfde348Stb "                  0000 - 74 45 c6 20 00 00 00 00-00 00 00 00 00   tE. .........\n"
1821cfde348Stb "                  000d - 00 00 00 36 d8 61 48 68-3c c0 68 aa 15   ...6.aHh<.h..\n"
1831cfde348Stb "                  001a - 57 77 e3 ec b4 98 c6 08-fc 59 b3 4f 45   Ww.......Y.OE\n"
1841cfde348Stb "                  0027 - cf 4b c2 ae 98 b5 eb e0-b5 c1 68 ba cf   .K........h..\n"
1851cfde348Stb "                  0034 - 7c f7 7b 38 43 2f b9 0e-23 02 b9 4f 8c   |.{8C/..#..O.\n"
1861cfde348Stb "                  0041 - 26 eb ef 70 98 82 a7 b9-78 c5 08 96 99   &..p....x....\n"
1871cfde348Stb "                  004e - b3 84 a3 4f fb d7 38 a9-d9 d4 53 0f 4f   ...O..8...S.O\n"
1881cfde348Stb "                  005b - 64 97 df cf f3 4f c8 d2-56 3f 0d 72 d4   d....O..V?.r.\n"
1891cfde348Stb "                  0068 - 55 98 89 b0 45 26 3f 7a-bd 9d 96 15 a2   U...E&?z.....\n"
1901cfde348Stb "                  0075 - 10 14 85 aa a1 7c 84 fb-c4 a5 7b c6 e3   .....|....{..\n"
1911cfde348Stb "                  0082 - ad 85 57 96 bb 81 18 0c-ed 2f f7 6a 4c   ..W....../.jL\n"
1921cfde348Stb "                  008f - 4d 59 e1 cc c5 3a 9f 48-fc 1d 7c 0d a4   MY...:.H..|..\n"
1931cfde348Stb "                  009c - 79 96 e7 2b 39 15 f9 3a-6a 5e 7c 4e c9   y..+9..:j^|N.\n"
1941cfde348Stb "                  00a9 - 3b af eb 3b cf 8d 6a 57-e6 c5 ba bd a6   ;..;..jW.....\n"
1951cfde348Stb "                  00b6 - a0 6b 03 d5 a3 9f 99 2a-ea 88 72 1b 66   .k.....*..r.f\n"
1961cfde348Stb "                  00c3 - 6c 5e 1d 49 d5 1e 1e cc-1a b1 d8 f7 91   l^.I.........\n"
1971cfde348Stb "                  00d0 - 1e 1e cc 1a                              ....\n"
1981cfde348Stb "                  00f6 - <SPACES/NULS>\n",
1991cfde348Stb 	},
2001cfde348Stb 	{
2011cfde348Stb 		.indent = 25,
2021cfde348Stb 		.input = dump,
2031cfde348Stb 		.inlen = DUMP_LEN,
2041cfde348Stb 		.output =
2051cfde348Stb "                         0000 - 74 45 c6 20 00 00 00 00-00 00 00   tE. .......\n"
2061cfde348Stb "                         000b - 00 00 00 00 00 36 d8 61-48 68 3c   .....6.aHh<\n"
2071cfde348Stb "                         0016 - c0 68 aa 15 57 77 e3 ec-b4 98 c6   .h..Ww.....\n"
2081cfde348Stb "                         0021 - 08 fc 59 b3 4f 45 cf 4b-c2 ae 98   ..Y.OE.K...\n"
2091cfde348Stb "                         002c - b5 eb e0 b5 c1 68 ba cf-7c f7 7b   .....h..|.{\n"
2101cfde348Stb "                         0037 - 38 43 2f b9 0e 23 02 b9-4f 8c 26   8C/..#..O.&\n"
2111cfde348Stb "                         0042 - eb ef 70 98 82 a7 b9 78-c5 08 96   ..p....x...\n"
2121cfde348Stb "                         004d - 99 b3 84 a3 4f fb d7 38-a9 d9 d4   ....O..8...\n"
2131cfde348Stb "                         0058 - 53 0f 4f 64 97 df cf f3-4f c8 d2   S.Od....O..\n"
2141cfde348Stb "                         0063 - 56 3f 0d 72 d4 55 98 89-b0 45 26   V?.r.U...E&\n"
2151cfde348Stb "                         006e - 3f 7a bd 9d 96 15 a2 10-14 85 aa   ?z.........\n"
2161cfde348Stb "                         0079 - a1 7c 84 fb c4 a5 7b c6-e3 ad 85   .|....{....\n"
2171cfde348Stb "                         0084 - 57 96 bb 81 18 0c ed 2f-f7 6a 4c   W....../.jL\n"
2181cfde348Stb "                         008f - 4d 59 e1 cc c5 3a 9f 48-fc 1d 7c   MY...:.H..|\n"
2191cfde348Stb "                         009a - 0d a4 79 96 e7 2b 39 15-f9 3a 6a   ..y..+9..:j\n"
2201cfde348Stb "                         00a5 - 5e 7c 4e c9 3b af eb 3b-cf 8d 6a   ^|N.;..;..j\n"
2211cfde348Stb "                         00b0 - 57 e6 c5 ba bd a6 a0 6b-03 d5 a3   W......k...\n"
2221cfde348Stb "                         00bb - 9f 99 2a ea 88 72 1b 66-6c 5e 1d   ..*..r.fl^.\n"
2231cfde348Stb "                         00c6 - 49 d5 1e 1e cc 1a b1 d8-f7 91 1e   I..........\n"
2241cfde348Stb "                         00d1 - 1e cc 1a                           ...\n"
2251cfde348Stb "                         00f6 - <SPACES/NULS>\n",
2261cfde348Stb 	},
2271cfde348Stb 	{
2281cfde348Stb 		.indent = 32,
2291cfde348Stb 		.input = dump,
2301cfde348Stb 		.inlen = DUMP_LEN,
2311cfde348Stb 		.output =
2321cfde348Stb "                                0000 - 74 45 c6 20 00 00 00 00-00   tE. .....\n"
2331cfde348Stb "                                0009 - 00 00 00 00 00 00 00 36-d8   .......6.\n"
2341cfde348Stb "                                0012 - 61 48 68 3c c0 68 aa 15-57   aHh<.h..W\n"
2351cfde348Stb "                                001b - 77 e3 ec b4 98 c6 08 fc-59   w.......Y\n"
2361cfde348Stb "                                0024 - b3 4f 45 cf 4b c2 ae 98-b5   .OE.K....\n"
2371cfde348Stb "                                002d - eb e0 b5 c1 68 ba cf 7c-f7   ....h..|.\n"
2381cfde348Stb "                                0036 - 7b 38 43 2f b9 0e 23 02-b9   {8C/..#..\n"
2391cfde348Stb "                                003f - 4f 8c 26 eb ef 70 98 82-a7   O.&..p...\n"
2401cfde348Stb "                                0048 - b9 78 c5 08 96 99 b3 84-a3   .x.......\n"
2411cfde348Stb "                                0051 - 4f fb d7 38 a9 d9 d4 53-0f   O..8...S.\n"
2421cfde348Stb "                                005a - 4f 64 97 df cf f3 4f c8-d2   Od....O..\n"
2431cfde348Stb "                                0063 - 56 3f 0d 72 d4 55 98 89-b0   V?.r.U...\n"
2441cfde348Stb "                                006c - 45 26 3f 7a bd 9d 96 15-a2   E&?z.....\n"
2451cfde348Stb "                                0075 - 10 14 85 aa a1 7c 84 fb-c4   .....|...\n"
2461cfde348Stb "                                007e - a5 7b c6 e3 ad 85 57 96-bb   .{....W..\n"
2471cfde348Stb "                                0087 - 81 18 0c ed 2f f7 6a 4c-4d   ..../.jLM\n"
2481cfde348Stb "                                0090 - 59 e1 cc c5 3a 9f 48 fc-1d   Y...:.H..\n"
2491cfde348Stb "                                0099 - 7c 0d a4 79 96 e7 2b 39-15   |..y..+9.\n"
2501cfde348Stb "                                00a2 - f9 3a 6a 5e 7c 4e c9 3b-af   .:j^|N.;.\n"
2511cfde348Stb "                                00ab - eb 3b cf 8d 6a 57 e6 c5-ba   .;..jW...\n"
2521cfde348Stb "                                00b4 - bd a6 a0 6b 03 d5 a3 9f-99   ...k.....\n"
2531cfde348Stb "                                00bd - 2a ea 88 72 1b 66 6c 5e-1d   *..r.fl^.\n"
2541cfde348Stb "                                00c6 - 49 d5 1e 1e cc 1a b1 d8-f7   I........\n"
2551cfde348Stb "                                00cf - 91 1e 1e cc 1a               .....\n"
2561cfde348Stb "                                00f6 - <SPACES/NULS>\n",
2571cfde348Stb 	},
2581cfde348Stb 	{
2597f53621bStb 		.indent = 35,
2607f53621bStb 		.input = dump,
2617f53621bStb 		.inlen = DUMP_LEN,
2627f53621bStb 		.output =
2637f53621bStb "                                   0000 - 74 45 c6 20 00 00 00 00-  tE. ....\n"
2647f53621bStb "                                   0008 - 00 00 00 00 00 00 00 00-  ........\n"
2657f53621bStb "                                   0010 - 36 d8 61 48 68 3c c0 68-  6.aHh<.h\n"
2667f53621bStb "                                   0018 - aa 15 57 77 e3 ec b4 98-  ..Ww....\n"
2677f53621bStb "                                   0020 - c6 08 fc 59 b3 4f 45 cf-  ...Y.OE.\n"
2687f53621bStb "                                   0028 - 4b c2 ae 98 b5 eb e0 b5-  K.......\n"
2697f53621bStb "                                   0030 - c1 68 ba cf 7c f7 7b 38-  .h..|.{8\n"
2707f53621bStb "                                   0038 - 43 2f b9 0e 23 02 b9 4f-  C/..#..O\n"
2717f53621bStb "                                   0040 - 8c 26 eb ef 70 98 82 a7-  .&..p...\n"
2727f53621bStb "                                   0048 - b9 78 c5 08 96 99 b3 84-  .x......\n"
2737f53621bStb "                                   0050 - a3 4f fb d7 38 a9 d9 d4-  .O..8...\n"
2747f53621bStb "                                   0058 - 53 0f 4f 64 97 df cf f3-  S.Od....\n"
2757f53621bStb "                                   0060 - 4f c8 d2 56 3f 0d 72 d4-  O..V?.r.\n"
2767f53621bStb "                                   0068 - 55 98 89 b0 45 26 3f 7a-  U...E&?z\n"
2777f53621bStb "                                   0070 - bd 9d 96 15 a2 10 14 85-  ........\n"
2787f53621bStb "                                   0078 - aa a1 7c 84 fb c4 a5 7b-  ..|....{\n"
2797f53621bStb "                                   0080 - c6 e3 ad 85 57 96 bb 81-  ....W...\n"
2807f53621bStb "                                   0088 - 18 0c ed 2f f7 6a 4c 4d-  .../.jLM\n"
2817f53621bStb "                                   0090 - 59 e1 cc c5 3a 9f 48 fc-  Y...:.H.\n"
2827f53621bStb "                                   0098 - 1d 7c 0d a4 79 96 e7 2b-  .|..y..+\n"
2837f53621bStb "                                   00a0 - 39 15 f9 3a 6a 5e 7c 4e-  9..:j^|N\n"
2847f53621bStb "                                   00a8 - c9 3b af eb 3b cf 8d 6a-  .;..;..j\n"
2857f53621bStb "                                   00b0 - 57 e6 c5 ba bd a6 a0 6b-  W......k\n"
2867f53621bStb "                                   00b8 - 03 d5 a3 9f 99 2a ea 88-  .....*..\n"
2877f53621bStb "                                   00c0 - 72 1b 66 6c 5e 1d 49 d5-  r.fl^.I.\n"
2887f53621bStb "                                   00c8 - 1e 1e cc 1a b1 d8 f7 91-  ........\n"
2897f53621bStb "                                   00d0 - 1e 1e cc 1a               ....\n"
2907f53621bStb "                                   00f6 - <SPACES/NULS>\n",
2917f53621bStb 	},
2927f53621bStb 	{
2931cfde348Stb 		.indent = 39,
2941cfde348Stb 		.input = dump,
2951cfde348Stb 		.inlen = DUMP_LEN,
2961cfde348Stb 		.output =
2971cfde348Stb "                                       0000 - 74 45 c6 20 00 00 00   tE. ...\n"
2981cfde348Stb "                                       0007 - 00 00 00 00 00 00 00   .......\n"
2991cfde348Stb "                                       000e - 00 00 36 d8 61 48 68   ..6.aHh\n"
3001cfde348Stb "                                       0015 - 3c c0 68 aa 15 57 77   <.h..Ww\n"
3011cfde348Stb "                                       001c - e3 ec b4 98 c6 08 fc   .......\n"
3021cfde348Stb "                                       0023 - 59 b3 4f 45 cf 4b c2   Y.OE.K.\n"
3031cfde348Stb "                                       002a - ae 98 b5 eb e0 b5 c1   .......\n"
3041cfde348Stb "                                       0031 - 68 ba cf 7c f7 7b 38   h..|.{8\n"
3051cfde348Stb "                                       0038 - 43 2f b9 0e 23 02 b9   C/..#..\n"
3061cfde348Stb "                                       003f - 4f 8c 26 eb ef 70 98   O.&..p.\n"
3071cfde348Stb "                                       0046 - 82 a7 b9 78 c5 08 96   ...x...\n"
3081cfde348Stb "                                       004d - 99 b3 84 a3 4f fb d7   ....O..\n"
3091cfde348Stb "                                       0054 - 38 a9 d9 d4 53 0f 4f   8...S.O\n"
3101cfde348Stb "                                       005b - 64 97 df cf f3 4f c8   d....O.\n"
3111cfde348Stb "                                       0062 - d2 56 3f 0d 72 d4 55   .V?.r.U\n"
3121cfde348Stb "                                       0069 - 98 89 b0 45 26 3f 7a   ...E&?z\n"
3131cfde348Stb "                                       0070 - bd 9d 96 15 a2 10 14   .......\n"
3141cfde348Stb "                                       0077 - 85 aa a1 7c 84 fb c4   ...|...\n"
3151cfde348Stb "                                       007e - a5 7b c6 e3 ad 85 57   .{....W\n"
3161cfde348Stb "                                       0085 - 96 bb 81 18 0c ed 2f   ....../\n"
3171cfde348Stb "                                       008c - f7 6a 4c 4d 59 e1 cc   .jLMY..\n"
3181cfde348Stb "                                       0093 - c5 3a 9f 48 fc 1d 7c   .:.H..|\n"
3191cfde348Stb "                                       009a - 0d a4 79 96 e7 2b 39   ..y..+9\n"
3201cfde348Stb "                                       00a1 - 15 f9 3a 6a 5e 7c 4e   ..:j^|N\n"
3211cfde348Stb "                                       00a8 - c9 3b af eb 3b cf 8d   .;..;..\n"
3221cfde348Stb "                                       00af - 6a 57 e6 c5 ba bd a6   jW.....\n"
3231cfde348Stb "                                       00b6 - a0 6b 03 d5 a3 9f 99   .k.....\n"
3241cfde348Stb "                                       00bd - 2a ea 88 72 1b 66 6c   *..r.fl\n"
3251cfde348Stb "                                       00c4 - 5e 1d 49 d5 1e 1e cc   ^.I....\n"
3261cfde348Stb "                                       00cb - 1a b1 d8 f7 91 1e 1e   .......\n"
3271cfde348Stb "                                       00d2 - cc 1a                  ..\n"
3281cfde348Stb "                                       00f6 - <SPACES/NULS>\n",
3291cfde348Stb 	},
3301cfde348Stb 	{
3311cfde348Stb 		.indent = 46,
3321cfde348Stb 		.input = dump,
3331cfde348Stb 		.inlen = DUMP_LEN,
3341cfde348Stb 		.output =
3351cfde348Stb "                                              0000 - 74 45 c6 20 00 00   tE. ..\n"
3361cfde348Stb "                                              0006 - 00 00 00 00 00 00   ......\n"
3371cfde348Stb "                                              000c - 00 00 00 00 36 d8   ....6.\n"
3381cfde348Stb "                                              0012 - 61 48 68 3c c0 68   aHh<.h\n"
3391cfde348Stb "                                              0018 - aa 15 57 77 e3 ec   ..Ww..\n"
3401cfde348Stb "                                              001e - b4 98 c6 08 fc 59   .....Y\n"
3411cfde348Stb "                                              0024 - b3 4f 45 cf 4b c2   .OE.K.\n"
3421cfde348Stb "                                              002a - ae 98 b5 eb e0 b5   ......\n"
3431cfde348Stb "                                              0030 - c1 68 ba cf 7c f7   .h..|.\n"
3441cfde348Stb "                                              0036 - 7b 38 43 2f b9 0e   {8C/..\n"
3451cfde348Stb "                                              003c - 23 02 b9 4f 8c 26   #..O.&\n"
3461cfde348Stb "                                              0042 - eb ef 70 98 82 a7   ..p...\n"
3471cfde348Stb "                                              0048 - b9 78 c5 08 96 99   .x....\n"
3481cfde348Stb "                                              004e - b3 84 a3 4f fb d7   ...O..\n"
3491cfde348Stb "                                              0054 - 38 a9 d9 d4 53 0f   8...S.\n"
3501cfde348Stb "                                              005a - 4f 64 97 df cf f3   Od....\n"
3511cfde348Stb "                                              0060 - 4f c8 d2 56 3f 0d   O..V?.\n"
3521cfde348Stb "                                              0066 - 72 d4 55 98 89 b0   r.U...\n"
3531cfde348Stb "                                              006c - 45 26 3f 7a bd 9d   E&?z..\n"
3541cfde348Stb "                                              0072 - 96 15 a2 10 14 85   ......\n"
3551cfde348Stb "                                              0078 - aa a1 7c 84 fb c4   ..|...\n"
3561cfde348Stb "                                              007e - a5 7b c6 e3 ad 85   .{....\n"
3571cfde348Stb "                                              0084 - 57 96 bb 81 18 0c   W.....\n"
3581cfde348Stb "                                              008a - ed 2f f7 6a 4c 4d   ./.jLM\n"
3591cfde348Stb "                                              0090 - 59 e1 cc c5 3a 9f   Y...:.\n"
3601cfde348Stb "                                              0096 - 48 fc 1d 7c 0d a4   H..|..\n"
3611cfde348Stb "                                              009c - 79 96 e7 2b 39 15   y..+9.\n"
3621cfde348Stb "                                              00a2 - f9 3a 6a 5e 7c 4e   .:j^|N\n"
3631cfde348Stb "                                              00a8 - c9 3b af eb 3b cf   .;..;.\n"
3641cfde348Stb "                                              00ae - 8d 6a 57 e6 c5 ba   .jW...\n"
3651cfde348Stb "                                              00b4 - bd a6 a0 6b 03 d5   ...k..\n"
3661cfde348Stb "                                              00ba - a3 9f 99 2a ea 88   ...*..\n"
3671cfde348Stb "                                              00c0 - 72 1b 66 6c 5e 1d   r.fl^.\n"
3681cfde348Stb "                                              00c6 - 49 d5 1e 1e cc 1a   I.....\n"
3691cfde348Stb "                                              00cc - b1 d8 f7 91 1e 1e   ......\n"
3701cfde348Stb "                                              00d2 - cc 1a               ..\n"
3711cfde348Stb "                                              00f6 - <SPACES/NULS>\n",
3721cfde348Stb 	},
3731cfde348Stb 	{
3741cfde348Stb 		.indent = 53,
3751cfde348Stb 		.input = dump,
3761cfde348Stb 		.inlen = DUMP_LEN,
3771cfde348Stb 		.output =
3781cfde348Stb "                                                     0000 - 74 45 c6 20   tE. \n"
3791cfde348Stb "                                                     0004 - 00 00 00 00   ....\n"
3801cfde348Stb "                                                     0008 - 00 00 00 00   ....\n"
3811cfde348Stb "                                                     000c - 00 00 00 00   ....\n"
3821cfde348Stb "                                                     0010 - 36 d8 61 48   6.aH\n"
3831cfde348Stb "                                                     0014 - 68 3c c0 68   h<.h\n"
3841cfde348Stb "                                                     0018 - aa 15 57 77   ..Ww\n"
3851cfde348Stb "                                                     001c - e3 ec b4 98   ....\n"
3861cfde348Stb "                                                     0020 - c6 08 fc 59   ...Y\n"
3871cfde348Stb "                                                     0024 - b3 4f 45 cf   .OE.\n"
3881cfde348Stb "                                                     0028 - 4b c2 ae 98   K...\n"
3891cfde348Stb "                                                     002c - b5 eb e0 b5   ....\n"
3901cfde348Stb "                                                     0030 - c1 68 ba cf   .h..\n"
3911cfde348Stb "                                                     0034 - 7c f7 7b 38   |.{8\n"
3921cfde348Stb "                                                     0038 - 43 2f b9 0e   C/..\n"
3931cfde348Stb "                                                     003c - 23 02 b9 4f   #..O\n"
3941cfde348Stb "                                                     0040 - 8c 26 eb ef   .&..\n"
3951cfde348Stb "                                                     0044 - 70 98 82 a7   p...\n"
3961cfde348Stb "                                                     0048 - b9 78 c5 08   .x..\n"
3971cfde348Stb "                                                     004c - 96 99 b3 84   ....\n"
3981cfde348Stb "                                                     0050 - a3 4f fb d7   .O..\n"
3991cfde348Stb "                                                     0054 - 38 a9 d9 d4   8...\n"
4001cfde348Stb "                                                     0058 - 53 0f 4f 64   S.Od\n"
4011cfde348Stb "                                                     005c - 97 df cf f3   ....\n"
4021cfde348Stb "                                                     0060 - 4f c8 d2 56   O..V\n"
4031cfde348Stb "                                                     0064 - 3f 0d 72 d4   ?.r.\n"
4041cfde348Stb "                                                     0068 - 55 98 89 b0   U...\n"
4051cfde348Stb "                                                     006c - 45 26 3f 7a   E&?z\n"
4061cfde348Stb "                                                     0070 - bd 9d 96 15   ....\n"
4071cfde348Stb "                                                     0074 - a2 10 14 85   ....\n"
4081cfde348Stb "                                                     0078 - aa a1 7c 84   ..|.\n"
4091cfde348Stb "                                                     007c - fb c4 a5 7b   ...{\n"
4101cfde348Stb "                                                     0080 - c6 e3 ad 85   ....\n"
4111cfde348Stb "                                                     0084 - 57 96 bb 81   W...\n"
4121cfde348Stb "                                                     0088 - 18 0c ed 2f   .../\n"
4131cfde348Stb "                                                     008c - f7 6a 4c 4d   .jLM\n"
4141cfde348Stb "                                                     0090 - 59 e1 cc c5   Y...\n"
4151cfde348Stb "                                                     0094 - 3a 9f 48 fc   :.H.\n"
4161cfde348Stb "                                                     0098 - 1d 7c 0d a4   .|..\n"
4171cfde348Stb "                                                     009c - 79 96 e7 2b   y..+\n"
4181cfde348Stb "                                                     00a0 - 39 15 f9 3a   9..:\n"
4191cfde348Stb "                                                     00a4 - 6a 5e 7c 4e   j^|N\n"
4201cfde348Stb "                                                     00a8 - c9 3b af eb   .;..\n"
4211cfde348Stb "                                                     00ac - 3b cf 8d 6a   ;..j\n"
4221cfde348Stb "                                                     00b0 - 57 e6 c5 ba   W...\n"
4231cfde348Stb "                                                     00b4 - bd a6 a0 6b   ...k\n"
4241cfde348Stb "                                                     00b8 - 03 d5 a3 9f   ....\n"
4251cfde348Stb "                                                     00bc - 99 2a ea 88   .*..\n"
4261cfde348Stb "                                                     00c0 - 72 1b 66 6c   r.fl\n"
4271cfde348Stb "                                                     00c4 - 5e 1d 49 d5   ^.I.\n"
4281cfde348Stb "                                                     00c8 - 1e 1e cc 1a   ....\n"
4291cfde348Stb "                                                     00cc - b1 d8 f7 91   ....\n"
4301cfde348Stb "                                                     00d0 - 1e 1e cc 1a   ....\n"
4311cfde348Stb "                                                     00f6 - <SPACES/NULS>\n",
4321cfde348Stb 	},
4331cfde348Stb 	{
4341cfde348Stb 		.indent = 60,
4351cfde348Stb 		.input = dump,
4361cfde348Stb 		.inlen = DUMP_LEN,
4371cfde348Stb 		.output =
4381cfde348Stb "                                                            0000 - 74 45   tE\n"
4391cfde348Stb "                                                            0002 - c6 20   . \n"
4401cfde348Stb "                                                            0004 - 00 00   ..\n"
4411cfde348Stb "                                                            0006 - 00 00   ..\n"
4421cfde348Stb "                                                            0008 - 00 00   ..\n"
4431cfde348Stb "                                                            000a - 00 00   ..\n"
4441cfde348Stb "                                                            000c - 00 00   ..\n"
4451cfde348Stb "                                                            000e - 00 00   ..\n"
4461cfde348Stb "                                                            0010 - 36 d8   6.\n"
4471cfde348Stb "                                                            0012 - 61 48   aH\n"
4481cfde348Stb "                                                            0014 - 68 3c   h<\n"
4491cfde348Stb "                                                            0016 - c0 68   .h\n"
4501cfde348Stb "                                                            0018 - aa 15   ..\n"
4511cfde348Stb "                                                            001a - 57 77   Ww\n"
4521cfde348Stb "                                                            001c - e3 ec   ..\n"
4531cfde348Stb "                                                            001e - b4 98   ..\n"
4541cfde348Stb "                                                            0020 - c6 08   ..\n"
4551cfde348Stb "                                                            0022 - fc 59   .Y\n"
4561cfde348Stb "                                                            0024 - b3 4f   .O\n"
4571cfde348Stb "                                                            0026 - 45 cf   E.\n"
4581cfde348Stb "                                                            0028 - 4b c2   K.\n"
4591cfde348Stb "                                                            002a - ae 98   ..\n"
4601cfde348Stb "                                                            002c - b5 eb   ..\n"
4611cfde348Stb "                                                            002e - e0 b5   ..\n"
4621cfde348Stb "                                                            0030 - c1 68   .h\n"
4631cfde348Stb "                                                            0032 - ba cf   ..\n"
4641cfde348Stb "                                                            0034 - 7c f7   |.\n"
4651cfde348Stb "                                                            0036 - 7b 38   {8\n"
4661cfde348Stb "                                                            0038 - 43 2f   C/\n"
4671cfde348Stb "                                                            003a - b9 0e   ..\n"
4681cfde348Stb "                                                            003c - 23 02   #.\n"
4691cfde348Stb "                                                            003e - b9 4f   .O\n"
4701cfde348Stb "                                                            0040 - 8c 26   .&\n"
4711cfde348Stb "                                                            0042 - eb ef   ..\n"
4721cfde348Stb "                                                            0044 - 70 98   p.\n"
4731cfde348Stb "                                                            0046 - 82 a7   ..\n"
4741cfde348Stb "                                                            0048 - b9 78   .x\n"
4751cfde348Stb "                                                            004a - c5 08   ..\n"
4761cfde348Stb "                                                            004c - 96 99   ..\n"
4771cfde348Stb "                                                            004e - b3 84   ..\n"
4781cfde348Stb "                                                            0050 - a3 4f   .O\n"
4791cfde348Stb "                                                            0052 - fb d7   ..\n"
4801cfde348Stb "                                                            0054 - 38 a9   8.\n"
4811cfde348Stb "                                                            0056 - d9 d4   ..\n"
4821cfde348Stb "                                                            0058 - 53 0f   S.\n"
4831cfde348Stb "                                                            005a - 4f 64   Od\n"
4841cfde348Stb "                                                            005c - 97 df   ..\n"
4851cfde348Stb "                                                            005e - cf f3   ..\n"
4861cfde348Stb "                                                            0060 - 4f c8   O.\n"
4871cfde348Stb "                                                            0062 - d2 56   .V\n"
4881cfde348Stb "                                                            0064 - 3f 0d   ?.\n"
4891cfde348Stb "                                                            0066 - 72 d4   r.\n"
4901cfde348Stb "                                                            0068 - 55 98   U.\n"
4911cfde348Stb "                                                            006a - 89 b0   ..\n"
4921cfde348Stb "                                                            006c - 45 26   E&\n"
4931cfde348Stb "                                                            006e - 3f 7a   ?z\n"
4941cfde348Stb "                                                            0070 - bd 9d   ..\n"
4951cfde348Stb "                                                            0072 - 96 15   ..\n"
4961cfde348Stb "                                                            0074 - a2 10   ..\n"
4971cfde348Stb "                                                            0076 - 14 85   ..\n"
4981cfde348Stb "                                                            0078 - aa a1   ..\n"
4991cfde348Stb "                                                            007a - 7c 84   |.\n"
5001cfde348Stb "                                                            007c - fb c4   ..\n"
5011cfde348Stb "                                                            007e - a5 7b   .{\n"
5021cfde348Stb "                                                            0080 - c6 e3   ..\n"
5031cfde348Stb "                                                            0082 - ad 85   ..\n"
5041cfde348Stb "                                                            0084 - 57 96   W.\n"
5051cfde348Stb "                                                            0086 - bb 81   ..\n"
5061cfde348Stb "                                                            0088 - 18 0c   ..\n"
5071cfde348Stb "                                                            008a - ed 2f   ./\n"
5081cfde348Stb "                                                            008c - f7 6a   .j\n"
5091cfde348Stb "                                                            008e - 4c 4d   LM\n"
5101cfde348Stb "                                                            0090 - 59 e1   Y.\n"
5111cfde348Stb "                                                            0092 - cc c5   ..\n"
5121cfde348Stb "                                                            0094 - 3a 9f   :.\n"
5131cfde348Stb "                                                            0096 - 48 fc   H.\n"
5141cfde348Stb "                                                            0098 - 1d 7c   .|\n"
5151cfde348Stb "                                                            009a - 0d a4   ..\n"
5161cfde348Stb "                                                            009c - 79 96   y.\n"
5171cfde348Stb "                                                            009e - e7 2b   .+\n"
5181cfde348Stb "                                                            00a0 - 39 15   9.\n"
5191cfde348Stb "                                                            00a2 - f9 3a   .:\n"
5201cfde348Stb "                                                            00a4 - 6a 5e   j^\n"
5211cfde348Stb "                                                            00a6 - 7c 4e   |N\n"
5221cfde348Stb "                                                            00a8 - c9 3b   .;\n"
5231cfde348Stb "                                                            00aa - af eb   ..\n"
5241cfde348Stb "                                                            00ac - 3b cf   ;.\n"
5251cfde348Stb "                                                            00ae - 8d 6a   .j\n"
5261cfde348Stb "                                                            00b0 - 57 e6   W.\n"
5271cfde348Stb "                                                            00b2 - c5 ba   ..\n"
5281cfde348Stb "                                                            00b4 - bd a6   ..\n"
5291cfde348Stb "                                                            00b6 - a0 6b   .k\n"
5301cfde348Stb "                                                            00b8 - 03 d5   ..\n"
5311cfde348Stb "                                                            00ba - a3 9f   ..\n"
5321cfde348Stb "                                                            00bc - 99 2a   .*\n"
5331cfde348Stb "                                                            00be - ea 88   ..\n"
5341cfde348Stb "                                                            00c0 - 72 1b   r.\n"
5351cfde348Stb "                                                            00c2 - 66 6c   fl\n"
5361cfde348Stb "                                                            00c4 - 5e 1d   ^.\n"
5371cfde348Stb "                                                            00c6 - 49 d5   I.\n"
5381cfde348Stb "                                                            00c8 - 1e 1e   ..\n"
5391cfde348Stb "                                                            00ca - cc 1a   ..\n"
5401cfde348Stb "                                                            00cc - b1 d8   ..\n"
5411cfde348Stb "                                                            00ce - f7 91   ..\n"
5421cfde348Stb "                                                            00d0 - 1e 1e   ..\n"
5431cfde348Stb "                                                            00d2 - cc 1a   ..\n"
5441cfde348Stb "                                                            00f6 - <SPACES/NULS>\n",
5451cfde348Stb 	},
5461cfde348Stb 	{
5471cfde348Stb 		.indent = 67,
5481cfde348Stb 		.input = dump,
5491cfde348Stb 		.inlen = DUMP_LEN,
5501cfde348Stb 		.output =
5511cfde348Stb "                                                                0000 - 74   t\n"
5521cfde348Stb "                                                                0001 - 45   E\n"
5531cfde348Stb "                                                                0002 - c6   .\n"
5541cfde348Stb "                                                                0003 - 20    \n"
5551cfde348Stb "                                                                0004 - 00   .\n"
5561cfde348Stb "                                                                0005 - 00   .\n"
5571cfde348Stb "                                                                0006 - 00   .\n"
5581cfde348Stb "                                                                0007 - 00   .\n"
5591cfde348Stb "                                                                0008 - 00   .\n"
5601cfde348Stb "                                                                0009 - 00   .\n"
5611cfde348Stb "                                                                000a - 00   .\n"
5621cfde348Stb "                                                                000b - 00   .\n"
5631cfde348Stb "                                                                000c - 00   .\n"
5641cfde348Stb "                                                                000d - 00   .\n"
5651cfde348Stb "                                                                000e - 00   .\n"
5661cfde348Stb "                                                                000f - 00   .\n"
5671cfde348Stb "                                                                0010 - 36   6\n"
5681cfde348Stb "                                                                0011 - d8   .\n"
5691cfde348Stb "                                                                0012 - 61   a\n"
5701cfde348Stb "                                                                0013 - 48   H\n"
5711cfde348Stb "                                                                0014 - 68   h\n"
5721cfde348Stb "                                                                0015 - 3c   <\n"
5731cfde348Stb "                                                                0016 - c0   .\n"
5741cfde348Stb "                                                                0017 - 68   h\n"
5751cfde348Stb "                                                                0018 - aa   .\n"
5761cfde348Stb "                                                                0019 - 15   .\n"
5771cfde348Stb "                                                                001a - 57   W\n"
5781cfde348Stb "                                                                001b - 77   w\n"
5791cfde348Stb "                                                                001c - e3   .\n"
5801cfde348Stb "                                                                001d - ec   .\n"
5811cfde348Stb "                                                                001e - b4   .\n"
5821cfde348Stb "                                                                001f - 98   .\n"
5831cfde348Stb "                                                                0020 - c6   .\n"
5841cfde348Stb "                                                                0021 - 08   .\n"
5851cfde348Stb "                                                                0022 - fc   .\n"
5861cfde348Stb "                                                                0023 - 59   Y\n"
5871cfde348Stb "                                                                0024 - b3   .\n"
5881cfde348Stb "                                                                0025 - 4f   O\n"
5891cfde348Stb "                                                                0026 - 45   E\n"
5901cfde348Stb "                                                                0027 - cf   .\n"
5911cfde348Stb "                                                                0028 - 4b   K\n"
5921cfde348Stb "                                                                0029 - c2   .\n"
5931cfde348Stb "                                                                002a - ae   .\n"
5941cfde348Stb "                                                                002b - 98   .\n"
5951cfde348Stb "                                                                002c - b5   .\n"
5961cfde348Stb "                                                                002d - eb   .\n"
5971cfde348Stb "                                                                002e - e0   .\n"
5981cfde348Stb "                                                                002f - b5   .\n"
5991cfde348Stb "                                                                0030 - c1   .\n"
6001cfde348Stb "                                                                0031 - 68   h\n"
6011cfde348Stb "                                                                0032 - ba   .\n"
6021cfde348Stb "                                                                0033 - cf   .\n"
6031cfde348Stb "                                                                0034 - 7c   |\n"
6041cfde348Stb "                                                                0035 - f7   .\n"
6051cfde348Stb "                                                                0036 - 7b   {\n"
6061cfde348Stb "                                                                0037 - 38   8\n"
6071cfde348Stb "                                                                0038 - 43   C\n"
6081cfde348Stb "                                                                0039 - 2f   /\n"
6091cfde348Stb "                                                                003a - b9   .\n"
6101cfde348Stb "                                                                003b - 0e   .\n"
6111cfde348Stb "                                                                003c - 23   #\n"
6121cfde348Stb "                                                                003d - 02   .\n"
6131cfde348Stb "                                                                003e - b9   .\n"
6141cfde348Stb "                                                                003f - 4f   O\n"
6151cfde348Stb "                                                                0040 - 8c   .\n"
6161cfde348Stb "                                                                0041 - 26   &\n"
6171cfde348Stb "                                                                0042 - eb   .\n"
6181cfde348Stb "                                                                0043 - ef   .\n"
6191cfde348Stb "                                                                0044 - 70   p\n"
6201cfde348Stb "                                                                0045 - 98   .\n"
6211cfde348Stb "                                                                0046 - 82   .\n"
6221cfde348Stb "                                                                0047 - a7   .\n"
6231cfde348Stb "                                                                0048 - b9   .\n"
6241cfde348Stb "                                                                0049 - 78   x\n"
6251cfde348Stb "                                                                004a - c5   .\n"
6261cfde348Stb "                                                                004b - 08   .\n"
6271cfde348Stb "                                                                004c - 96   .\n"
6281cfde348Stb "                                                                004d - 99   .\n"
6291cfde348Stb "                                                                004e - b3   .\n"
6301cfde348Stb "                                                                004f - 84   .\n"
6311cfde348Stb "                                                                0050 - a3   .\n"
6321cfde348Stb "                                                                0051 - 4f   O\n"
6331cfde348Stb "                                                                0052 - fb   .\n"
6341cfde348Stb "                                                                0053 - d7   .\n"
6351cfde348Stb "                                                                0054 - 38   8\n"
6361cfde348Stb "                                                                0055 - a9   .\n"
6371cfde348Stb "                                                                0056 - d9   .\n"
6381cfde348Stb "                                                                0057 - d4   .\n"
6391cfde348Stb "                                                                0058 - 53   S\n"
6401cfde348Stb "                                                                0059 - 0f   .\n"
6411cfde348Stb "                                                                005a - 4f   O\n"
6421cfde348Stb "                                                                005b - 64   d\n"
6431cfde348Stb "                                                                005c - 97   .\n"
6441cfde348Stb "                                                                005d - df   .\n"
6451cfde348Stb "                                                                005e - cf   .\n"
6461cfde348Stb "                                                                005f - f3   .\n"
6471cfde348Stb "                                                                0060 - 4f   O\n"
6481cfde348Stb "                                                                0061 - c8   .\n"
6491cfde348Stb "                                                                0062 - d2   .\n"
6501cfde348Stb "                                                                0063 - 56   V\n"
6511cfde348Stb "                                                                0064 - 3f   ?\n"
6521cfde348Stb "                                                                0065 - 0d   .\n"
6531cfde348Stb "                                                                0066 - 72   r\n"
6541cfde348Stb "                                                                0067 - d4   .\n"
6551cfde348Stb "                                                                0068 - 55   U\n"
6561cfde348Stb "                                                                0069 - 98   .\n"
6571cfde348Stb "                                                                006a - 89   .\n"
6581cfde348Stb "                                                                006b - b0   .\n"
6591cfde348Stb "                                                                006c - 45   E\n"
6601cfde348Stb "                                                                006d - 26   &\n"
6611cfde348Stb "                                                                006e - 3f   ?\n"
6621cfde348Stb "                                                                006f - 7a   z\n"
6631cfde348Stb "                                                                0070 - bd   .\n"
6641cfde348Stb "                                                                0071 - 9d   .\n"
6651cfde348Stb "                                                                0072 - 96   .\n"
6661cfde348Stb "                                                                0073 - 15   .\n"
6671cfde348Stb "                                                                0074 - a2   .\n"
6681cfde348Stb "                                                                0075 - 10   .\n"
6691cfde348Stb "                                                                0076 - 14   .\n"
6701cfde348Stb "                                                                0077 - 85   .\n"
6711cfde348Stb "                                                                0078 - aa   .\n"
6721cfde348Stb "                                                                0079 - a1   .\n"
6731cfde348Stb "                                                                007a - 7c   |\n"
6741cfde348Stb "                                                                007b - 84   .\n"
6751cfde348Stb "                                                                007c - fb   .\n"
6761cfde348Stb "                                                                007d - c4   .\n"
6771cfde348Stb "                                                                007e - a5   .\n"
6781cfde348Stb "                                                                007f - 7b   {\n"
6791cfde348Stb "                                                                0080 - c6   .\n"
6801cfde348Stb "                                                                0081 - e3   .\n"
6811cfde348Stb "                                                                0082 - ad   .\n"
6821cfde348Stb "                                                                0083 - 85   .\n"
6831cfde348Stb "                                                                0084 - 57   W\n"
6841cfde348Stb "                                                                0085 - 96   .\n"
6851cfde348Stb "                                                                0086 - bb   .\n"
6861cfde348Stb "                                                                0087 - 81   .\n"
6871cfde348Stb "                                                                0088 - 18   .\n"
6881cfde348Stb "                                                                0089 - 0c   .\n"
6891cfde348Stb "                                                                008a - ed   .\n"
6901cfde348Stb "                                                                008b - 2f   /\n"
6911cfde348Stb "                                                                008c - f7   .\n"
6921cfde348Stb "                                                                008d - 6a   j\n"
6931cfde348Stb "                                                                008e - 4c   L\n"
6941cfde348Stb "                                                                008f - 4d   M\n"
6951cfde348Stb "                                                                0090 - 59   Y\n"
6961cfde348Stb "                                                                0091 - e1   .\n"
6971cfde348Stb "                                                                0092 - cc   .\n"
6981cfde348Stb "                                                                0093 - c5   .\n"
6991cfde348Stb "                                                                0094 - 3a   :\n"
7001cfde348Stb "                                                                0095 - 9f   .\n"
7011cfde348Stb "                                                                0096 - 48   H\n"
7021cfde348Stb "                                                                0097 - fc   .\n"
7031cfde348Stb "                                                                0098 - 1d   .\n"
7041cfde348Stb "                                                                0099 - 7c   |\n"
7051cfde348Stb "                                                                009a - 0d   .\n"
7061cfde348Stb "                                                                009b - a4   .\n"
7071cfde348Stb "                                                                009c - 79   y\n"
7081cfde348Stb "                                                                009d - 96   .\n"
7091cfde348Stb "                                                                009e - e7   .\n"
7101cfde348Stb "                                                                009f - 2b   +\n"
7111cfde348Stb "                                                                00a0 - 39   9\n"
7121cfde348Stb "                                                                00a1 - 15   .\n"
7131cfde348Stb "                                                                00a2 - f9   .\n"
7141cfde348Stb "                                                                00a3 - 3a   :\n"
7151cfde348Stb "                                                                00a4 - 6a   j\n"
7161cfde348Stb "                                                                00a5 - 5e   ^\n"
7171cfde348Stb "                                                                00a6 - 7c   |\n"
7181cfde348Stb "                                                                00a7 - 4e   N\n"
7191cfde348Stb "                                                                00a8 - c9   .\n"
7201cfde348Stb "                                                                00a9 - 3b   ;\n"
7211cfde348Stb "                                                                00aa - af   .\n"
7221cfde348Stb "                                                                00ab - eb   .\n"
7231cfde348Stb "                                                                00ac - 3b   ;\n"
7241cfde348Stb "                                                                00ad - cf   .\n"
7251cfde348Stb "                                                                00ae - 8d   .\n"
7261cfde348Stb "                                                                00af - 6a   j\n"
7271cfde348Stb "                                                                00b0 - 57   W\n"
7281cfde348Stb "                                                                00b1 - e6   .\n"
7291cfde348Stb "                                                                00b2 - c5   .\n"
7301cfde348Stb "                                                                00b3 - ba   .\n"
7311cfde348Stb "                                                                00b4 - bd   .\n"
7321cfde348Stb "                                                                00b5 - a6   .\n"
7331cfde348Stb "                                                                00b6 - a0   .\n"
7341cfde348Stb "                                                                00b7 - 6b   k\n"
7351cfde348Stb "                                                                00b8 - 03   .\n"
7361cfde348Stb "                                                                00b9 - d5   .\n"
7371cfde348Stb "                                                                00ba - a3   .\n"
7381cfde348Stb "                                                                00bb - 9f   .\n"
7391cfde348Stb "                                                                00bc - 99   .\n"
7401cfde348Stb "                                                                00bd - 2a   *\n"
7411cfde348Stb "                                                                00be - ea   .\n"
7421cfde348Stb "                                                                00bf - 88   .\n"
7431cfde348Stb "                                                                00c0 - 72   r\n"
7441cfde348Stb "                                                                00c1 - 1b   .\n"
7451cfde348Stb "                                                                00c2 - 66   f\n"
7461cfde348Stb "                                                                00c3 - 6c   l\n"
7471cfde348Stb "                                                                00c4 - 5e   ^\n"
7481cfde348Stb "                                                                00c5 - 1d   .\n"
7491cfde348Stb "                                                                00c6 - 49   I\n"
7501cfde348Stb "                                                                00c7 - d5   .\n"
7511cfde348Stb "                                                                00c8 - 1e   .\n"
7521cfde348Stb "                                                                00c9 - 1e   .\n"
7531cfde348Stb "                                                                00ca - cc   .\n"
7541cfde348Stb "                                                                00cb - 1a   .\n"
7551cfde348Stb "                                                                00cc - b1   .\n"
7561cfde348Stb "                                                                00cd - d8   .\n"
7571cfde348Stb "                                                                00ce - f7   .\n"
7581cfde348Stb "                                                                00cf - 91   .\n"
7591cfde348Stb "                                                                00d0 - 1e   .\n"
7601cfde348Stb "                                                                00d1 - 1e   .\n"
7611cfde348Stb "                                                                00d2 - cc   .\n"
7621cfde348Stb "                                                                00d3 - 1a   .\n"
7631cfde348Stb "                                                                00f6 - <SPACES/NULS>\n",
7641cfde348Stb 	},
765*4322089eStb 	{
766*4322089eStb 		.indent = 4,
767*4322089eStb 		.input = bytes,
768*4322089eStb 		.inlen = BYTES_LEN,
769*4322089eStb 		.output =
770*4322089eStb "    0000 - 00 01 02 03 04 05 06 07-08 09 0a 0b 0c 0d 0e 0f   ................\n"
771*4322089eStb "    0010 - 10 11 12 13 14 15 16 17-18 19 1a 1b 1c 1d 1e 1f   ................\n"
772*4322089eStb "    0020 - 20 21 22 23 24 25 26 27-28 29 2a 2b 2c 2d 2e 2f    !\"#$%&'()*+,-./\n"
773*4322089eStb "    0030 - 30 31 32 33 34 35 36 37-38 39 3a 3b 3c 3d 3e 3f   0123456789:;<=>?\n"
774*4322089eStb "    0040 - 40 41 42 43 44 45 46 47-48 49 4a 4b 4c 4d 4e 4f   @ABCDEFGHIJKLMNO\n"
775*4322089eStb "    0050 - 50 51 52 53 54 55 56 57-58 59 5a 5b 5c 5d 5e 5f   PQRSTUVWXYZ[\\]^_\n"
776*4322089eStb "    0060 - 60 61 62 63 64 65 66 67-68 69 6a 6b 6c 6d 6e 6f   `abcdefghijklmno\n"
777*4322089eStb "    0070 - 70 71 72 73 74 75 76 77-78 79 7a 7b 7c 7d 7e 7f   pqrstuvwxyz{|}~.\n"
778*4322089eStb "    0080 - 80 81 82 83 84 85 86 87-88 89 8a 8b 8c 8d 8e 8f   ................\n"
779*4322089eStb "    0090 - 90 91 92 93 94 95 96 97-98 99 9a 9b 9c 9d 9e 9f   ................\n"
780*4322089eStb "    00a0 - a0 a1 a2 a3 a4 a5 a6 a7-a8 a9 aa ab ac ad ae af   ................\n"
781*4322089eStb "    00b0 - b0 b1 b2 b3 b4 b5 b6 b7-b8 b9 ba bb bc bd be bf   ................\n"
782*4322089eStb "    00c0 - c0 c1 c2 c3 c4 c5 c6 c7-c8 c9 ca cb cc cd ce cf   ................\n"
783*4322089eStb "    00d0 - d0 d1 d2 d3 d4 d5 d6 d7-d8 d9 da db dc dd de df   ................\n"
784*4322089eStb "    00e0 - e0 e1 e2 e3 e4 e5 e6 e7-e8 e9 ea eb ec ed ee ef   ................\n"
785*4322089eStb "    00f0 - f0 f1 f2 f3 f4 f5 f6 f7-f8 f9 fa fb fc fd fe ff   ................\n",
786*4322089eStb 	},
7871cfde348Stb };
7881cfde348Stb 
7891cfde348Stb #define N_TESTS (sizeof(bio_dump_testcases) / sizeof(bio_dump_testcases[0]))
7901cfde348Stb 
7911cfde348Stb static int
bio_dump_test(const struct bio_dump_testcase * tc)7921cfde348Stb bio_dump_test(const struct bio_dump_testcase *tc)
7931cfde348Stb {
7941cfde348Stb 	BIO *bio;
7951cfde348Stb 	char *got;
7961cfde348Stb 	long got_len;
7971cfde348Stb 	int ret;
7981cfde348Stb 	int failed = 1;
7991cfde348Stb 
8001cfde348Stb 	if ((bio = BIO_new(BIO_s_mem())) == NULL)
8011cfde348Stb 		errx(1, "BIO_new");
8021cfde348Stb 
8031cfde348Stb 	if ((ret = BIO_dump_indent(bio, tc->input, tc->inlen, tc->indent)) == -1)
8041cfde348Stb 		errx(1, "BIO_dump_indent");
8051cfde348Stb 	if ((got_len = BIO_get_mem_data(bio, &got)) < 0)
8061cfde348Stb 		errx(1, "BIO_get_mem_data");
8071cfde348Stb 	if (ret != got_len || strlen(tc->output) != (size_t)ret) {
8087f53621bStb 		fprintf(stderr, "indent %d: ret %d, got_len %ld, strlen %zu\n",
8091cfde348Stb 		    tc->indent, ret, got_len, strlen(tc->output));
8101cfde348Stb 		goto err;
8111cfde348Stb 	}
8121cfde348Stb 	if (strncmp(tc->output, got, got_len) != 0) {
8131cfde348Stb 		fprintf(stderr, "%d: mismatch\n", tc->indent);
8141cfde348Stb 		goto err;
8151cfde348Stb 	}
8161cfde348Stb 
8171cfde348Stb 	failed = 0;
8181cfde348Stb 
8191cfde348Stb  err:
8201cfde348Stb 	BIO_free(bio);
8211cfde348Stb 
8221cfde348Stb 	return failed;
8231cfde348Stb }
8241cfde348Stb 
8251cfde348Stb int
main(void)8261cfde348Stb main(void)
8271cfde348Stb {
8281cfde348Stb 	size_t i;
8291cfde348Stb 	int failed = 0;
8301cfde348Stb 
8311cfde348Stb 	for (i = 0; i < N_TESTS; i++)
8321cfde348Stb 		failed |= bio_dump_test(&bio_dump_testcases[i]);
8331cfde348Stb 
8341cfde348Stb 	return failed;
8351cfde348Stb }
836