summaryrefslogtreecommitdiff
path: root/src/lib/libcrypto/comp/comp.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/lib/libcrypto/comp/comp.h')
-rw-r--r--src/lib/libcrypto/comp/comp.h29
1 files changed, 1 insertions, 28 deletions
diff --git a/src/lib/libcrypto/comp/comp.h b/src/lib/libcrypto/comp/comp.h
index fe7397f8ea..7c99ead358 100644
--- a/src/lib/libcrypto/comp/comp.h
+++ b/src/lib/libcrypto/comp/comp.h
@@ -1,4 +1,4 @@
1/* $OpenBSD: comp.h,v 1.8 2014/11/03 16:58:28 tedu Exp $ */ 1/* $OpenBSD: comp.h,v 1.9 2022/01/14 08:21:12 tb Exp $ */
2 2
3#ifndef HEADER_COMP_H 3#ifndef HEADER_COMP_H
4#define HEADER_COMP_H 4#define HEADER_COMP_H
@@ -9,33 +9,6 @@
9extern "C" { 9extern "C" {
10#endif 10#endif
11 11
12typedef struct comp_ctx_st COMP_CTX;
13
14typedef struct comp_method_st {
15 int type; /* NID for compression library */
16 const char *name; /* A text string to identify the library */
17 int (*init)(COMP_CTX *ctx);
18 void (*finish)(COMP_CTX *ctx);
19 int (*compress)(COMP_CTX *ctx, unsigned char *out, unsigned int olen,
20 unsigned char *in, unsigned int ilen);
21 int (*expand)(COMP_CTX *ctx, unsigned char *out, unsigned int olen,
22 unsigned char *in, unsigned int ilen);
23 /* The following two do NOTHING, but are kept for backward compatibility */
24 long (*ctrl)(void);
25 long (*callback_ctrl)(void);
26} COMP_METHOD;
27
28struct comp_ctx_st {
29 COMP_METHOD *meth;
30 unsigned long compress_in;
31 unsigned long compress_out;
32 unsigned long expand_in;
33 unsigned long expand_out;
34
35 CRYPTO_EX_DATA ex_data;
36};
37
38
39COMP_CTX *COMP_CTX_new(COMP_METHOD *meth); 12COMP_CTX *COMP_CTX_new(COMP_METHOD *meth);
40void COMP_CTX_free(COMP_CTX *ctx); 13void COMP_CTX_free(COMP_CTX *ctx);
41int COMP_compress_block(COMP_CTX *ctx, unsigned char *out, int olen, 14int COMP_compress_block(COMP_CTX *ctx, unsigned char *out, int olen,