File indexing completed on 2025-01-18 10:05:40
0001
0002
0003
0004
0005
0006
0007
0008
0009
0010
0011
0012 #ifndef OPENSSL_COMP_H
0013 # define OPENSSL_COMP_H
0014 # pragma once
0015
0016 # include <openssl/macros.h>
0017 # ifndef OPENSSL_NO_DEPRECATED_3_0
0018 # define HEADER_COMP_H
0019 # endif
0020
0021 # include <openssl/opensslconf.h>
0022
0023 # include <openssl/crypto.h>
0024 # include <openssl/comperr.h>
0025 # ifdef __cplusplus
0026 extern "C" {
0027 # endif
0028
0029
0030
0031 # ifndef OPENSSL_NO_COMP
0032
0033 COMP_CTX *COMP_CTX_new(COMP_METHOD *meth);
0034 const COMP_METHOD *COMP_CTX_get_method(const COMP_CTX *ctx);
0035 int COMP_CTX_get_type(const COMP_CTX* comp);
0036 int COMP_get_type(const COMP_METHOD *meth);
0037 const char *COMP_get_name(const COMP_METHOD *meth);
0038 void COMP_CTX_free(COMP_CTX *ctx);
0039
0040 int COMP_compress_block(COMP_CTX *ctx, unsigned char *out, int olen,
0041 unsigned char *in, int ilen);
0042 int COMP_expand_block(COMP_CTX *ctx, unsigned char *out, int olen,
0043 unsigned char *in, int ilen);
0044
0045 COMP_METHOD *COMP_zlib(void);
0046 COMP_METHOD *COMP_zlib_oneshot(void);
0047 COMP_METHOD *COMP_brotli(void);
0048 COMP_METHOD *COMP_brotli_oneshot(void);
0049 COMP_METHOD *COMP_zstd(void);
0050 COMP_METHOD *COMP_zstd_oneshot(void);
0051
0052 # ifndef OPENSSL_NO_DEPRECATED_1_1_0
0053 # define COMP_zlib_cleanup() while(0) continue
0054 # endif
0055
0056 # ifdef OPENSSL_BIO_H
0057 const BIO_METHOD *BIO_f_zlib(void);
0058 const BIO_METHOD *BIO_f_brotli(void);
0059 const BIO_METHOD *BIO_f_zstd(void);
0060 # endif
0061
0062 # endif
0063
0064 typedef struct ssl_comp_st SSL_COMP;
0065
0066 SKM_DEFINE_STACK_OF_INTERNAL(SSL_COMP, SSL_COMP, SSL_COMP)
0067 #define sk_SSL_COMP_num(sk) OPENSSL_sk_num(ossl_check_const_SSL_COMP_sk_type(sk))
0068 #define sk_SSL_COMP_value(sk, idx) ((SSL_COMP *)OPENSSL_sk_value(ossl_check_const_SSL_COMP_sk_type(sk), (idx)))
0069 #define sk_SSL_COMP_new(cmp) ((STACK_OF(SSL_COMP) *)OPENSSL_sk_new(ossl_check_SSL_COMP_compfunc_type(cmp)))
0070 #define sk_SSL_COMP_new_null() ((STACK_OF(SSL_COMP) *)OPENSSL_sk_new_null())
0071 #define sk_SSL_COMP_new_reserve(cmp, n) ((STACK_OF(SSL_COMP) *)OPENSSL_sk_new_reserve(ossl_check_SSL_COMP_compfunc_type(cmp), (n)))
0072 #define sk_SSL_COMP_reserve(sk, n) OPENSSL_sk_reserve(ossl_check_SSL_COMP_sk_type(sk), (n))
0073 #define sk_SSL_COMP_free(sk) OPENSSL_sk_free(ossl_check_SSL_COMP_sk_type(sk))
0074 #define sk_SSL_COMP_zero(sk) OPENSSL_sk_zero(ossl_check_SSL_COMP_sk_type(sk))
0075 #define sk_SSL_COMP_delete(sk, i) ((SSL_COMP *)OPENSSL_sk_delete(ossl_check_SSL_COMP_sk_type(sk), (i)))
0076 #define sk_SSL_COMP_delete_ptr(sk, ptr) ((SSL_COMP *)OPENSSL_sk_delete_ptr(ossl_check_SSL_COMP_sk_type(sk), ossl_check_SSL_COMP_type(ptr)))
0077 #define sk_SSL_COMP_push(sk, ptr) OPENSSL_sk_push(ossl_check_SSL_COMP_sk_type(sk), ossl_check_SSL_COMP_type(ptr))
0078 #define sk_SSL_COMP_unshift(sk, ptr) OPENSSL_sk_unshift(ossl_check_SSL_COMP_sk_type(sk), ossl_check_SSL_COMP_type(ptr))
0079 #define sk_SSL_COMP_pop(sk) ((SSL_COMP *)OPENSSL_sk_pop(ossl_check_SSL_COMP_sk_type(sk)))
0080 #define sk_SSL_COMP_shift(sk) ((SSL_COMP *)OPENSSL_sk_shift(ossl_check_SSL_COMP_sk_type(sk)))
0081 #define sk_SSL_COMP_pop_free(sk, freefunc) OPENSSL_sk_pop_free(ossl_check_SSL_COMP_sk_type(sk),ossl_check_SSL_COMP_freefunc_type(freefunc))
0082 #define sk_SSL_COMP_insert(sk, ptr, idx) OPENSSL_sk_insert(ossl_check_SSL_COMP_sk_type(sk), ossl_check_SSL_COMP_type(ptr), (idx))
0083 #define sk_SSL_COMP_set(sk, idx, ptr) ((SSL_COMP *)OPENSSL_sk_set(ossl_check_SSL_COMP_sk_type(sk), (idx), ossl_check_SSL_COMP_type(ptr)))
0084 #define sk_SSL_COMP_find(sk, ptr) OPENSSL_sk_find(ossl_check_SSL_COMP_sk_type(sk), ossl_check_SSL_COMP_type(ptr))
0085 #define sk_SSL_COMP_find_ex(sk, ptr) OPENSSL_sk_find_ex(ossl_check_SSL_COMP_sk_type(sk), ossl_check_SSL_COMP_type(ptr))
0086 #define sk_SSL_COMP_find_all(sk, ptr, pnum) OPENSSL_sk_find_all(ossl_check_SSL_COMP_sk_type(sk), ossl_check_SSL_COMP_type(ptr), pnum)
0087 #define sk_SSL_COMP_sort(sk) OPENSSL_sk_sort(ossl_check_SSL_COMP_sk_type(sk))
0088 #define sk_SSL_COMP_is_sorted(sk) OPENSSL_sk_is_sorted(ossl_check_const_SSL_COMP_sk_type(sk))
0089 #define sk_SSL_COMP_dup(sk) ((STACK_OF(SSL_COMP) *)OPENSSL_sk_dup(ossl_check_const_SSL_COMP_sk_type(sk)))
0090 #define sk_SSL_COMP_deep_copy(sk, copyfunc, freefunc) ((STACK_OF(SSL_COMP) *)OPENSSL_sk_deep_copy(ossl_check_const_SSL_COMP_sk_type(sk), ossl_check_SSL_COMP_copyfunc_type(copyfunc), ossl_check_SSL_COMP_freefunc_type(freefunc)))
0091 #define sk_SSL_COMP_set_cmp_func(sk, cmp) ((sk_SSL_COMP_compfunc)OPENSSL_sk_set_cmp_func(ossl_check_SSL_COMP_sk_type(sk), ossl_check_SSL_COMP_compfunc_type(cmp)))
0092
0093
0094
0095 # ifdef __cplusplus
0096 }
0097 # endif
0098 #endif