diff options
| author | tb <> | 2022-01-14 08:21:12 +0000 |
|---|---|---|
| committer | tb <> | 2022-01-14 08:21:12 +0000 |
| commit | ac16e54e75a14731990afd6a000b7a0ea3cdbfc8 (patch) | |
| tree | d35ba256e6406a4df9d8d22f3053ae363531bf9f /src/lib/libcrypto/comp/comp_local.h | |
| parent | 0d97b61e5731530ddae73ec68940b695333cddb8 (diff) | |
| download | openbsd-ac16e54e75a14731990afd6a000b7a0ea3cdbfc8.tar.gz openbsd-ac16e54e75a14731990afd6a000b7a0ea3cdbfc8.tar.bz2 openbsd-ac16e54e75a14731990afd6a000b7a0ea3cdbfc8.zip | |
Make structs in comp.h opaque
This moves COMP_CTX and COMP_METHOD to comp_local.h and provides
missing typedefs in ossl_typ.h.
ok inoguchi jsing
Diffstat (limited to 'src/lib/libcrypto/comp/comp_local.h')
| -rw-r--r-- | src/lib/libcrypto/comp/comp_local.h | 28 |
1 files changed, 27 insertions, 1 deletions
diff --git a/src/lib/libcrypto/comp/comp_local.h b/src/lib/libcrypto/comp/comp_local.h index e1dfff1251..fc1888711b 100644 --- a/src/lib/libcrypto/comp/comp_local.h +++ b/src/lib/libcrypto/comp/comp_local.h | |||
| @@ -1,10 +1,36 @@ | |||
| 1 | /* $OpenBSD: comp_local.h,v 1.1 2022/01/09 23:50:10 tb Exp $ */ | 1 | /* $OpenBSD: comp_local.h,v 1.2 2022/01/14 08:21:12 tb Exp $ */ |
| 2 | 2 | ||
| 3 | #ifndef HEADER_COMP_LOCAL_H | 3 | #ifndef HEADER_COMP_LOCAL_H |
| 4 | #define HEADER_COMP_LOCAL_H | 4 | #define HEADER_COMP_LOCAL_H |
| 5 | 5 | ||
| 6 | __BEGIN_HIDDEN_DECLS | 6 | __BEGIN_HIDDEN_DECLS |
| 7 | 7 | ||
| 8 | struct CMP_CTX; | ||
| 9 | |||
| 10 | struct comp_method_st { | ||
| 11 | int type; /* NID for compression library */ | ||
| 12 | const char *name; /* A text string to identify the library */ | ||
| 13 | int (*init)(COMP_CTX *ctx); | ||
| 14 | void (*finish)(COMP_CTX *ctx); | ||
| 15 | int (*compress)(COMP_CTX *ctx, unsigned char *out, unsigned int olen, | ||
| 16 | unsigned char *in, unsigned int ilen); | ||
| 17 | int (*expand)(COMP_CTX *ctx, unsigned char *out, unsigned int olen, | ||
| 18 | unsigned char *in, unsigned int ilen); | ||
| 19 | /* The following two do NOTHING, but are kept for backward compatibility */ | ||
| 20 | long (*ctrl)(void); | ||
| 21 | long (*callback_ctrl)(void); | ||
| 22 | } /* COMP_METHOD */; | ||
| 23 | |||
| 24 | struct comp_ctx_st { | ||
| 25 | COMP_METHOD *meth; | ||
| 26 | unsigned long compress_in; | ||
| 27 | unsigned long compress_out; | ||
| 28 | unsigned long expand_in; | ||
| 29 | unsigned long expand_out; | ||
| 30 | |||
| 31 | CRYPTO_EX_DATA ex_data; | ||
| 32 | } /* COMP_CTX */; | ||
| 33 | |||
| 8 | __END_HIDDEN_DECLS | 34 | __END_HIDDEN_DECLS |
| 9 | 35 | ||
| 10 | #endif /* !HEADER_COMP_LOCAL_H */ | 36 | #endif /* !HEADER_COMP_LOCAL_H */ |
