@annadata/capacitor-mqtt-quic 0.1.0 → 0.1.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/ios/include/nghttp3/nghttp3.h +3295 -0
- package/ios/include/nghttp3/version.h +46 -0
- package/ios/include/ngtcp2/ngtcp2.h +6254 -0
- package/ios/include/ngtcp2/ngtcp2_crypto.h +1037 -0
- package/ios/include/ngtcp2/ngtcp2_crypto_quictls.h +147 -0
- package/ios/include/ngtcp2/version.h +51 -0
- package/ios/include/openssl/aes.h +111 -0
- package/ios/include/openssl/asn1.h +1131 -0
- package/ios/include/openssl/asn1_mac.h +10 -0
- package/ios/include/openssl/asn1err.h +140 -0
- package/ios/include/openssl/asn1t.h +946 -0
- package/ios/include/openssl/async.h +96 -0
- package/ios/include/openssl/asyncerr.h +29 -0
- package/ios/include/openssl/bio.h +887 -0
- package/ios/include/openssl/bioerr.h +65 -0
- package/ios/include/openssl/blowfish.h +78 -0
- package/ios/include/openssl/bn.h +584 -0
- package/ios/include/openssl/bnerr.h +47 -0
- package/ios/include/openssl/buffer.h +62 -0
- package/ios/include/openssl/buffererr.h +25 -0
- package/ios/include/openssl/camellia.h +117 -0
- package/ios/include/openssl/cast.h +71 -0
- package/ios/include/openssl/cmac.h +52 -0
- package/ios/include/openssl/cmp.h +597 -0
- package/ios/include/openssl/cmp_util.h +56 -0
- package/ios/include/openssl/cmperr.h +116 -0
- package/ios/include/openssl/cms.h +493 -0
- package/ios/include/openssl/cmserr.h +124 -0
- package/ios/include/openssl/comp.h +59 -0
- package/ios/include/openssl/comperr.h +31 -0
- package/ios/include/openssl/conf.h +214 -0
- package/ios/include/openssl/conf_api.h +46 -0
- package/ios/include/openssl/conferr.h +52 -0
- package/ios/include/openssl/configuration.h +149 -0
- package/ios/include/openssl/conftypes.h +44 -0
- package/ios/include/openssl/core.h +233 -0
- package/ios/include/openssl/core_dispatch.h +960 -0
- package/ios/include/openssl/core_names.h +561 -0
- package/ios/include/openssl/core_object.h +41 -0
- package/ios/include/openssl/crmf.h +227 -0
- package/ios/include/openssl/crmferr.h +50 -0
- package/ios/include/openssl/crypto.h +558 -0
- package/ios/include/openssl/cryptoerr.h +55 -0
- package/ios/include/openssl/cryptoerr_legacy.h +1466 -0
- package/ios/include/openssl/ct.h +573 -0
- package/ios/include/openssl/cterr.h +45 -0
- package/ios/include/openssl/decoder.h +133 -0
- package/ios/include/openssl/decodererr.h +28 -0
- package/ios/include/openssl/des.h +211 -0
- package/ios/include/openssl/dh.h +335 -0
- package/ios/include/openssl/dherr.h +58 -0
- package/ios/include/openssl/dsa.h +280 -0
- package/ios/include/openssl/dsaerr.h +44 -0
- package/ios/include/openssl/dtls1.h +57 -0
- package/ios/include/openssl/e_os2.h +308 -0
- package/ios/include/openssl/ebcdic.h +39 -0
- package/ios/include/openssl/ec.h +1572 -0
- package/ios/include/openssl/ecdh.h +10 -0
- package/ios/include/openssl/ecdsa.h +10 -0
- package/ios/include/openssl/ecerr.h +104 -0
- package/ios/include/openssl/encoder.h +124 -0
- package/ios/include/openssl/encodererr.h +28 -0
- package/ios/include/openssl/engine.h +833 -0
- package/ios/include/openssl/engineerr.h +63 -0
- package/ios/include/openssl/err.h +504 -0
- package/ios/include/openssl/ess.h +128 -0
- package/ios/include/openssl/esserr.h +32 -0
- package/ios/include/openssl/evp.h +2175 -0
- package/ios/include/openssl/evperr.h +134 -0
- package/ios/include/openssl/fips_names.h +77 -0
- package/ios/include/openssl/fipskey.h +36 -0
- package/ios/include/openssl/hmac.h +62 -0
- package/ios/include/openssl/http.h +109 -0
- package/ios/include/openssl/httperr.h +55 -0
- package/ios/include/openssl/idea.h +82 -0
- package/ios/include/openssl/kdf.h +138 -0
- package/ios/include/openssl/kdferr.h +16 -0
- package/ios/include/openssl/lhash.h +331 -0
- package/ios/include/openssl/macros.h +325 -0
- package/ios/include/openssl/md2.h +56 -0
- package/ios/include/openssl/md4.h +63 -0
- package/ios/include/openssl/md5.h +62 -0
- package/ios/include/openssl/mdc2.h +55 -0
- package/ios/include/openssl/modes.h +219 -0
- package/ios/include/openssl/obj_mac.h +5481 -0
- package/ios/include/openssl/objects.h +183 -0
- package/ios/include/openssl/objectserr.h +28 -0
- package/ios/include/openssl/ocsp.h +483 -0
- package/ios/include/openssl/ocsperr.h +53 -0
- package/ios/include/openssl/opensslconf.h +17 -0
- package/ios/include/openssl/opensslv.h +114 -0
- package/ios/include/openssl/ossl_typ.h +16 -0
- package/ios/include/openssl/param_build.h +63 -0
- package/ios/include/openssl/params.h +160 -0
- package/ios/include/openssl/pem.h +541 -0
- package/ios/include/openssl/pem2.h +19 -0
- package/ios/include/openssl/pemerr.h +58 -0
- package/ios/include/openssl/pkcs12.h +353 -0
- package/ios/include/openssl/pkcs12err.h +45 -0
- package/ios/include/openssl/pkcs7.h +430 -0
- package/ios/include/openssl/pkcs7err.h +63 -0
- package/ios/include/openssl/prov_ssl.h +34 -0
- package/ios/include/openssl/proverr.h +149 -0
- package/ios/include/openssl/provider.h +60 -0
- package/ios/include/openssl/quic.h +19 -0
- package/ios/include/openssl/rand.h +125 -0
- package/ios/include/openssl/randerr.h +69 -0
- package/ios/include/openssl/rc2.h +68 -0
- package/ios/include/openssl/rc4.h +47 -0
- package/ios/include/openssl/rc5.h +79 -0
- package/ios/include/openssl/ripemd.h +59 -0
- package/ios/include/openssl/rsa.h +610 -0
- package/ios/include/openssl/rsaerr.h +107 -0
- package/ios/include/openssl/safestack.h +297 -0
- package/ios/include/openssl/seed.h +113 -0
- package/ios/include/openssl/self_test.h +94 -0
- package/ios/include/openssl/sha.h +138 -0
- package/ios/include/openssl/srp.h +285 -0
- package/ios/include/openssl/srtp.h +56 -0
- package/ios/include/openssl/ssl.h +2671 -0
- package/ios/include/openssl/ssl2.h +30 -0
- package/ios/include/openssl/ssl3.h +347 -0
- package/ios/include/openssl/sslerr.h +348 -0
- package/ios/include/openssl/sslerr_legacy.h +468 -0
- package/ios/include/openssl/stack.h +90 -0
- package/ios/include/openssl/store.h +369 -0
- package/ios/include/openssl/storeerr.h +49 -0
- package/ios/include/openssl/symhacks.h +39 -0
- package/ios/include/openssl/tls1.h +1186 -0
- package/ios/include/openssl/trace.h +312 -0
- package/ios/include/openssl/ts.h +505 -0
- package/ios/include/openssl/tserr.h +67 -0
- package/ios/include/openssl/txt_db.h +63 -0
- package/ios/include/openssl/types.h +239 -0
- package/ios/include/openssl/ui.h +407 -0
- package/ios/include/openssl/uierr.h +38 -0
- package/ios/include/openssl/whrlpool.h +62 -0
- package/ios/include/openssl/x509.h +1279 -0
- package/ios/include/openssl/x509_vfy.h +894 -0
- package/ios/include/openssl/x509err.h +69 -0
- package/ios/include/openssl/x509v3.h +1453 -0
- package/ios/include/openssl/x509v3err.h +93 -0
- package/ios/libs/libcrypto.a +0 -0
- package/ios/libs/libnghttp3.a +0 -0
- package/ios/libs/libngtcp2.a +0 -0
- package/ios/libs/libngtcp2_crypto_quictls.a +0 -0
- package/ios/libs/libssl.a +0 -0
- package/package.json +2 -2
|
@@ -0,0 +1,138 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Copyright 2016-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
|
+
#ifndef OPENSSL_KDF_H
|
|
11
|
+
# define OPENSSL_KDF_H
|
|
12
|
+
# pragma once
|
|
13
|
+
|
|
14
|
+
# include <openssl/macros.h>
|
|
15
|
+
# ifndef OPENSSL_NO_DEPRECATED_3_0
|
|
16
|
+
# define HEADER_KDF_H
|
|
17
|
+
# endif
|
|
18
|
+
|
|
19
|
+
# include <stdarg.h>
|
|
20
|
+
# include <stddef.h>
|
|
21
|
+
# include <openssl/types.h>
|
|
22
|
+
# include <openssl/core.h>
|
|
23
|
+
|
|
24
|
+
# ifdef __cplusplus
|
|
25
|
+
extern "C" {
|
|
26
|
+
# endif
|
|
27
|
+
|
|
28
|
+
int EVP_KDF_up_ref(EVP_KDF *kdf);
|
|
29
|
+
void EVP_KDF_free(EVP_KDF *kdf);
|
|
30
|
+
EVP_KDF *EVP_KDF_fetch(OSSL_LIB_CTX *libctx, const char *algorithm,
|
|
31
|
+
const char *properties);
|
|
32
|
+
|
|
33
|
+
EVP_KDF_CTX *EVP_KDF_CTX_new(EVP_KDF *kdf);
|
|
34
|
+
void EVP_KDF_CTX_free(EVP_KDF_CTX *ctx);
|
|
35
|
+
EVP_KDF_CTX *EVP_KDF_CTX_dup(const EVP_KDF_CTX *src);
|
|
36
|
+
const char *EVP_KDF_get0_description(const EVP_KDF *kdf);
|
|
37
|
+
int EVP_KDF_is_a(const EVP_KDF *kdf, const char *name);
|
|
38
|
+
const char *EVP_KDF_get0_name(const EVP_KDF *kdf);
|
|
39
|
+
const OSSL_PROVIDER *EVP_KDF_get0_provider(const EVP_KDF *kdf);
|
|
40
|
+
const EVP_KDF *EVP_KDF_CTX_kdf(EVP_KDF_CTX *ctx);
|
|
41
|
+
|
|
42
|
+
void EVP_KDF_CTX_reset(EVP_KDF_CTX *ctx);
|
|
43
|
+
size_t EVP_KDF_CTX_get_kdf_size(EVP_KDF_CTX *ctx);
|
|
44
|
+
int EVP_KDF_derive(EVP_KDF_CTX *ctx, unsigned char *key, size_t keylen,
|
|
45
|
+
const OSSL_PARAM params[]);
|
|
46
|
+
int EVP_KDF_get_params(EVP_KDF *kdf, OSSL_PARAM params[]);
|
|
47
|
+
int EVP_KDF_CTX_get_params(EVP_KDF_CTX *ctx, OSSL_PARAM params[]);
|
|
48
|
+
int EVP_KDF_CTX_set_params(EVP_KDF_CTX *ctx, const OSSL_PARAM params[]);
|
|
49
|
+
const OSSL_PARAM *EVP_KDF_gettable_params(const EVP_KDF *kdf);
|
|
50
|
+
const OSSL_PARAM *EVP_KDF_gettable_ctx_params(const EVP_KDF *kdf);
|
|
51
|
+
const OSSL_PARAM *EVP_KDF_settable_ctx_params(const EVP_KDF *kdf);
|
|
52
|
+
const OSSL_PARAM *EVP_KDF_CTX_gettable_params(EVP_KDF_CTX *ctx);
|
|
53
|
+
const OSSL_PARAM *EVP_KDF_CTX_settable_params(EVP_KDF_CTX *ctx);
|
|
54
|
+
|
|
55
|
+
void EVP_KDF_do_all_provided(OSSL_LIB_CTX *libctx,
|
|
56
|
+
void (*fn)(EVP_KDF *kdf, void *arg),
|
|
57
|
+
void *arg);
|
|
58
|
+
int EVP_KDF_names_do_all(const EVP_KDF *kdf,
|
|
59
|
+
void (*fn)(const char *name, void *data),
|
|
60
|
+
void *data);
|
|
61
|
+
|
|
62
|
+
# define EVP_KDF_HKDF_MODE_EXTRACT_AND_EXPAND 0
|
|
63
|
+
# define EVP_KDF_HKDF_MODE_EXTRACT_ONLY 1
|
|
64
|
+
# define EVP_KDF_HKDF_MODE_EXPAND_ONLY 2
|
|
65
|
+
|
|
66
|
+
#define EVP_KDF_SSHKDF_TYPE_INITIAL_IV_CLI_TO_SRV 65
|
|
67
|
+
#define EVP_KDF_SSHKDF_TYPE_INITIAL_IV_SRV_TO_CLI 66
|
|
68
|
+
#define EVP_KDF_SSHKDF_TYPE_ENCRYPTION_KEY_CLI_TO_SRV 67
|
|
69
|
+
#define EVP_KDF_SSHKDF_TYPE_ENCRYPTION_KEY_SRV_TO_CLI 68
|
|
70
|
+
#define EVP_KDF_SSHKDF_TYPE_INTEGRITY_KEY_CLI_TO_SRV 69
|
|
71
|
+
#define EVP_KDF_SSHKDF_TYPE_INTEGRITY_KEY_SRV_TO_CLI 70
|
|
72
|
+
|
|
73
|
+
/**** The legacy PKEY-based KDF API follows. ****/
|
|
74
|
+
|
|
75
|
+
# define EVP_PKEY_CTRL_TLS_MD (EVP_PKEY_ALG_CTRL)
|
|
76
|
+
# define EVP_PKEY_CTRL_TLS_SECRET (EVP_PKEY_ALG_CTRL + 1)
|
|
77
|
+
# define EVP_PKEY_CTRL_TLS_SEED (EVP_PKEY_ALG_CTRL + 2)
|
|
78
|
+
# define EVP_PKEY_CTRL_HKDF_MD (EVP_PKEY_ALG_CTRL + 3)
|
|
79
|
+
# define EVP_PKEY_CTRL_HKDF_SALT (EVP_PKEY_ALG_CTRL + 4)
|
|
80
|
+
# define EVP_PKEY_CTRL_HKDF_KEY (EVP_PKEY_ALG_CTRL + 5)
|
|
81
|
+
# define EVP_PKEY_CTRL_HKDF_INFO (EVP_PKEY_ALG_CTRL + 6)
|
|
82
|
+
# define EVP_PKEY_CTRL_HKDF_MODE (EVP_PKEY_ALG_CTRL + 7)
|
|
83
|
+
# define EVP_PKEY_CTRL_PASS (EVP_PKEY_ALG_CTRL + 8)
|
|
84
|
+
# define EVP_PKEY_CTRL_SCRYPT_SALT (EVP_PKEY_ALG_CTRL + 9)
|
|
85
|
+
# define EVP_PKEY_CTRL_SCRYPT_N (EVP_PKEY_ALG_CTRL + 10)
|
|
86
|
+
# define EVP_PKEY_CTRL_SCRYPT_R (EVP_PKEY_ALG_CTRL + 11)
|
|
87
|
+
# define EVP_PKEY_CTRL_SCRYPT_P (EVP_PKEY_ALG_CTRL + 12)
|
|
88
|
+
# define EVP_PKEY_CTRL_SCRYPT_MAXMEM_BYTES (EVP_PKEY_ALG_CTRL + 13)
|
|
89
|
+
|
|
90
|
+
# define EVP_PKEY_HKDEF_MODE_EXTRACT_AND_EXPAND \
|
|
91
|
+
EVP_KDF_HKDF_MODE_EXTRACT_AND_EXPAND
|
|
92
|
+
# define EVP_PKEY_HKDEF_MODE_EXTRACT_ONLY \
|
|
93
|
+
EVP_KDF_HKDF_MODE_EXTRACT_ONLY
|
|
94
|
+
# define EVP_PKEY_HKDEF_MODE_EXPAND_ONLY \
|
|
95
|
+
EVP_KDF_HKDF_MODE_EXPAND_ONLY
|
|
96
|
+
|
|
97
|
+
int EVP_PKEY_CTX_set_tls1_prf_md(EVP_PKEY_CTX *ctx, const EVP_MD *md);
|
|
98
|
+
|
|
99
|
+
int EVP_PKEY_CTX_set1_tls1_prf_secret(EVP_PKEY_CTX *pctx,
|
|
100
|
+
const unsigned char *sec, int seclen);
|
|
101
|
+
|
|
102
|
+
int EVP_PKEY_CTX_add1_tls1_prf_seed(EVP_PKEY_CTX *pctx,
|
|
103
|
+
const unsigned char *seed, int seedlen);
|
|
104
|
+
|
|
105
|
+
int EVP_PKEY_CTX_set_hkdf_md(EVP_PKEY_CTX *ctx, const EVP_MD *md);
|
|
106
|
+
|
|
107
|
+
int EVP_PKEY_CTX_set1_hkdf_salt(EVP_PKEY_CTX *ctx,
|
|
108
|
+
const unsigned char *salt, int saltlen);
|
|
109
|
+
|
|
110
|
+
int EVP_PKEY_CTX_set1_hkdf_key(EVP_PKEY_CTX *ctx,
|
|
111
|
+
const unsigned char *key, int keylen);
|
|
112
|
+
|
|
113
|
+
int EVP_PKEY_CTX_add1_hkdf_info(EVP_PKEY_CTX *ctx,
|
|
114
|
+
const unsigned char *info, int infolen);
|
|
115
|
+
|
|
116
|
+
int EVP_PKEY_CTX_set_hkdf_mode(EVP_PKEY_CTX *ctx, int mode);
|
|
117
|
+
# define EVP_PKEY_CTX_hkdf_mode EVP_PKEY_CTX_set_hkdf_mode
|
|
118
|
+
|
|
119
|
+
int EVP_PKEY_CTX_set1_pbe_pass(EVP_PKEY_CTX *ctx, const char *pass,
|
|
120
|
+
int passlen);
|
|
121
|
+
|
|
122
|
+
int EVP_PKEY_CTX_set1_scrypt_salt(EVP_PKEY_CTX *ctx,
|
|
123
|
+
const unsigned char *salt, int saltlen);
|
|
124
|
+
|
|
125
|
+
int EVP_PKEY_CTX_set_scrypt_N(EVP_PKEY_CTX *ctx, uint64_t n);
|
|
126
|
+
|
|
127
|
+
int EVP_PKEY_CTX_set_scrypt_r(EVP_PKEY_CTX *ctx, uint64_t r);
|
|
128
|
+
|
|
129
|
+
int EVP_PKEY_CTX_set_scrypt_p(EVP_PKEY_CTX *ctx, uint64_t p);
|
|
130
|
+
|
|
131
|
+
int EVP_PKEY_CTX_set_scrypt_maxmem_bytes(EVP_PKEY_CTX *ctx,
|
|
132
|
+
uint64_t maxmem_bytes);
|
|
133
|
+
|
|
134
|
+
|
|
135
|
+
# ifdef __cplusplus
|
|
136
|
+
}
|
|
137
|
+
# endif
|
|
138
|
+
#endif
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Copyright 2020-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
|
+
#ifndef OPENSSL_KDFERR_H
|
|
11
|
+
# define OPENSSL_KDFERR_H
|
|
12
|
+
# pragma once
|
|
13
|
+
|
|
14
|
+
#include <openssl/cryptoerr_legacy.h>
|
|
15
|
+
|
|
16
|
+
#endif /* !defined(OPENSSL_KDFERR_H) */
|
|
@@ -0,0 +1,331 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Copyright 1995-2022 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_1
|
|
99
|
+
OSSL_DEPRECATEDIN_3_1 void OPENSSL_LH_stats(const OPENSSL_LHASH *lh, FILE *fp);
|
|
100
|
+
OSSL_DEPRECATEDIN_3_1 void OPENSSL_LH_node_stats(const OPENSSL_LHASH *lh, FILE *fp);
|
|
101
|
+
OSSL_DEPRECATEDIN_3_1 void OPENSSL_LH_node_usage_stats(const OPENSSL_LHASH *lh, FILE *fp);
|
|
102
|
+
# endif
|
|
103
|
+
# endif
|
|
104
|
+
# ifndef OPENSSL_NO_DEPRECATED_3_1
|
|
105
|
+
OSSL_DEPRECATEDIN_3_1 void OPENSSL_LH_stats_bio(const OPENSSL_LHASH *lh, BIO *out);
|
|
106
|
+
OSSL_DEPRECATEDIN_3_1 void OPENSSL_LH_node_stats_bio(const OPENSSL_LHASH *lh, BIO *out);
|
|
107
|
+
OSSL_DEPRECATEDIN_3_1 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
|
+
{ \
|
|
148
|
+
return ptr; \
|
|
149
|
+
} \
|
|
150
|
+
static ossl_unused ossl_inline const type * \
|
|
151
|
+
ossl_check_const_##type##_lh_plain_type(const type *ptr) \
|
|
152
|
+
{ \
|
|
153
|
+
return ptr; \
|
|
154
|
+
} \
|
|
155
|
+
static ossl_unused ossl_inline const OPENSSL_LHASH * \
|
|
156
|
+
ossl_check_const_##type##_lh_type(const LHASH_OF(type) *lh) \
|
|
157
|
+
{ \
|
|
158
|
+
return (const OPENSSL_LHASH *)lh; \
|
|
159
|
+
} \
|
|
160
|
+
static ossl_unused ossl_inline OPENSSL_LHASH * \
|
|
161
|
+
ossl_check_##type##_lh_type(LHASH_OF(type) *lh) \
|
|
162
|
+
{ \
|
|
163
|
+
return (OPENSSL_LHASH *)lh; \
|
|
164
|
+
} \
|
|
165
|
+
static ossl_unused ossl_inline OPENSSL_LH_COMPFUNC \
|
|
166
|
+
ossl_check_##type##_lh_compfunc_type(lh_##type##_compfunc cmp) \
|
|
167
|
+
{ \
|
|
168
|
+
return (OPENSSL_LH_COMPFUNC)cmp; \
|
|
169
|
+
} \
|
|
170
|
+
static ossl_unused ossl_inline OPENSSL_LH_HASHFUNC \
|
|
171
|
+
ossl_check_##type##_lh_hashfunc_type(lh_##type##_hashfunc hfn) \
|
|
172
|
+
{ \
|
|
173
|
+
return (OPENSSL_LH_HASHFUNC)hfn; \
|
|
174
|
+
} \
|
|
175
|
+
static ossl_unused ossl_inline OPENSSL_LH_DOALL_FUNC \
|
|
176
|
+
ossl_check_##type##_lh_doallfunc_type(lh_##type##_doallfunc dfn) \
|
|
177
|
+
{ \
|
|
178
|
+
return (OPENSSL_LH_DOALL_FUNC)dfn; \
|
|
179
|
+
} \
|
|
180
|
+
LHASH_OF(type)
|
|
181
|
+
|
|
182
|
+
# ifndef OPENSSL_NO_DEPRECATED_3_1
|
|
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
|