ソースを参照

[deflate] Add support for DEFLATE decompression

Signed-off-by: Michael Brown <mcb30@ipxe.org>
tags/v1.20.1
Michael Brown 10年前
コミット
9bdfc36bcc
5個のファイルの変更1569行の追加0行の削除
  1. 1045
    0
      src/crypto/deflate.c
  2. 283
    0
      src/include/ipxe/deflate.h
  3. 1
    0
      src/include/ipxe/errfile.h
  4. 239
    0
      src/tests/deflate_test.c
  5. 1
    0
      src/tests/tests.c

+ 1045
- 0
src/crypto/deflate.c
ファイル差分が大きすぎるため省略します
ファイルの表示


+ 283
- 0
src/include/ipxe/deflate.h ファイルの表示

@@ -0,0 +1,283 @@
1
+#ifndef _IPXE_DEFLATE_H
2
+#define _IPXE_DEFLATE_H
3
+
4
+/** @file
5
+ *
6
+ * DEFLATE decompression algorithm
7
+ *
8
+ */
9
+
10
+FILE_LICENCE ( GPL2_OR_LATER );
11
+
12
+#include <stdint.h>
13
+#include <string.h>
14
+#include <ipxe/uaccess.h>
15
+
16
+/** Compression formats */
17
+enum deflate_format {
18
+	/** Raw DEFLATE data (no header or footer) */
19
+	DEFLATE_RAW,
20
+	/** ZLIB header and footer */
21
+	DEFLATE_ZLIB,
22
+};
23
+
24
+/** Block header length (in bits) */
25
+#define DEFLATE_HEADER_BITS 3
26
+
27
+/** Block header final block flags bit */
28
+#define DEFLATE_HEADER_BFINAL_BIT 0
29
+
30
+/** Block header type LSB */
31
+#define DEFLATE_HEADER_BTYPE_LSB 1
32
+
33
+/** Block header type mask */
34
+#define DEFLATE_HEADER_BTYPE_MASK 0x03
35
+
36
+/** Block header type: literal data */
37
+#define DEFLATE_HEADER_BTYPE_LITERAL 0
38
+
39
+/** Block header type: static Huffman alphabet */
40
+#define DEFLATE_HEADER_BTYPE_STATIC 1
41
+
42
+/** Block header type: dynamic Huffman alphabet */
43
+#define DEFLATE_HEADER_BTYPE_DYNAMIC 2
44
+
45
+/** Literal header LEN/NLEN field length (in bits) */
46
+#define DEFLATE_LITERAL_LEN_BITS 16
47
+
48
+/** Dynamic header length (in bits) */
49
+#define DEFLATE_DYNAMIC_BITS 14
50
+
51
+/** Dynamic header HLIT field LSB */
52
+#define DEFLATE_DYNAMIC_HLIT_LSB 0
53
+
54
+/** Dynamic header HLIT field mask */
55
+#define DEFLATE_DYNAMIC_HLIT_MASK 0x1f
56
+
57
+/** Dynamic header HDIST field LSB */
58
+#define DEFLATE_DYNAMIC_HDIST_LSB 5
59
+
60
+/** Dynamic header HDIST field mask */
61
+#define DEFLATE_DYNAMIC_HDIST_MASK 0x1f
62
+
63
+/** Dynamic header HCLEN field LSB */
64
+#define DEFLATE_DYNAMIC_HCLEN_LSB 10
65
+
66
+/** Dynamic header HCLEN field mask */
67
+#define DEFLATE_DYNAMIC_HCLEN_MASK 0x0f
68
+
69
+/** Dynamic header code length length (in bits) */
70
+#define DEFLATE_CODELEN_BITS 3
71
+
72
+/** Maximum length of a Huffman symbol (in bits) */
73
+#define DEFLATE_HUFFMAN_BITS 15
74
+
75
+/** Quick lookup length for a Huffman symbol (in bits)
76
+ *
77
+ * This is a policy decision.
78
+ */
79
+#define DEFLATE_HUFFMAN_QL_BITS 7
80
+
81
+/** Quick lookup shift */
82
+#define DEFLATE_HUFFMAN_QL_SHIFT ( 16 - DEFLATE_HUFFMAN_QL_BITS )
83
+
84
+/** Literal/length end of block code */
85
+#define DEFLATE_LITLEN_END 256
86
+
87
+/** Maximum value of a literal/length code */
88
+#define DEFLATE_LITLEN_MAX_CODE 287
89
+
90
+/** Maximum value of a distance code */
91
+#define DEFLATE_DISTANCE_MAX_CODE 31
92
+
93
+/** Maximum value of a code length code */
94
+#define DEFLATE_CODELEN_MAX_CODE 18
95
+
96
+/** ZLIB header length (in bits) */
97
+#define ZLIB_HEADER_BITS 16
98
+
99
+/** ZLIB header compression method LSB */
100
+#define ZLIB_HEADER_CM_LSB 0
101
+
102
+/** ZLIB header compression method mask */
103
+#define ZLIB_HEADER_CM_MASK 0x0f
104
+
105
+/** ZLIB header compression method: DEFLATE */
106
+#define ZLIB_HEADER_CM_DEFLATE 8
107
+
108
+/** ZLIB header preset dictionary flag bit */
109
+#define ZLIB_HEADER_FDICT_BIT 13
110
+
111
+/** ZLIB ADLER32 length (in bits) */
112
+#define ZLIB_ADLER32_BITS 32
113
+
114
+/** A Huffman-coded set of symbols of a given length */
115
+struct deflate_huf_symbols {
116
+	/** Length of Huffman-coded symbols */
117
+	uint8_t bits;
118
+	/** Shift to normalise symbols of this length to 16 bits */
119
+	uint8_t shift;
120
+	/** Number of Huffman-coded symbols having this length */
121
+	uint16_t freq;
122
+	/** First symbol of this length (normalised to 16 bits)
123
+	 *
124
+	 * Stored as a 32-bit value to allow the value 0x10000 to be
125
+	 * used for empty sets of symbols longer than the maximum
126
+	 * utilised length.
127
+	 */
128
+	uint32_t start;
129
+	/** Raw symbols having this length */
130
+	uint16_t *raw;
131
+};
132
+
133
+/** A Huffman-coded alphabet */
134
+struct deflate_alphabet {
135
+	/** Huffman-coded symbol set for each length */
136
+	struct deflate_huf_symbols huf[DEFLATE_HUFFMAN_BITS];
137
+	/** Quick lookup table */
138
+	uint8_t lookup[ 1 << DEFLATE_HUFFMAN_QL_BITS ];
139
+	/** Raw symbols
140
+	 *
141
+	 * Ordered by Huffman-coded symbol length, then by symbol
142
+	 * value.  This field has a variable length.
143
+	 */
144
+	uint16_t raw[0];
145
+};
146
+
147
+/** A static Huffman alphabet length pattern */
148
+struct deflate_static_length_pattern {
149
+	/** Length pair */
150
+	uint8_t fill;
151
+	/** Repetition count */
152
+	uint8_t count;
153
+} __attribute__ (( packed ));
154
+
155
+/** Decompressor */
156
+struct deflate {
157
+	/** Resume point
158
+	 *
159
+	 * Used as the target of a computed goto to jump to the
160
+	 * appropriate point within the state machine.
161
+	 */
162
+	void *resume;
163
+	/** Format */
164
+	enum deflate_format format;
165
+
166
+	/** Accumulator */
167
+	uint32_t accumulator;
168
+	/** Bit-reversed accumulator
169
+	 *
170
+	 * Don't ask.
171
+	 */
172
+	uint32_t rotalumucca;
173
+	/** Number of bits within the accumulator */
174
+	unsigned int bits;
175
+
176
+	/** Current block header */
177
+	unsigned int header;
178
+	/** Remaining length of data (e.g. within a literal block) */
179
+	size_t remaining;
180
+	/** Current length index within a set of code lengths */
181
+	unsigned int length_index;
182
+	/** Target length index within a set of code lengths */
183
+	unsigned int length_target;
184
+	/** Current length within a set of code lengths */
185
+	unsigned int length;
186
+	/** Number of extra bits required */
187
+	unsigned int extra_bits;
188
+	/** Length of a duplicated string */
189
+	size_t dup_len;
190
+	/** Distance of a duplicated string */
191
+	size_t dup_distance;
192
+
193
+	/** Literal/length Huffman alphabet */
194
+	struct deflate_alphabet litlen;
195
+	/** Literal/length raw symbols
196
+	 *
197
+	 * Must immediately follow the literal/length Huffman alphabet.
198
+	 */
199
+	uint16_t litlen_raw[ DEFLATE_LITLEN_MAX_CODE + 1 ];
200
+	/** Number of symbols in the literal/length Huffman alphabet */
201
+	unsigned int litlen_count;
202
+
203
+	/** Distance and code length Huffman alphabet
204
+	 *
205
+	 * The code length Huffman alphabet has a maximum Huffman
206
+	 * symbol length of 7 and a maximum code value of 18, and is
207
+	 * thus strictly smaller than the distance Huffman alphabet.
208
+	 * Since we never need both alphabets simultaneously, we can
209
+	 * reuse the storage space for the distance alphabet to
210
+	 * temporarily hold the code length alphabet.
211
+	 */
212
+	struct deflate_alphabet distance_codelen;
213
+	/** Distance and code length raw symbols
214
+	 *
215
+	 * Must immediately follow the distance and code length
216
+	 * Huffman alphabet.
217
+	 */
218
+	uint16_t distance_codelen_raw[ DEFLATE_DISTANCE_MAX_CODE + 1 ];
219
+	/** Number of symbols in the distance Huffman alphabet */
220
+	unsigned int distance_count;
221
+
222
+	/** Huffman code lengths
223
+	 *
224
+	 * The literal/length and distance code lengths are
225
+	 * constructed as a single set of lengths.
226
+	 *
227
+	 * The code length Huffman alphabet has a maximum code value
228
+	 * of 18 and the set of lengths is thus strictly smaller than
229
+	 * the combined literal/length and distance set of lengths.
230
+	 * Since we never need both alphabets simultaneously, we can
231
+	 * reuse the storage space for the literal/length and distance
232
+	 * code lengths to temporarily hold the code length code
233
+	 * lengths.
234
+	 */
235
+	uint8_t lengths[ ( ( DEFLATE_LITLEN_MAX_CODE + 1 ) +
236
+			   ( DEFLATE_DISTANCE_MAX_CODE + 1 ) +
237
+			   1 /* round up */ ) / 2 ];
238
+};
239
+
240
+/** A chunk of data */
241
+struct deflate_chunk {
242
+	/** Data */
243
+	userptr_t data;
244
+	/** Current offset */
245
+	size_t offset;
246
+	/** Length of data */
247
+	size_t len;
248
+};
249
+
250
+/**
251
+ * Initialise chunk of data
252
+ *
253
+ * @v chunk		Chunk of data to initialise
254
+ * @v data		Data
255
+ * @v offset		Starting offset
256
+ * @v len		Length
257
+ */
258
+static inline __attribute__ (( always_inline )) void
259
+deflate_chunk_init ( struct deflate_chunk *chunk, userptr_t data,
260
+		     size_t offset, size_t len ) {
261
+
262
+	chunk->data = data;
263
+	chunk->offset = offset;
264
+	chunk->len = len;
265
+}
266
+
267
+/**
268
+ * Check if decompression has finished
269
+ *
270
+ * @v deflate		Decompressor
271
+ * @ret finished	Decompression has finished
272
+ */
273
+static inline int deflate_finished ( struct deflate *deflate ) {
274
+	return ( deflate->resume == NULL );
275
+}
276
+
277
+extern void deflate_init ( struct deflate *deflate,
278
+			   enum deflate_format format );
279
+extern int deflate_inflate ( struct deflate *deflate,
280
+			     struct deflate_chunk *in,
281
+			     struct deflate_chunk *out );
282
+
283
+#endif /* _IPXE_DEFLATE_H */

