Coverage Report

Created: 2023-04-12 06:22

/src/deps/include/openssl/lhash.h
Line
Count
Source (jump to first uncovered line)
1
/*
2
 * Copyright 1995-2021 The OpenSSL Project Authors. All Rights Reserved.
3
 *
4
 * Licensed under the Apache License 2.0 (the "License").  You may not use
5
 * this file except in compliance with the License.  You can obtain a copy
6
 * in the file LICENSE in the source distribution or at
7
 * https://www.openssl.org/source/license.html
8
 */
9
10
11
12
/*
13
 * Header for dynamic hash table routines Author - Eric Young
14
 */
15
16
#ifndef OPENSSL_LHASH_H
17
# define OPENSSL_LHASH_H
18
# pragma once
19
20
# include <openssl/macros.h>
21
# ifndef OPENSSL_NO_DEPRECATED_3_0
22
#  define HEADER_LHASH_H
23
# endif
24
25
# include <openssl/e_os2.h>
26
# include <openssl/bio.h>
27
# ifndef OPENSSL_NO_STDIO
28
#  include <stdio.h>
29
# endif
30
31
#ifdef  __cplusplus
32
extern "C" {
33
#endif
34
35
typedef struct lhash_node_st OPENSSL_LH_NODE;
36
typedef int (*OPENSSL_LH_COMPFUNC) (const void *, const void *);
37
typedef unsigned long (*OPENSSL_LH_HASHFUNC) (const void *);
38
typedef void (*OPENSSL_LH_DOALL_FUNC) (void *);
39
typedef void (*OPENSSL_LH_DOALL_FUNCARG) (void *, void *);
40
typedef struct lhash_st OPENSSL_LHASH;
41
42
/*
43
 * Macros for declaring and implementing type-safe wrappers for LHASH
44
 * callbacks. This way, callbacks can be provided to LHASH structures without
45
 * function pointer casting and the macro-defined callbacks provide
46
 * per-variable casting before deferring to the underlying type-specific
47
 * callbacks. NB: It is possible to place a "static" in front of both the
48
 * DECLARE and IMPLEMENT macros if the functions are strictly internal.
49
 */
50
51
/* First: "hash" functions */
52
# define DECLARE_LHASH_HASH_FN(name, o_type) \
53
        unsigned long name##_LHASH_HASH(const void *);
54
# define IMPLEMENT_LHASH_HASH_FN(name, o_type) \
55
        unsigned long name##_LHASH_HASH(const void *arg) { \
56
                const o_type *a = arg; \
57
                return name##_hash(a); }
58
# define LHASH_HASH_FN(name) name##_LHASH_HASH
59
60
/* Second: "compare" functions */
61
# define DECLARE_LHASH_COMP_FN(name, o_type) \
62
        int name##_LHASH_COMP(const void *, const void *);
63
# define IMPLEMENT_LHASH_COMP_FN(name, o_type) \
64
        int name##_LHASH_COMP(const void *arg1, const void *arg2) { \
65
                const o_type *a = arg1;             \
66
                const o_type *b = arg2; \
67
                return name##_cmp(a,b); }
68
# define LHASH_COMP_FN(name) name##_LHASH_COMP
69
70
/* Fourth: "doall_arg" functions */
71
# define DECLARE_LHASH_DOALL_ARG_FN(name, o_type, a_type) \
72
        void name##_LHASH_DOALL_ARG(void *, void *);
73
# define IMPLEMENT_LHASH_DOALL_ARG_FN(name, o_type, a_type) \
74
        void name##_LHASH_DOALL_ARG(void *arg1, void *arg2) { \
75
                o_type *a = arg1; \
76
                a_type *b = arg2; \
77
                name##_doall_arg(a, b); }
78
# define LHASH_DOALL_ARG_FN(name) name##_LHASH_DOALL_ARG
79
80
81
# define LH_LOAD_MULT    256
82
83
int OPENSSL_LH_error(OPENSSL_LHASH *lh);
84
OPENSSL_LHASH *OPENSSL_LH_new(OPENSSL_LH_HASHFUNC h, OPENSSL_LH_COMPFUNC c);
85
void OPENSSL_LH_free(OPENSSL_LHASH *lh);
86
void OPENSSL_LH_flush(OPENSSL_LHASH *lh);
87
void *OPENSSL_LH_insert(OPENSSL_LHASH *lh, void *data);
88
void *OPENSSL_LH_delete(OPENSSL_LHASH *lh, const void *data);
89
void *OPENSSL_LH_retrieve(OPENSSL_LHASH *lh, const void *data);
90
void OPENSSL_LH_doall(OPENSSL_LHASH *lh, OPENSSL_LH_DOALL_FUNC func);
91
void OPENSSL_LH_doall_arg(OPENSSL_LHASH *lh, OPENSSL_LH_DOALL_FUNCARG func, void *arg);
92
unsigned long OPENSSL_LH_strhash(const char *c);
93
unsigned long OPENSSL_LH_num_items(const OPENSSL_LHASH *lh);
94
unsigned long OPENSSL_LH_get_down_load(const OPENSSL_LHASH *lh);
95
void OPENSSL_LH_set_down_load(OPENSSL_LHASH *lh, unsigned long down_load);
96
97
# ifndef OPENSSL_NO_STDIO
98
#  ifndef OPENSSL_NO_DEPRECATED_3_2
99
OSSL_DEPRECATEDIN_3_2 void OPENSSL_LH_stats(const OPENSSL_LHASH *lh, FILE *fp);
100
OSSL_DEPRECATEDIN_3_2 void OPENSSL_LH_node_stats(const OPENSSL_LHASH *lh, FILE *fp);
101
OSSL_DEPRECATEDIN_3_2 void OPENSSL_LH_node_usage_stats(const OPENSSL_LHASH *lh, FILE *fp);
102
#  endif
103
# endif
104
# ifndef OPENSSL_NO_DEPRECATED_3_2
105
OSSL_DEPRECATEDIN_3_2 void OPENSSL_LH_stats_bio(const OPENSSL_LHASH *lh, BIO *out);
106
OSSL_DEPRECATEDIN_3_2 void OPENSSL_LH_node_stats_bio(const OPENSSL_LHASH *lh, BIO *out);
107
OSSL_DEPRECATEDIN_3_2 void OPENSSL_LH_node_usage_stats_bio(const OPENSSL_LHASH *lh, BIO *out);
108
# endif
109
110
# ifndef OPENSSL_NO_DEPRECATED_1_1_0
111
#  define _LHASH OPENSSL_LHASH
112
#  define LHASH_NODE OPENSSL_LH_NODE
113
#  define lh_error OPENSSL_LH_error
114
#  define lh_new OPENSSL_LH_new
115
#  define lh_free OPENSSL_LH_free
116
#  define lh_insert OPENSSL_LH_insert
117
#  define lh_delete OPENSSL_LH_delete
118
#  define lh_retrieve OPENSSL_LH_retrieve
119
#  define lh_doall OPENSSL_LH_doall
120
#  define lh_doall_arg OPENSSL_LH_doall_arg
121
#  define lh_strhash OPENSSL_LH_strhash
122
#  define lh_num_items OPENSSL_LH_num_items
123
#  ifndef OPENSSL_NO_STDIO
124
#   define lh_stats OPENSSL_LH_stats
125
#   define lh_node_stats OPENSSL_LH_node_stats
126
#   define lh_node_usage_stats OPENSSL_LH_node_usage_stats
127
#  endif
128
#  define lh_stats_bio OPENSSL_LH_stats_bio
129
#  define lh_node_stats_bio OPENSSL_LH_node_stats_bio
130
#  define lh_node_usage_stats_bio OPENSSL_LH_node_usage_stats_bio
131
# endif
132
133
/* Type checking... */
134
135
# define LHASH_OF(type) struct lhash_st_##type
136
137
/* Helper macro for internal use */
138
# define DEFINE_LHASH_OF_INTERNAL(type) \
139
    LHASH_OF(type) { \
140
        union lh_##type##_dummy { void* d1; unsigned long d2; int d3; } dummy; \
141
    }; \
142
    typedef int (*lh_##type##_compfunc)(const type *a, const type *b); \
143
    typedef unsigned long (*lh_##type##_hashfunc)(const type *a); \
144
    typedef void (*lh_##type##_doallfunc)(type *a); \
145
    static ossl_unused ossl_inline type *\
146
    ossl_check_##type##_lh_plain_type(type *ptr) \
147
0
    { \
148
0
        return ptr; \
149
0
    } \
Unexecuted instantiation: crypto_openssl_mgt.c:ossl_check_OPENSSL_STRING_lh_plain_type
Unexecuted instantiation: crypto_openssl_mgt.c:ossl_check_OPENSSL_CSTRING_lh_plain_type
Unexecuted instantiation: crypto_openssl_mgt.c:ossl_check_ERR_STRING_DATA_lh_plain_type
Unexecuted instantiation: crypto_openssl_mgt.c:ossl_check_CONF_VALUE_lh_plain_type
Unexecuted instantiation: crypto_rsa_openssl.c:ossl_check_OPENSSL_STRING_lh_plain_type
Unexecuted instantiation: crypto_rsa_openssl.c:ossl_check_OPENSSL_CSTRING_lh_plain_type
Unexecuted instantiation: crypto_rsa_openssl.c:ossl_check_ERR_STRING_DATA_lh_plain_type
Unexecuted instantiation: crypto_rsa_openssl.c:ossl_check_CONF_VALUE_lh_plain_type
Unexecuted instantiation: crypto_util.c:ossl_check_OPENSSL_STRING_lh_plain_type
Unexecuted instantiation: crypto_util.c:ossl_check_OPENSSL_CSTRING_lh_plain_type
Unexecuted instantiation: crypto_util.c:ossl_check_ERR_STRING_DATA_lh_plain_type
Unexecuted instantiation: tortls_openssl.c:ossl_check_OPENSSL_STRING_lh_plain_type
Unexecuted instantiation: tortls_openssl.c:ossl_check_OPENSSL_CSTRING_lh_plain_type
Unexecuted instantiation: tortls_openssl.c:ossl_check_CONF_VALUE_lh_plain_type
Unexecuted instantiation: tortls_openssl.c:ossl_check_ERR_STRING_DATA_lh_plain_type
Unexecuted instantiation: x509_openssl.c:ossl_check_OPENSSL_STRING_lh_plain_type
Unexecuted instantiation: x509_openssl.c:ossl_check_OPENSSL_CSTRING_lh_plain_type
Unexecuted instantiation: x509_openssl.c:ossl_check_ERR_STRING_DATA_lh_plain_type
Unexecuted instantiation: x509_openssl.c:ossl_check_CONF_VALUE_lh_plain_type
Unexecuted instantiation: aes_openssl.c:ossl_check_OPENSSL_STRING_lh_plain_type
Unexecuted instantiation: aes_openssl.c:ossl_check_OPENSSL_CSTRING_lh_plain_type
Unexecuted instantiation: aes_openssl.c:ossl_check_CONF_VALUE_lh_plain_type
Unexecuted instantiation: aes_openssl.c:ossl_check_ERR_STRING_DATA_lh_plain_type
150
    static ossl_unused ossl_inline const type * \
151
    ossl_check_const_##type##_lh_plain_type(const type *ptr) \
152
0
    { \
153
0
        return ptr; \
154
0
    } \
Unexecuted instantiation: crypto_openssl_mgt.c:ossl_check_const_OPENSSL_STRING_lh_plain_type
Unexecuted instantiation: crypto_openssl_mgt.c:ossl_check_const_OPENSSL_CSTRING_lh_plain_type
Unexecuted instantiation: crypto_openssl_mgt.c:ossl_check_const_ERR_STRING_DATA_lh_plain_type
Unexecuted instantiation: crypto_openssl_mgt.c:ossl_check_const_CONF_VALUE_lh_plain_type
Unexecuted instantiation: crypto_rsa_openssl.c:ossl_check_const_OPENSSL_STRING_lh_plain_type
Unexecuted instantiation: crypto_rsa_openssl.c:ossl_check_const_OPENSSL_CSTRING_lh_plain_type
Unexecuted instantiation: crypto_rsa_openssl.c:ossl_check_const_ERR_STRING_DATA_lh_plain_type
Unexecuted instantiation: crypto_rsa_openssl.c:ossl_check_const_CONF_VALUE_lh_plain_type
Unexecuted instantiation: crypto_util.c:ossl_check_const_OPENSSL_STRING_lh_plain_type
Unexecuted instantiation: crypto_util.c:ossl_check_const_OPENSSL_CSTRING_lh_plain_type
Unexecuted instantiation: crypto_util.c:ossl_check_const_ERR_STRING_DATA_lh_plain_type
Unexecuted instantiation: tortls_openssl.c:ossl_check_const_OPENSSL_STRING_lh_plain_type
Unexecuted instantiation: tortls_openssl.c:ossl_check_const_OPENSSL_CSTRING_lh_plain_type
Unexecuted instantiation: tortls_openssl.c:ossl_check_const_CONF_VALUE_lh_plain_type
Unexecuted instantiation: tortls_openssl.c:ossl_check_const_ERR_STRING_DATA_lh_plain_type
Unexecuted instantiation: x509_openssl.c:ossl_check_const_OPENSSL_STRING_lh_plain_type
Unexecuted instantiation: x509_openssl.c:ossl_check_const_OPENSSL_CSTRING_lh_plain_type
Unexecuted instantiation: x509_openssl.c:ossl_check_const_ERR_STRING_DATA_lh_plain_type
Unexecuted instantiation: x509_openssl.c:ossl_check_const_CONF_VALUE_lh_plain_type
Unexecuted instantiation: aes_openssl.c:ossl_check_const_OPENSSL_STRING_lh_plain_type
Unexecuted instantiation: aes_openssl.c:ossl_check_const_OPENSSL_CSTRING_lh_plain_type
Unexecuted instantiation: aes_openssl.c:ossl_check_const_CONF_VALUE_lh_plain_type
Unexecuted instantiation: aes_openssl.c:ossl_check_const_ERR_STRING_DATA_lh_plain_type
155
    static ossl_unused ossl_inline const OPENSSL_LHASH * \
156
    ossl_check_const_##type##_lh_type(const LHASH_OF(type) *lh) \
157
0
    { \
158
0
        return (const OPENSSL_LHASH *)lh; \
159
0
    } \
Unexecuted instantiation: crypto_openssl_mgt.c:ossl_check_const_OPENSSL_STRING_lh_type
Unexecuted instantiation: crypto_openssl_mgt.c:ossl_check_const_OPENSSL_CSTRING_lh_type
Unexecuted instantiation: crypto_openssl_mgt.c:ossl_check_const_ERR_STRING_DATA_lh_type
Unexecuted instantiation: crypto_openssl_mgt.c:ossl_check_const_CONF_VALUE_lh_type
Unexecuted instantiation: crypto_rsa_openssl.c:ossl_check_const_OPENSSL_STRING_lh_type
Unexecuted instantiation: crypto_rsa_openssl.c:ossl_check_const_OPENSSL_CSTRING_lh_type
Unexecuted instantiation: crypto_rsa_openssl.c:ossl_check_const_ERR_STRING_DATA_lh_type
Unexecuted instantiation: crypto_rsa_openssl.c:ossl_check_const_CONF_VALUE_lh_type
Unexecuted instantiation: crypto_util.c:ossl_check_const_OPENSSL_STRING_lh_type
Unexecuted instantiation: crypto_util.c:ossl_check_const_OPENSSL_CSTRING_lh_type
Unexecuted instantiation: crypto_util.c:ossl_check_const_ERR_STRING_DATA_lh_type
Unexecuted instantiation: tortls_openssl.c:ossl_check_const_OPENSSL_STRING_lh_type
Unexecuted instantiation: tortls_openssl.c:ossl_check_const_OPENSSL_CSTRING_lh_type
Unexecuted instantiation: tortls_openssl.c:ossl_check_const_CONF_VALUE_lh_type
Unexecuted instantiation: tortls_openssl.c:ossl_check_const_ERR_STRING_DATA_lh_type
Unexecuted instantiation: x509_openssl.c:ossl_check_const_OPENSSL_STRING_lh_type
Unexecuted instantiation: x509_openssl.c:ossl_check_const_OPENSSL_CSTRING_lh_type
Unexecuted instantiation: x509_openssl.c:ossl_check_const_ERR_STRING_DATA_lh_type
Unexecuted instantiation: x509_openssl.c:ossl_check_const_CONF_VALUE_lh_type
Unexecuted instantiation: aes_openssl.c:ossl_check_const_OPENSSL_STRING_lh_type
Unexecuted instantiation: aes_openssl.c:ossl_check_const_OPENSSL_CSTRING_lh_type
Unexecuted instantiation: aes_openssl.c:ossl_check_const_CONF_VALUE_lh_type
Unexecuted instantiation: aes_openssl.c:ossl_check_const_ERR_STRING_DATA_lh_type
160
    static ossl_unused ossl_inline OPENSSL_LHASH * \
161
    ossl_check_##type##_lh_type(LHASH_OF(type) *lh) \
162
0
    { \
163
0
        return (OPENSSL_LHASH *)lh; \
164
0
    } \
Unexecuted instantiation: crypto_openssl_mgt.c:ossl_check_OPENSSL_STRING_lh_type
Unexecuted instantiation: crypto_openssl_mgt.c:ossl_check_OPENSSL_CSTRING_lh_type
Unexecuted instantiation: crypto_openssl_mgt.c:ossl_check_ERR_STRING_DATA_lh_type
Unexecuted instantiation: crypto_openssl_mgt.c:ossl_check_CONF_VALUE_lh_type
Unexecuted instantiation: crypto_rsa_openssl.c:ossl_check_OPENSSL_STRING_lh_type
Unexecuted instantiation: crypto_rsa_openssl.c:ossl_check_OPENSSL_CSTRING_lh_type
Unexecuted instantiation: crypto_rsa_openssl.c:ossl_check_ERR_STRING_DATA_lh_type
Unexecuted instantiation: crypto_rsa_openssl.c:ossl_check_CONF_VALUE_lh_type
Unexecuted instantiation: crypto_util.c:ossl_check_OPENSSL_STRING_lh_type
Unexecuted instantiation: crypto_util.c:ossl_check_OPENSSL_CSTRING_lh_type
Unexecuted instantiation: crypto_util.c:ossl_check_ERR_STRING_DATA_lh_type
Unexecuted instantiation: tortls_openssl.c:ossl_check_OPENSSL_STRING_lh_type
Unexecuted instantiation: tortls_openssl.c:ossl_check_OPENSSL_CSTRING_lh_type
Unexecuted instantiation: tortls_openssl.c:ossl_check_CONF_VALUE_lh_type
Unexecuted instantiation: tortls_openssl.c:ossl_check_ERR_STRING_DATA_lh_type
Unexecuted instantiation: x509_openssl.c:ossl_check_OPENSSL_STRING_lh_type
Unexecuted instantiation: x509_openssl.c:ossl_check_OPENSSL_CSTRING_lh_type
Unexecuted instantiation: x509_openssl.c:ossl_check_ERR_STRING_DATA_lh_type
Unexecuted instantiation: x509_openssl.c:ossl_check_CONF_VALUE_lh_type
Unexecuted instantiation: aes_openssl.c:ossl_check_OPENSSL_STRING_lh_type
Unexecuted instantiation: aes_openssl.c:ossl_check_OPENSSL_CSTRING_lh_type
Unexecuted instantiation: aes_openssl.c:ossl_check_CONF_VALUE_lh_type
Unexecuted instantiation: aes_openssl.c:ossl_check_ERR_STRING_DATA_lh_type
165
    static ossl_unused ossl_inline OPENSSL_LH_COMPFUNC \
166
    ossl_check_##type##_lh_compfunc_type(lh_##type##_compfunc cmp) \
167
0
    { \
168
0
        return (OPENSSL_LH_COMPFUNC)cmp; \
169
0
    } \
Unexecuted instantiation: crypto_openssl_mgt.c:ossl_check_OPENSSL_STRING_lh_compfunc_type
Unexecuted instantiation: crypto_openssl_mgt.c:ossl_check_OPENSSL_CSTRING_lh_compfunc_type
Unexecuted instantiation: crypto_openssl_mgt.c:ossl_check_ERR_STRING_DATA_lh_compfunc_type
Unexecuted instantiation: crypto_openssl_mgt.c:ossl_check_CONF_VALUE_lh_compfunc_type
Unexecuted instantiation: crypto_rsa_openssl.c:ossl_check_OPENSSL_STRING_lh_compfunc_type
Unexecuted instantiation: crypto_rsa_openssl.c:ossl_check_OPENSSL_CSTRING_lh_compfunc_type
Unexecuted instantiation: crypto_rsa_openssl.c:ossl_check_ERR_STRING_DATA_lh_compfunc_type
Unexecuted instantiation: crypto_rsa_openssl.c:ossl_check_CONF_VALUE_lh_compfunc_type
Unexecuted instantiation: crypto_util.c:ossl_check_OPENSSL_STRING_lh_compfunc_type
Unexecuted instantiation: crypto_util.c:ossl_check_OPENSSL_CSTRING_lh_compfunc_type
Unexecuted instantiation: crypto_util.c:ossl_check_ERR_STRING_DATA_lh_compfunc_type
Unexecuted instantiation: tortls_openssl.c:ossl_check_OPENSSL_STRING_lh_compfunc_type
Unexecuted instantiation: tortls_openssl.c:ossl_check_OPENSSL_CSTRING_lh_compfunc_type
Unexecuted instantiation: tortls_openssl.c:ossl_check_CONF_VALUE_lh_compfunc_type
Unexecuted instantiation: tortls_openssl.c:ossl_check_ERR_STRING_DATA_lh_compfunc_type
Unexecuted instantiation: x509_openssl.c:ossl_check_OPENSSL_STRING_lh_compfunc_type
Unexecuted instantiation: x509_openssl.c:ossl_check_OPENSSL_CSTRING_lh_compfunc_type
Unexecuted instantiation: x509_openssl.c:ossl_check_ERR_STRING_DATA_lh_compfunc_type
Unexecuted instantiation: x509_openssl.c:ossl_check_CONF_VALUE_lh_compfunc_type
Unexecuted instantiation: aes_openssl.c:ossl_check_OPENSSL_STRING_lh_compfunc_type
Unexecuted instantiation: aes_openssl.c:ossl_check_OPENSSL_CSTRING_lh_compfunc_type
Unexecuted instantiation: aes_openssl.c:ossl_check_CONF_VALUE_lh_compfunc_type
Unexecuted instantiation: aes_openssl.c:ossl_check_ERR_STRING_DATA_lh_compfunc_type
170
    static ossl_unused ossl_inline OPENSSL_LH_HASHFUNC \
171
    ossl_check_##type##_lh_hashfunc_type(lh_##type##_hashfunc hfn) \
172
0
    { \
173
0
        return (OPENSSL_LH_HASHFUNC)hfn; \
174
0
    } \
Unexecuted instantiation: crypto_openssl_mgt.c:ossl_check_OPENSSL_STRING_lh_hashfunc_type
Unexecuted instantiation: crypto_openssl_mgt.c:ossl_check_OPENSSL_CSTRING_lh_hashfunc_type
Unexecuted instantiation: crypto_openssl_mgt.c:ossl_check_ERR_STRING_DATA_lh_hashfunc_type
Unexecuted instantiation: crypto_openssl_mgt.c:ossl_check_CONF_VALUE_lh_hashfunc_type
Unexecuted instantiation: crypto_rsa_openssl.c:ossl_check_OPENSSL_STRING_lh_hashfunc_type
Unexecuted instantiation: crypto_rsa_openssl.c:ossl_check_OPENSSL_CSTRING_lh_hashfunc_type
Unexecuted instantiation: crypto_rsa_openssl.c:ossl_check_ERR_STRING_DATA_lh_hashfunc_type
Unexecuted instantiation: crypto_rsa_openssl.c:ossl_check_CONF_VALUE_lh_hashfunc_type
Unexecuted instantiation: crypto_util.c:ossl_check_OPENSSL_STRING_lh_hashfunc_type
Unexecuted instantiation: crypto_util.c:ossl_check_OPENSSL_CSTRING_lh_hashfunc_type
Unexecuted instantiation: crypto_util.c:ossl_check_ERR_STRING_DATA_lh_hashfunc_type
Unexecuted instantiation: tortls_openssl.c:ossl_check_OPENSSL_STRING_lh_hashfunc_type
Unexecuted instantiation: tortls_openssl.c:ossl_check_OPENSSL_CSTRING_lh_hashfunc_type
Unexecuted instantiation: tortls_openssl.c:ossl_check_CONF_VALUE_lh_hashfunc_type
Unexecuted instantiation: tortls_openssl.c:ossl_check_ERR_STRING_DATA_lh_hashfunc_type
Unexecuted instantiation: x509_openssl.c:ossl_check_OPENSSL_STRING_lh_hashfunc_type
Unexecuted instantiation: x509_openssl.c:ossl_check_OPENSSL_CSTRING_lh_hashfunc_type
Unexecuted instantiation: x509_openssl.c:ossl_check_ERR_STRING_DATA_lh_hashfunc_type
Unexecuted instantiation: x509_openssl.c:ossl_check_CONF_VALUE_lh_hashfunc_type
Unexecuted instantiation: aes_openssl.c:ossl_check_OPENSSL_STRING_lh_hashfunc_type
Unexecuted instantiation: aes_openssl.c:ossl_check_OPENSSL_CSTRING_lh_hashfunc_type
Unexecuted instantiation: aes_openssl.c:ossl_check_CONF_VALUE_lh_hashfunc_type
Unexecuted instantiation: aes_openssl.c:ossl_check_ERR_STRING_DATA_lh_hashfunc_type
175
    static ossl_unused ossl_inline OPENSSL_LH_DOALL_FUNC \
176
    ossl_check_##type##_lh_doallfunc_type(lh_##type##_doallfunc dfn) \
177
0
    { \
178
0
        return (OPENSSL_LH_DOALL_FUNC)dfn; \
179
0
    } \
Unexecuted instantiation: crypto_openssl_mgt.c:ossl_check_OPENSSL_STRING_lh_doallfunc_type
Unexecuted instantiation: crypto_openssl_mgt.c:ossl_check_OPENSSL_CSTRING_lh_doallfunc_type
Unexecuted instantiation: crypto_openssl_mgt.c:ossl_check_ERR_STRING_DATA_lh_doallfunc_type
Unexecuted instantiation: crypto_openssl_mgt.c:ossl_check_CONF_VALUE_lh_doallfunc_type
Unexecuted instantiation: crypto_rsa_openssl.c:ossl_check_OPENSSL_STRING_lh_doallfunc_type
Unexecuted instantiation: crypto_rsa_openssl.c:ossl_check_OPENSSL_CSTRING_lh_doallfunc_type
Unexecuted instantiation: crypto_rsa_openssl.c:ossl_check_ERR_STRING_DATA_lh_doallfunc_type
Unexecuted instantiation: crypto_rsa_openssl.c:ossl_check_CONF_VALUE_lh_doallfunc_type
Unexecuted instantiation: crypto_util.c:ossl_check_OPENSSL_STRING_lh_doallfunc_type
Unexecuted instantiation: crypto_util.c:ossl_check_OPENSSL_CSTRING_lh_doallfunc_type
Unexecuted instantiation: crypto_util.c:ossl_check_ERR_STRING_DATA_lh_doallfunc_type
Unexecuted instantiation: tortls_openssl.c:ossl_check_OPENSSL_STRING_lh_doallfunc_type
Unexecuted instantiation: tortls_openssl.c:ossl_check_OPENSSL_CSTRING_lh_doallfunc_type
Unexecuted instantiation: tortls_openssl.c:ossl_check_CONF_VALUE_lh_doallfunc_type
Unexecuted instantiation: tortls_openssl.c:ossl_check_ERR_STRING_DATA_lh_doallfunc_type
Unexecuted instantiation: x509_openssl.c:ossl_check_OPENSSL_STRING_lh_doallfunc_type
Unexecuted instantiation: x509_openssl.c:ossl_check_OPENSSL_CSTRING_lh_doallfunc_type
Unexecuted instantiation: x509_openssl.c:ossl_check_ERR_STRING_DATA_lh_doallfunc_type
Unexecuted instantiation: x509_openssl.c:ossl_check_CONF_VALUE_lh_doallfunc_type
Unexecuted instantiation: aes_openssl.c:ossl_check_OPENSSL_STRING_lh_doallfunc_type
Unexecuted instantiation: aes_openssl.c:ossl_check_OPENSSL_CSTRING_lh_doallfunc_type
Unexecuted instantiation: aes_openssl.c:ossl_check_CONF_VALUE_lh_doallfunc_type
Unexecuted instantiation: aes_openssl.c:ossl_check_ERR_STRING_DATA_lh_doallfunc_type
180
    LHASH_OF(type)
181
182
# ifndef OPENSSL_NO_DEPRECATED_3_2
183
#  define DEFINE_LHASH_OF_DEPRECATED(type) \
184
    static ossl_unused ossl_inline void \
185
    lh_##type##_node_stats_bio(const LHASH_OF(type) *lh, BIO *out) \
186
    { \
187
        OPENSSL_LH_node_stats_bio((const OPENSSL_LHASH *)lh, out); \
188
    } \
189
    static ossl_unused ossl_inline void \
190
    lh_##type##_node_usage_stats_bio(const LHASH_OF(type) *lh, BIO *out) \
191
    { \
192
        OPENSSL_LH_node_usage_stats_bio((const OPENSSL_LHASH *)lh, out); \
193
    } \
194
    static ossl_unused ossl_inline void \
195
    lh_##type##_stats_bio(const LHASH_OF(type) *lh, BIO *out) \
196
    { \
197
        OPENSSL_LH_stats_bio((const OPENSSL_LHASH *)lh, out); \
198
    }
199
# else
200
#  define DEFINE_LHASH_OF_DEPRECATED(type)
201
# endif
202
203
# define DEFINE_LHASH_OF_EX(type) \
204
    LHASH_OF(type) { \
205
        union lh_##type##_dummy { void* d1; unsigned long d2; int d3; } dummy; \
206
    }; \
207
    static ossl_unused ossl_inline LHASH_OF(type) * \
208
    lh_##type##_new(unsigned long (*hfn)(const type *), \
209
                    int (*cfn)(const type *, const type *)) \
210
    { \
211
        return (LHASH_OF(type) *) \
212
            OPENSSL_LH_new((OPENSSL_LH_HASHFUNC)hfn, (OPENSSL_LH_COMPFUNC)cfn); \
213
    } \
214
    static ossl_unused ossl_inline void \
215
    lh_##type##_free(LHASH_OF(type) *lh) \
216
    { \
217
        OPENSSL_LH_free((OPENSSL_LHASH *)lh); \
218
    } \
219
    static ossl_unused ossl_inline void \
220
    lh_##type##_flush(LHASH_OF(type) *lh) \
221
    { \
222
        OPENSSL_LH_flush((OPENSSL_LHASH *)lh); \
223
    } \
224
    static ossl_unused ossl_inline type * \
225
    lh_##type##_insert(LHASH_OF(type) *lh, type *d) \
226
    { \
227
        return (type *)OPENSSL_LH_insert((OPENSSL_LHASH *)lh, d); \
228
    } \
229
    static ossl_unused ossl_inline type * \
230
    lh_##type##_delete(LHASH_OF(type) *lh, const type *d) \
231
    { \
232
        return (type *)OPENSSL_LH_delete((OPENSSL_LHASH *)lh, d); \
233
    } \
234
    static ossl_unused ossl_inline type * \
235
    lh_##type##_retrieve(LHASH_OF(type) *lh, const type *d) \
236
    { \
237
        return (type *)OPENSSL_LH_retrieve((OPENSSL_LHASH *)lh, d); \
238
    } \
239
    static ossl_unused ossl_inline int \
240
    lh_##type##_error(LHASH_OF(type) *lh) \
241
    { \
242
        return OPENSSL_LH_error((OPENSSL_LHASH *)lh); \
243
    } \
244
    static ossl_unused ossl_inline unsigned long \
245
    lh_##type##_num_items(LHASH_OF(type) *lh) \
246
    { \
247
        return OPENSSL_LH_num_items((OPENSSL_LHASH *)lh); \
248
    } \
249
    static ossl_unused ossl_inline unsigned long \
250
    lh_##type##_get_down_load(LHASH_OF(type) *lh) \
251
    { \
252
        return OPENSSL_LH_get_down_load((OPENSSL_LHASH *)lh); \
253
    } \
254
    static ossl_unused ossl_inline void \
255
    lh_##type##_set_down_load(LHASH_OF(type) *lh, unsigned long dl) \
256
    { \
257
        OPENSSL_LH_set_down_load((OPENSSL_LHASH *)lh, dl); \
258
    } \
259
    static ossl_unused ossl_inline void \
260
    lh_##type##_doall(LHASH_OF(type) *lh, void (*doall)(type *)) \
261
    { \
262
        OPENSSL_LH_doall((OPENSSL_LHASH *)lh, (OPENSSL_LH_DOALL_FUNC)doall); \
263
    } \
264
    static ossl_unused ossl_inline void \
265
    lh_##type##_doall_arg(LHASH_OF(type) *lh, \
266
                          void (*doallarg)(type *, void *), void *arg) \
267
    { \
268
        OPENSSL_LH_doall_arg((OPENSSL_LHASH *)lh, \
269
                             (OPENSSL_LH_DOALL_FUNCARG)doallarg, arg); \
270
    } \
271
    LHASH_OF(type)
272
273
# define DEFINE_LHASH_OF(type) \
274
    DEFINE_LHASH_OF_EX(type); \
275
    DEFINE_LHASH_OF_DEPRECATED(type) \
276
    LHASH_OF(type)
277
278
#define IMPLEMENT_LHASH_DOALL_ARG_CONST(type, argtype) \
279
    int_implement_lhash_doall(type, argtype, const type)
280
281
#define IMPLEMENT_LHASH_DOALL_ARG(type, argtype) \
282
    int_implement_lhash_doall(type, argtype, type)
283
284
#define int_implement_lhash_doall(type, argtype, cbargtype) \
285
    static ossl_unused ossl_inline void \
286
        lh_##type##_doall_##argtype(LHASH_OF(type) *lh, \
287
                                   void (*fn)(cbargtype *, argtype *), \
288
                                   argtype *arg) \
289
    { \
290
        OPENSSL_LH_doall_arg((OPENSSL_LHASH *)lh, \
291
                             (OPENSSL_LH_DOALL_FUNCARG)fn, (void *)arg); \
292
    } \
293
    LHASH_OF(type)
294
295
DEFINE_LHASH_OF_INTERNAL(OPENSSL_STRING);
296
#define lh_OPENSSL_STRING_new(hfn, cmp) ((LHASH_OF(OPENSSL_STRING) *)OPENSSL_LH_new(ossl_check_OPENSSL_STRING_lh_hashfunc_type(hfn), ossl_check_OPENSSL_STRING_lh_compfunc_type(cmp)))
297
#define lh_OPENSSL_STRING_free(lh) OPENSSL_LH_free(ossl_check_OPENSSL_STRING_lh_type(lh))
298
#define lh_OPENSSL_STRING_flush(lh) OPENSSL_LH_flush(ossl_check_OPENSSL_STRING_lh_type(lh))
299
#define lh_OPENSSL_STRING_insert(lh, ptr) ((OPENSSL_STRING *)OPENSSL_LH_insert(ossl_check_OPENSSL_STRING_lh_type(lh), ossl_check_OPENSSL_STRING_lh_plain_type(ptr)))
300
#define lh_OPENSSL_STRING_delete(lh, ptr) ((OPENSSL_STRING *)OPENSSL_LH_delete(ossl_check_OPENSSL_STRING_lh_type(lh), ossl_check_const_OPENSSL_STRING_lh_plain_type(ptr)))
301
#define lh_OPENSSL_STRING_retrieve(lh, ptr) ((OPENSSL_STRING *)OPENSSL_LH_retrieve(ossl_check_OPENSSL_STRING_lh_type(lh), ossl_check_const_OPENSSL_STRING_lh_plain_type(ptr)))
302
#define lh_OPENSSL_STRING_error(lh) OPENSSL_LH_error(ossl_check_OPENSSL_STRING_lh_type(lh))
303
#define lh_OPENSSL_STRING_num_items(lh) OPENSSL_LH_num_items(ossl_check_OPENSSL_STRING_lh_type(lh))
304
#define lh_OPENSSL_STRING_node_stats_bio(lh, out) OPENSSL_LH_node_stats_bio(ossl_check_const_OPENSSL_STRING_lh_type(lh), out)
305
#define lh_OPENSSL_STRING_node_usage_stats_bio(lh, out) OPENSSL_LH_node_usage_stats_bio(ossl_check_const_OPENSSL_STRING_lh_type(lh), out)
306
#define lh_OPENSSL_STRING_stats_bio(lh, out) OPENSSL_LH_stats_bio(ossl_check_const_OPENSSL_STRING_lh_type(lh), out)
307
#define lh_OPENSSL_STRING_get_down_load(lh) OPENSSL_LH_get_down_load(ossl_check_OPENSSL_STRING_lh_type(lh))
308
#define lh_OPENSSL_STRING_set_down_load(lh, dl) OPENSSL_LH_set_down_load(ossl_check_OPENSSL_STRING_lh_type(lh), dl)
309
#define lh_OPENSSL_STRING_doall(lh, dfn) OPENSSL_LH_doall(ossl_check_OPENSSL_STRING_lh_type(lh), ossl_check_OPENSSL_STRING_lh_doallfunc_type(dfn))
310
DEFINE_LHASH_OF_INTERNAL(OPENSSL_CSTRING);
311
#define lh_OPENSSL_CSTRING_new(hfn, cmp) ((LHASH_OF(OPENSSL_CSTRING) *)OPENSSL_LH_new(ossl_check_OPENSSL_CSTRING_lh_hashfunc_type(hfn), ossl_check_OPENSSL_CSTRING_lh_compfunc_type(cmp)))
312
#define lh_OPENSSL_CSTRING_free(lh) OPENSSL_LH_free(ossl_check_OPENSSL_CSTRING_lh_type(lh))
313
#define lh_OPENSSL_CSTRING_flush(lh) OPENSSL_LH_flush(ossl_check_OPENSSL_CSTRING_lh_type(lh))
314
#define lh_OPENSSL_CSTRING_insert(lh, ptr) ((OPENSSL_CSTRING *)OPENSSL_LH_insert(ossl_check_OPENSSL_CSTRING_lh_type(lh), ossl_check_OPENSSL_CSTRING_lh_plain_type(ptr)))
315
#define lh_OPENSSL_CSTRING_delete(lh, ptr) ((OPENSSL_CSTRING *)OPENSSL_LH_delete(ossl_check_OPENSSL_CSTRING_lh_type(lh), ossl_check_const_OPENSSL_CSTRING_lh_plain_type(ptr)))
316
#define lh_OPENSSL_CSTRING_retrieve(lh, ptr) ((OPENSSL_CSTRING *)OPENSSL_LH_retrieve(ossl_check_OPENSSL_CSTRING_lh_type(lh), ossl_check_const_OPENSSL_CSTRING_lh_plain_type(ptr)))
317
#define lh_OPENSSL_CSTRING_error(lh) OPENSSL_LH_error(ossl_check_OPENSSL_CSTRING_lh_type(lh))
318
#define lh_OPENSSL_CSTRING_num_items(lh) OPENSSL_LH_num_items(ossl_check_OPENSSL_CSTRING_lh_type(lh))
319
#define lh_OPENSSL_CSTRING_node_stats_bio(lh, out) OPENSSL_LH_node_stats_bio(ossl_check_const_OPENSSL_CSTRING_lh_type(lh), out)
320
#define lh_OPENSSL_CSTRING_node_usage_stats_bio(lh, out) OPENSSL_LH_node_usage_stats_bio(ossl_check_const_OPENSSL_CSTRING_lh_type(lh), out)
321
#define lh_OPENSSL_CSTRING_stats_bio(lh, out) OPENSSL_LH_stats_bio(ossl_check_const_OPENSSL_CSTRING_lh_type(lh), out)
322
#define lh_OPENSSL_CSTRING_get_down_load(lh) OPENSSL_LH_get_down_load(ossl_check_OPENSSL_CSTRING_lh_type(lh))
323
#define lh_OPENSSL_CSTRING_set_down_load(lh, dl) OPENSSL_LH_set_down_load(ossl_check_OPENSSL_CSTRING_lh_type(lh), dl)
324
#define lh_OPENSSL_CSTRING_doall(lh, dfn) OPENSSL_LH_doall(ossl_check_OPENSSL_CSTRING_lh_type(lh), ossl_check_OPENSSL_CSTRING_lh_doallfunc_type(dfn))
325
326
327
#ifdef  __cplusplus
328
}
329
#endif
330
331
#endif