summaryrefslogtreecommitdiff
path: root/src/lib/libcrypto/comp/comp.h
diff options
context:
space:
mode:
authordjm <>2008-09-06 12:15:56 +0000
committerdjm <>2008-09-06 12:15:56 +0000
commit5a3c0a05c7f2c5d3c584b7c8d6aec836dd724c80 (patch)
treeaba68249883aa9d2361d92eef69a81d0c4961732 /src/lib/libcrypto/comp/comp.h
parentf6198d4d0ab97685dc56be2d48715ed39fcc74b9 (diff)
downloadopenbsd-5a3c0a05c7f2c5d3c584b7c8d6aec836dd724c80.tar.gz
openbsd-5a3c0a05c7f2c5d3c584b7c8d6aec836dd724c80.tar.bz2
openbsd-5a3c0a05c7f2c5d3c584b7c8d6aec836dd724c80.zip
import of OpenSSL 0.9.8h
Diffstat (limited to 'src/lib/libcrypto/comp/comp.h')
-rw-r--r--src/lib/libcrypto/comp/comp.h37
1 files changed, 29 insertions, 8 deletions
diff --git a/src/lib/libcrypto/comp/comp.h b/src/lib/libcrypto/comp/comp.h
index ab48b78ae9..4b405c7d49 100644
--- a/src/lib/libcrypto/comp/comp.h
+++ b/src/lib/libcrypto/comp/comp.h
@@ -8,19 +8,26 @@
8extern "C" { 8extern "C" {
9#endif 9#endif
10 10
11typedef struct comp_ctx_st COMP_CTX;
12
11typedef struct comp_method_st 13typedef struct comp_method_st
12 { 14 {
13 int type; /* NID for compression library */ 15 int type; /* NID for compression library */
14 const char *name; /* A text string to identify the library */ 16 const char *name; /* A text string to identify the library */
15 int (*init)(); 17 int (*init)(COMP_CTX *ctx);
16 void (*finish)(); 18 void (*finish)(COMP_CTX *ctx);
17 int (*compress)(); 19 int (*compress)(COMP_CTX *ctx,
18 int (*expand)(); 20 unsigned char *out, unsigned int olen,
19 long (*ctrl)(); 21 unsigned char *in, unsigned int ilen);
20 long (*callback_ctrl)(); 22 int (*expand)(COMP_CTX *ctx,
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 */
26 long (*ctrl)(void);
27 long (*callback_ctrl)(void);
21 } COMP_METHOD; 28 } COMP_METHOD;
22 29
23typedef struct comp_ctx_st 30struct comp_ctx_st
24 { 31 {
25 COMP_METHOD *meth; 32 COMP_METHOD *meth;
26 unsigned long compress_in; 33 unsigned long compress_in;
@@ -29,7 +36,7 @@ typedef struct comp_ctx_st
29 unsigned long expand_out; 36 unsigned long expand_out;
30 37
31 CRYPTO_EX_DATA ex_data; 38 CRYPTO_EX_DATA ex_data;
32 } COMP_CTX; 39 };
33 40
34 41
35COMP_CTX *COMP_CTX_new(COMP_METHOD *meth); 42COMP_CTX *COMP_CTX_new(COMP_METHOD *meth);
@@ -40,6 +47,13 @@ int COMP_expand_block(COMP_CTX *ctx, unsigned char *out, int olen,
40 unsigned char *in, int ilen); 47 unsigned char *in, int ilen);
41COMP_METHOD *COMP_rle(void ); 48COMP_METHOD *COMP_rle(void );
42COMP_METHOD *COMP_zlib(void ); 49COMP_METHOD *COMP_zlib(void );
50void COMP_zlib_cleanup(void);
51
52#ifdef HEADER_BIO_H
53#ifdef ZLIB
54BIO_METHOD *BIO_f_zlib(void);
55#endif
56#endif
43 57
44/* BEGIN ERROR CODES */ 58/* BEGIN ERROR CODES */
45/* The following lines are auto generated by the script mkerr.pl. Any changes 59/* The following lines are auto generated by the script mkerr.pl. Any changes
@@ -50,8 +64,15 @@ void ERR_load_COMP_strings(void);
50/* Error codes for the COMP functions. */ 64/* Error codes for the COMP functions. */
51 65
52/* Function codes. */ 66/* Function codes. */
67#define COMP_F_BIO_ZLIB_FLUSH 99
68#define COMP_F_BIO_ZLIB_NEW 100
69#define COMP_F_BIO_ZLIB_READ 101
70#define COMP_F_BIO_ZLIB_WRITE 102
53 71
54/* Reason codes. */ 72/* Reason codes. */
73#define COMP_R_ZLIB_DEFLATE_ERROR 99
74#define COMP_R_ZLIB_INFLATE_ERROR 100
75#define COMP_R_ZLIB_NOT_SUPPORTED 101
55 76
56#ifdef __cplusplus 77#ifdef __cplusplus
57} 78}