summaryrefslogtreecommitdiff
path: root/src/lib/libcrypto/comp
diff options
context:
space:
mode:
Diffstat (limited to 'src/lib/libcrypto/comp')
-rw-r--r--src/lib/libcrypto/comp/c_rle.c12
-rw-r--r--src/lib/libcrypto/comp/c_zlib.c54
2 files changed, 24 insertions, 42 deletions
diff --git a/src/lib/libcrypto/comp/c_rle.c b/src/lib/libcrypto/comp/c_rle.c
index 7a5db298c5..48e48cbb7a 100644
--- a/src/lib/libcrypto/comp/c_rle.c
+++ b/src/lib/libcrypto/comp/c_rle.c
@@ -10,14 +10,10 @@ static int rle_expand_block(COMP_CTX *ctx, unsigned char *out,
10 unsigned int olen, unsigned char *in, unsigned int ilen); 10 unsigned int olen, unsigned char *in, unsigned int ilen);
11 11
12static COMP_METHOD rle_method = { 12static COMP_METHOD rle_method = {
13 NID_rle_compression, 13 .type = NID_rle_compression,
14 LN_rle_compression, 14 .name = LN_rle_compression,
15 NULL, 15 .compress = rle_compress_block,
16 NULL, 16 .expand = rle_expand_block
17 rle_compress_block,
18 rle_expand_block,
19 NULL,
20 NULL,
21}; 17};
22 18
23COMP_METHOD * 19COMP_METHOD *
diff --git a/src/lib/libcrypto/comp/c_zlib.c b/src/lib/libcrypto/comp/c_zlib.c
index 3a73b3df0b..26c6507cd5 100644
--- a/src/lib/libcrypto/comp/c_zlib.c
+++ b/src/lib/libcrypto/comp/c_zlib.c
@@ -8,14 +8,8 @@
8COMP_METHOD *COMP_zlib(void ); 8COMP_METHOD *COMP_zlib(void );
9 9
10static COMP_METHOD zlib_method_nozlib = { 10static COMP_METHOD zlib_method_nozlib = {
11 NID_undef, 11 .type = NID_undef,
12 "(undef)", 12 .name = "(undef)"
13 NULL,
14 NULL,
15 NULL,
16 NULL,
17 NULL,
18 NULL,
19}; 13};
20 14
21#ifndef ZLIB 15#ifndef ZLIB
@@ -55,26 +49,20 @@ static int zz_uncompress(Bytef *dest, uLongf *destLen, const Bytef *source,
55 uLong sourceLen); 49 uLong sourceLen);
56 50
57static COMP_METHOD zlib_stateless_method = { 51static COMP_METHOD zlib_stateless_method = {
58 NID_zlib_compression, 52 .type = NID_zlib_compression,
59 LN_zlib_compression, 53 .name = LN_zlib_compression,
60 NULL, 54 .compress = zlib_compress_block,
61 NULL, 55 .expand = zlib_expand_block
62 zlib_compress_block,
63 zlib_expand_block,
64 NULL,
65 NULL,
66}; 56};
67#endif 57#endif
68 58
69static COMP_METHOD zlib_stateful_method = { 59static COMP_METHOD zlib_stateful_method = {
70 NID_zlib_compression, 60 .type = NID_zlib_compression,
71 LN_zlib_compression, 61 .name = LN_zlib_compression,
72 zlib_stateful_init, 62 .init = zlib_stateful_init,
73 zlib_stateful_finish, 63 .finish = zlib_stateful_finish,
74 zlib_stateful_compress_block, 64 .compress = zlib_stateful_compress_block,
75 zlib_stateful_expand_block, 65 .expand = zlib_stateful_expand_block
76 NULL,
77 NULL,
78}; 66};
79 67
80#ifdef ZLIB_SHARED 68#ifdef ZLIB_SHARED
@@ -433,16 +421,14 @@ static long bio_zlib_ctrl(BIO *b, int cmd, long num, void *ptr);
433static long bio_zlib_callback_ctrl(BIO *b, int cmd, bio_info_cb *fp); 421static long bio_zlib_callback_ctrl(BIO *b, int cmd, bio_info_cb *fp);
434 422
435static BIO_METHOD bio_meth_zlib = { 423static BIO_METHOD bio_meth_zlib = {
436 BIO_TYPE_COMP, 424 .type = BIO_TYPE_COMP,
437 "zlib", 425 .name = "zlib",
438 bio_zlib_write, 426 .bwrite = bio_zlib_write,
439 bio_zlib_read, 427 .bread = bio_zlib_read,
440 NULL, 428 .ctrl = bio_zlib_ctrl,
441 NULL, 429 .create = bio_zlib_new,
442 bio_zlib_ctrl, 430 .destroy = bio_zlib_free,
443 bio_zlib_new, 431 .callback_ctrl = bio_zlib_callback_ctrl
444 bio_zlib_free,
445 bio_zlib_callback_ctrl
446}; 432};
447 433
448BIO_METHOD * 434BIO_METHOD *