+ 1
- 0
src/include/ipxe/errfile.h ファイルの表示

@@ -297,6 +297,7 @@ FILE_LICENCE ( GPL2_OR_LATER );
297 297
 #define ERRFILE_efi_reboot	      ( ERRFILE_OTHER | 0x003e0000 )
298 298
 #define ERRFILE_memmap_settings	      ( ERRFILE_OTHER | 0x003f0000 )
299 299
 #define ERRFILE_param_cmd	      ( ERRFILE_OTHER | 0x00400000 )
300
+#define ERRFILE_deflate		      ( ERRFILE_OTHER | 0x00410000 )
300 301
 
301 302
 /** @} */
302 303
 

+ 239
- 0
src/tests/deflate_test.c ファイルの表示

@@ -0,0 +1,239 @@
1
+/*
2
+ * Copyright (C) 2014 Michael Brown <mbrown@fensystems.co.uk>.
3
+ *
4
+ * This program is free software; you can redistribute it and/or
5
+ * modify it under the terms of the GNU General Public License as
6
+ * published by the Free Software Foundation; either version 2 of the
7
+ * License, or any later version.
8
+ *
9
+ * This program is distributed in the hope that it will be useful, but
10
+ * WITHOUT ANY WARRANTY; without even the implied warranty of
11
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
12
+ * General Public License for more details.
13
+ *
14
+ * You should have received a copy of the GNU General Public License
15
+ * along with this program; if not, write to the Free Software
16
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
17
+ * 02110-1301, USA.
18
+ */
19
+
20
+FILE_LICENCE ( GPL2_OR_LATER );
21
+
22
+/** @file
23
+ *
24
+ * DEFLATE tests
25
+ *
26
+ */
27
+
28
+/* Forcibly enable assertions */
29
+#undef NDEBUG
30
+
31
+#include <stdint.h>
32
+#include <stdlib.h>
33
+#include <string.h>
34
+#include <ipxe/deflate.h>
35
+#include <ipxe/test.h>
36
+
37
+/** A DEFLATE test */
38
+struct deflate_test {
39
+	/** Compression format */
40
+	enum deflate_format format;
41
+	/** Compressed data */
42
+	const void *compressed;
43
+	/** Length of compressed data */
44
+	size_t compressed_len;
45
+	/** Expected uncompressed data */
46
+	const void *expected;
47
+	/** Length of expected uncompressed data */
48
+	size_t expected_len;
49
+};
50
+
51
+/** A DEFLATE fragment list */
52
+struct deflate_test_fragments {
53
+	/** Fragment lengths */
54
+	size_t len[8];
55
+};
56
+
57
+/** Define inline data */
58
+#define DATA(...) { __VA_ARGS__ }
59
+
60
+/** Define a DEFLATE test */
61
+#define DEFLATE( name, FORMAT, COMPRESSED, EXPECTED )			\
62
+	static const uint8_t name ## _compressed[] = COMPRESSED;	\
63
+	static const uint8_t name ## _expected[] = EXPECTED;		\
64
+	static struct deflate_test name = {				\
65
+		.format = FORMAT,					\
66
+		.compressed = name ## _compressed,			\
67
+		.compressed_len = sizeof ( name ## _compressed ),	\
68
+		.expected = name ## _expected,				\
69
+		.expected_len = sizeof ( name ## _expected ),		\
70
+	};
71
+
72
+/* Empty file, no compression */
73
+DEFLATE ( empty_literal, DEFLATE_RAW,
74
+	  DATA ( 0x01, 0x00, 0x00, 0xff, 0xff ), DATA() );
75
+
76
+/* "iPXE" string, no compression */
77
+DEFLATE ( literal, DEFLATE_RAW,
78
+	  DATA ( 0x01, 0x04, 0x00, 0xfb, 0xff, 0x69, 0x50, 0x58, 0x45 ),
79
+	  DATA ( 0x69, 0x50, 0x58, 0x45 ) );
80
+
81
+/* Empty file */
82
+DEFLATE ( empty, DEFLATE_RAW, DATA ( 0x03, 0x00 ), DATA() );
83
+
84
+/* "Hello world" */
85
+DEFLATE ( hello_world, DEFLATE_RAW,
86
+	  DATA ( 0xf3, 0x48, 0xcd, 0xc9, 0xc9, 0x57, 0x28, 0xcf, 0x2f, 0xca,
87
+		 0x49, 0x01, 0x00 ),
88
+	  DATA ( 0x48, 0x65, 0x6c, 0x6c, 0x6f, 0x20, 0x77, 0x6f, 0x72, 0x6c,
89
+		 0x64 ) );
90
+
91
+/* "Hello hello world" */
92
+DEFLATE ( hello_hello_world, DEFLATE_RAW,
93
+	  DATA ( 0xf3, 0x48, 0xcd, 0xc9, 0xc9, 0x57, 0xc8, 0x00, 0x93, 0xe5,
94
+		 0xf9, 0x45, 0x39, 0x29, 0x00 ),
95
+	  DATA ( 0x48, 0x65, 0x6c, 0x6c, 0x6f, 0x20, 0x68, 0x65, 0x6c, 0x6c,
96
+		 0x6f, 0x20, 0x77, 0x6f, 0x72, 0x6c, 0x64 ) );
97
+
98
+/* "This specification defines a lossless compressed data format" */
99
+DEFLATE ( rfc_sentence, DEFLATE_RAW,
100
+	  DATA ( 0x0d, 0xc6, 0xdb, 0x09, 0x00, 0x21, 0x0c, 0x04, 0xc0, 0x56,
101
+		 0xb6, 0x28, 0x1b, 0x08, 0x79, 0x70, 0x01, 0x35, 0xe2, 0xa6,
102
+		 0x7f, 0xce, 0xf9, 0x9a, 0xf1, 0x25, 0xc1, 0xe3, 0x9a, 0x91,
103
+		 0x2a, 0x9d, 0xb5, 0x61, 0x1e, 0xb9, 0x9d, 0x10, 0xcc, 0x22,
104
+		 0xa7, 0x93, 0xd0, 0x5a, 0xe7, 0xbe, 0xb8, 0xc1, 0xa4, 0x05,
105
+		 0x51, 0x77, 0x49, 0xff ),
106
+	  DATA ( 0x54, 0x68, 0x69, 0x73, 0x20, 0x73, 0x70, 0x65, 0x63, 0x69,
107
+		 0x66, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x20, 0x64,
108
+		 0x65, 0x66, 0x69, 0x6e, 0x65, 0x73, 0x20, 0x61, 0x20, 0x6c,
109
+		 0x6f, 0x73, 0x73, 0x6c, 0x65, 0x73, 0x73, 0x20, 0x63, 0x6f,
110
+		 0x6d, 0x70, 0x72, 0x65, 0x73, 0x73, 0x65, 0x64, 0x20, 0x64,
111
+		 0x61, 0x74, 0x61, 0x20, 0x66, 0x6f, 0x72, 0x6d, 0x61, 0x74 ) );
112
+
113
+/* "ZLIB Compressed Data Format Specification" */
114
+DEFLATE ( zlib, DEFLATE_ZLIB,
115
+	  DATA ( 0x78, 0x01, 0x8b, 0xf2, 0xf1, 0x74, 0x52, 0x70, 0xce, 0xcf,
116
+		 0x2d, 0x28, 0x4a, 0x2d, 0x2e, 0x4e, 0x4d, 0x51, 0x70, 0x49,
117
+		 0x2c, 0x49, 0x54, 0x70, 0xcb, 0x2f, 0xca, 0x4d, 0x2c, 0x51,
118
+		 0x08, 0x2e, 0x48, 0x4d, 0xce, 0x4c, 0xcb, 0x4c, 0x4e, 0x2c,
119
+		 0xc9, 0xcc, 0xcf, 0x03, 0x00, 0x2c, 0x0e, 0x0e, 0xeb ),
120
+	  DATA ( 0x5a, 0x4c, 0x49, 0x42, 0x20, 0x43, 0x6f, 0x6d, 0x70, 0x72,
121
+		 0x65, 0x73, 0x73, 0x65, 0x64, 0x20, 0x44, 0x61, 0x74, 0x61,
122
+		 0x20, 0x46, 0x6f, 0x72, 0x6d, 0x61, 0x74, 0x20, 0x53, 0x70,
123
+		 0x65, 0x63, 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f,
124
+		 0x6e ) );
125
+
126
+/* "ZLIB Compressed Data Format Specification" fragment list */
127
+static struct deflate_test_fragments zlib_fragments[] = {
128
+	{ { -1UL, } },
129
+	{ { 0, 1, 5, -1UL, } },
130
+	{ { 0, 0, 1, 0, 0, 1, -1UL } },
131
+	{ { 10, 8, 4, 7, 11, -1UL } },
132
+	{ { 45, -1UL } },
133
+	{ { 48, -1UL } },
134
+};
135
+
136
+/**
137
+ * Report DEFLATE test result
138
+ *
139
+ * @v deflate		Decompressor
140
+ * @v test		Deflate test
141
+ * @v frags		Fragment list, or NULL
142
+ * @v file		Test code file
143
+ * @v line		Test code line
144
+ */
145
+static void deflate_okx ( struct deflate *deflate,
146
+			  struct deflate_test *test,
147
+			  struct deflate_test_fragments *frags,
148
+			  const char *file, unsigned int line ) {
149
+	uint8_t data[ test->expected_len ];
150
+	struct deflate_chunk in;
151
+	struct deflate_chunk out;
152
+	size_t frag_len = -1UL;
153
+	size_t offset = 0;
154
+	size_t remaining = test->compressed_len;
155
+	unsigned int i;
156
+
157
+	/* Initialise decompressor */
158
+	deflate_init ( deflate, test->format );
159
+
160
+	/* Initialise output chunk */
161
+	deflate_chunk_init ( &out, virt_to_user ( data ), 0, sizeof ( data ) );
162
+
163
+	/* Process input (in fragments, if applicable) */
164
+	for ( i = 0 ; i < ( sizeof ( frags->len ) /
165
+			    sizeof ( frags->len[0] ) ) ; i++ ) {
166
+
167
+		/* Initialise input chunk */
168
+		if ( frags )
169
+			frag_len = frags->len[i];
170
+		if ( frag_len > remaining )
171
+			frag_len = remaining;
172
+		deflate_chunk_init ( &in, virt_to_user ( test->compressed ),
173
+				     offset, ( offset + frag_len ) );
174
+
175
+		/* Decompress this fragment */
176
+		okx ( deflate_inflate ( deflate, &in, &out ) == 0, file, line );
177
+		okx ( in.len == ( offset + frag_len ), file, line );
178
+		okx ( in.offset == in.len, file, line );
179
+
180
+		/* Move to next fragment */
181
+		offset = in.offset;
182
+		remaining -= frag_len;
183
+		if ( ! remaining )
184
+			break;
185
+
186
+		/* Check that decompression has not terminated early */
187
+		okx ( ! deflate_finished ( deflate ), file, line );
188
+	}
189
+
190
+	/* Check decompression has terminated as expected */
191
+	okx ( deflate_finished ( deflate ), file, line );
192
+	okx ( offset == test->compressed_len, file, line );
193
+	okx ( out.offset == test->expected_len, file, line );
194
+	okx ( memcmp ( data, test->expected, test->expected_len ) == 0,
195
+	     file, line );
196
+}
197
+#define deflate_ok( deflate, test, frags ) \
198
+	deflate_okx ( deflate, test, frags, __FILE__, __LINE__ )
199
+
200
+/**
201
+ * Perform DEFLATE self-test
202
+ *
203
+ */
204
+static void deflate_test_exec ( void ) {
205
+	struct deflate *deflate;
206
+	unsigned int i;
207
+
208
+	/* Allocate shared structure */
209
+	deflate = malloc ( sizeof ( *deflate ) );
210
+	ok ( deflate != NULL );
211
+
212
+	/* Perform self-tests */
213
+	if ( deflate ) {
214
+
215
+		/* Test as a single pass */
216
+		deflate_ok ( deflate, &empty_literal, NULL );
217
+		deflate_ok ( deflate, &literal, NULL );
218
+		deflate_ok ( deflate, &empty, NULL );
219
+		deflate_ok ( deflate, &hello_world, NULL );
220
+		deflate_ok ( deflate, &hello_hello_world, NULL );
221
+		deflate_ok ( deflate, &rfc_sentence, NULL );
222
+		deflate_ok ( deflate, &zlib, NULL );
223
+
224
+		/* Test fragmentation */
225
+		for ( i = 0 ; i < ( sizeof ( zlib_fragments ) /
226
+				    sizeof ( zlib_fragments[0] ) ) ; i++ ) {
227
+			deflate_ok ( deflate, &zlib, &zlib_fragments[i] );
228
+		}
229
+	}
230
+
231
+	/* Free shared structure */
232
+	free ( deflate );
233
+}
234
+
235
+/** DEFLATE self-test */
236
+struct self_test deflate_test __self_test = {
237
+	.name = "deflate",
238
+	.exec = deflate_test_exec,
239
+};

+ 1
- 0
src/tests/tests.c ファイルの表示

@@ -50,3 +50,4 @@ REQUIRE_OBJECT ( x509_test );
50 50
 REQUIRE_OBJECT ( ocsp_test );
51 51
 REQUIRE_OBJECT ( cms_test );
52 52
 REQUIRE_OBJECT ( pnm_test );
53
+REQUIRE_OBJECT ( deflate_test );

読み込み中…
キャンセル
保存