diff options
Diffstat (limited to 'src/lib/libcrypto/comp/comp.h')
| -rw-r--r-- | src/lib/libcrypto/comp/comp.h | 24 |
1 files changed, 10 insertions, 14 deletions
diff --git a/src/lib/libcrypto/comp/comp.h b/src/lib/libcrypto/comp/comp.h index 4b405c7d49..0f7d2da336 100644 --- a/src/lib/libcrypto/comp/comp.h +++ b/src/lib/libcrypto/comp/comp.h | |||
| @@ -10,25 +10,21 @@ extern "C" { | |||
| 10 | 10 | ||
| 11 | typedef struct comp_ctx_st COMP_CTX; | 11 | typedef struct comp_ctx_st COMP_CTX; |
| 12 | 12 | ||
| 13 | typedef struct comp_method_st | 13 | typedef struct comp_method_st { |
| 14 | { | ||
| 15 | int type; /* NID for compression library */ | 14 | int type; /* NID for compression library */ |
| 16 | const char *name; /* A text string to identify the library */ | 15 | const char *name; /* A text string to identify the library */ |
| 17 | int (*init)(COMP_CTX *ctx); | 16 | int (*init)(COMP_CTX *ctx); |
| 18 | void (*finish)(COMP_CTX *ctx); | 17 | void (*finish)(COMP_CTX *ctx); |
| 19 | int (*compress)(COMP_CTX *ctx, | 18 | int (*compress)(COMP_CTX *ctx, unsigned char *out, unsigned int olen, |
| 20 | unsigned char *out, unsigned int olen, | 19 | unsigned char *in, unsigned int ilen); |
| 21 | unsigned char *in, unsigned int ilen); | 20 | int (*expand)(COMP_CTX *ctx, unsigned char *out, unsigned int olen, |
| 22 | int (*expand)(COMP_CTX *ctx, | 21 | unsigned char *in, unsigned int ilen); |
| 23 | unsigned char *out, unsigned int olen, | ||
| 24 | unsigned char *in, unsigned int ilen); | ||
| 25 | /* The following two do NOTHING, but are kept for backward compatibility */ | 22 | /* The following two do NOTHING, but are kept for backward compatibility */ |
| 26 | long (*ctrl)(void); | 23 | long (*ctrl)(void); |
| 27 | long (*callback_ctrl)(void); | 24 | long (*callback_ctrl)(void); |
| 28 | } COMP_METHOD; | 25 | } COMP_METHOD; |
| 29 | 26 | ||
| 30 | struct comp_ctx_st | 27 | struct comp_ctx_st { |
| 31 | { | ||
| 32 | COMP_METHOD *meth; | 28 | COMP_METHOD *meth; |
| 33 | unsigned long compress_in; | 29 | unsigned long compress_in; |
| 34 | unsigned long compress_out; | 30 | unsigned long compress_out; |
| @@ -36,15 +32,15 @@ struct comp_ctx_st | |||
| 36 | unsigned long expand_out; | 32 | unsigned long expand_out; |
| 37 | 33 | ||
| 38 | CRYPTO_EX_DATA ex_data; | 34 | CRYPTO_EX_DATA ex_data; |
| 39 | }; | 35 | }; |
| 40 | 36 | ||
| 41 | 37 | ||
| 42 | COMP_CTX *COMP_CTX_new(COMP_METHOD *meth); | 38 | COMP_CTX *COMP_CTX_new(COMP_METHOD *meth); |
| 43 | void COMP_CTX_free(COMP_CTX *ctx); | 39 | void COMP_CTX_free(COMP_CTX *ctx); |
| 44 | int COMP_compress_block(COMP_CTX *ctx, unsigned char *out, int olen, | 40 | int COMP_compress_block(COMP_CTX *ctx, unsigned char *out, int olen, |
| 45 | unsigned char *in, int ilen); | 41 | unsigned char *in, int ilen); |
| 46 | int COMP_expand_block(COMP_CTX *ctx, unsigned char *out, int olen, | 42 | int COMP_expand_block(COMP_CTX *ctx, unsigned char *out, int olen, |
| 47 | unsigned char *in, int ilen); | 43 | unsigned char *in, int ilen); |
| 48 | COMP_METHOD *COMP_rle(void ); | 44 | COMP_METHOD *COMP_rle(void ); |
| 49 | COMP_METHOD *COMP_zlib(void ); | 45 | COMP_METHOD *COMP_zlib(void ); |
| 50 | void COMP_zlib_cleanup(void); | 46 | void COMP_zlib_cleanup(void); |
