node-linux-s390x 20.2.0 → 20.3.0
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/CHANGELOG.md +164 -1
- package/LICENSE +0 -11
- package/README.md +14 -10
- package/bin/node +0 -0
- package/include/node/config.gypi +1 -1
- package/include/node/js_native_api.h +6 -6
- package/include/node/js_native_api_types.h +2 -1
- package/include/node/node_api.h +2 -2
- package/include/node/node_version.h +2 -2
- package/include/node/openssl/archs/linux64-loongarch64/no-asm/crypto/buildinf.h +29 -0
- package/include/node/openssl/archs/linux64-loongarch64/no-asm/include/crypto/bn_conf.h +29 -0
- package/include/node/openssl/archs/linux64-loongarch64/no-asm/include/crypto/dso_conf.h +19 -0
- package/include/node/openssl/archs/linux64-loongarch64/no-asm/include/openssl/asn1.h +1128 -0
- package/include/node/openssl/archs/linux64-loongarch64/no-asm/include/openssl/asn1t.h +946 -0
- package/include/node/openssl/archs/linux64-loongarch64/no-asm/include/openssl/bio.h +887 -0
- package/include/node/openssl/archs/linux64-loongarch64/no-asm/include/openssl/cmp.h +596 -0
- package/include/node/openssl/archs/linux64-loongarch64/no-asm/include/openssl/cms.h +493 -0
- package/include/node/openssl/archs/linux64-loongarch64/no-asm/include/openssl/conf.h +211 -0
- package/include/node/openssl/archs/linux64-loongarch64/no-asm/include/openssl/configuration.h +137 -0
- package/include/node/openssl/archs/linux64-loongarch64/no-asm/include/openssl/crmf.h +227 -0
- package/include/node/openssl/archs/linux64-loongarch64/no-asm/include/openssl/crypto.h +558 -0
- package/include/node/openssl/archs/linux64-loongarch64/no-asm/include/openssl/ct.h +573 -0
- package/include/node/openssl/archs/linux64-loongarch64/no-asm/include/openssl/err.h +504 -0
- package/include/node/openssl/archs/linux64-loongarch64/no-asm/include/openssl/ess.h +128 -0
- package/include/node/openssl/archs/linux64-loongarch64/no-asm/include/openssl/fipskey.h +36 -0
- package/include/node/openssl/archs/linux64-loongarch64/no-asm/include/openssl/lhash.h +288 -0
- package/include/node/openssl/archs/linux64-loongarch64/no-asm/include/openssl/ocsp.h +483 -0
- package/include/node/openssl/archs/linux64-loongarch64/no-asm/include/openssl/opensslv.h +114 -0
- package/include/node/openssl/archs/linux64-loongarch64/no-asm/include/openssl/pkcs12.h +350 -0
- package/include/node/openssl/archs/linux64-loongarch64/no-asm/include/openssl/pkcs7.h +427 -0
- package/include/node/openssl/archs/linux64-loongarch64/no-asm/include/openssl/safestack.h +297 -0
- package/include/node/openssl/archs/linux64-loongarch64/no-asm/include/openssl/srp.h +285 -0
- package/include/node/openssl/archs/linux64-loongarch64/no-asm/include/openssl/ssl.h +2668 -0
- package/include/node/openssl/archs/linux64-loongarch64/no-asm/include/openssl/ui.h +407 -0
- package/include/node/openssl/archs/linux64-loongarch64/no-asm/include/openssl/x509.h +1276 -0
- package/include/node/openssl/archs/linux64-loongarch64/no-asm/include/openssl/x509_vfy.h +894 -0
- package/include/node/openssl/archs/linux64-loongarch64/no-asm/include/openssl/x509v3.h +1450 -0
- package/include/node/openssl/archs/linux64-loongarch64/no-asm/include/progs.h +123 -0
- package/include/node/openssl/archs/linux64-loongarch64/no-asm/providers/common/include/prov/der_digests.h +160 -0
- package/include/node/openssl/archs/linux64-loongarch64/no-asm/providers/common/include/prov/der_dsa.h +94 -0
- package/include/node/openssl/archs/linux64-loongarch64/no-asm/providers/common/include/prov/der_ec.h +286 -0
- package/include/node/openssl/archs/linux64-loongarch64/no-asm/providers/common/include/prov/der_ecx.h +50 -0
- package/include/node/openssl/archs/linux64-loongarch64/no-asm/providers/common/include/prov/der_rsa.h +187 -0
- package/include/node/openssl/archs/linux64-loongarch64/no-asm/providers/common/include/prov/der_sm2.h +37 -0
- package/include/node/openssl/archs/linux64-loongarch64/no-asm/providers/common/include/prov/der_wrap.h +46 -0
- package/include/node/uv/errno.h +12 -1
- package/include/node/uv/unix.h +0 -1
- package/include/node/uv/version.h +2 -2
- package/include/node/uv/win.h +18 -15
- package/include/node/uv.h +57 -16
- package/include/node/zconf.h +5 -1
- package/include/node/zlib.h +4 -4
- package/package.json +1 -1
- package/include/node/uv/stdint-msvc2008.h +0 -247
|
@@ -0,0 +1,297 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* WARNING: do not edit!
|
|
3
|
+
* Generated by Makefile from include/openssl/safestack.h.in
|
|
4
|
+
*
|
|
5
|
+
* Copyright 1999-2021 The OpenSSL Project Authors. All Rights Reserved.
|
|
6
|
+
*
|
|
7
|
+
* Licensed under the Apache License 2.0 (the "License"). You may not use
|
|
8
|
+
* this file except in compliance with the License. You can obtain a copy
|
|
9
|
+
* in the file LICENSE in the source distribution or at
|
|
10
|
+
* https://www.openssl.org/source/license.html
|
|
11
|
+
*/
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
|
|
15
|
+
#ifndef OPENSSL_SAFESTACK_H
|
|
16
|
+
# define OPENSSL_SAFESTACK_H
|
|
17
|
+
# pragma once
|
|
18
|
+
|
|
19
|
+
# include <openssl/macros.h>
|
|
20
|
+
# ifndef OPENSSL_NO_DEPRECATED_3_0
|
|
21
|
+
# define HEADER_SAFESTACK_H
|
|
22
|
+
# endif
|
|
23
|
+
|
|
24
|
+
# include <openssl/stack.h>
|
|
25
|
+
# include <openssl/e_os2.h>
|
|
26
|
+
|
|
27
|
+
#ifdef __cplusplus
|
|
28
|
+
extern "C" {
|
|
29
|
+
#endif
|
|
30
|
+
|
|
31
|
+
# define STACK_OF(type) struct stack_st_##type
|
|
32
|
+
|
|
33
|
+
/* Helper macro for internal use */
|
|
34
|
+
# define SKM_DEFINE_STACK_OF_INTERNAL(t1, t2, t3) \
|
|
35
|
+
STACK_OF(t1); \
|
|
36
|
+
typedef int (*sk_##t1##_compfunc)(const t3 * const *a, const t3 *const *b); \
|
|
37
|
+
typedef void (*sk_##t1##_freefunc)(t3 *a); \
|
|
38
|
+
typedef t3 * (*sk_##t1##_copyfunc)(const t3 *a); \
|
|
39
|
+
static ossl_unused ossl_inline t2 *ossl_check_##t1##_type(t2 *ptr) \
|
|
40
|
+
{ \
|
|
41
|
+
return ptr; \
|
|
42
|
+
} \
|
|
43
|
+
static ossl_unused ossl_inline const OPENSSL_STACK *ossl_check_const_##t1##_sk_type(const STACK_OF(t1) *sk) \
|
|
44
|
+
{ \
|
|
45
|
+
return (const OPENSSL_STACK *)sk; \
|
|
46
|
+
} \
|
|
47
|
+
static ossl_unused ossl_inline OPENSSL_STACK *ossl_check_##t1##_sk_type(STACK_OF(t1) *sk) \
|
|
48
|
+
{ \
|
|
49
|
+
return (OPENSSL_STACK *)sk; \
|
|
50
|
+
} \
|
|
51
|
+
static ossl_unused ossl_inline OPENSSL_sk_compfunc ossl_check_##t1##_compfunc_type(sk_##t1##_compfunc cmp) \
|
|
52
|
+
{ \
|
|
53
|
+
return (OPENSSL_sk_compfunc)cmp; \
|
|
54
|
+
} \
|
|
55
|
+
static ossl_unused ossl_inline OPENSSL_sk_copyfunc ossl_check_##t1##_copyfunc_type(sk_##t1##_copyfunc cpy) \
|
|
56
|
+
{ \
|
|
57
|
+
return (OPENSSL_sk_copyfunc)cpy; \
|
|
58
|
+
} \
|
|
59
|
+
static ossl_unused ossl_inline OPENSSL_sk_freefunc ossl_check_##t1##_freefunc_type(sk_##t1##_freefunc fr) \
|
|
60
|
+
{ \
|
|
61
|
+
return (OPENSSL_sk_freefunc)fr; \
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
# define SKM_DEFINE_STACK_OF(t1, t2, t3) \
|
|
65
|
+
STACK_OF(t1); \
|
|
66
|
+
typedef int (*sk_##t1##_compfunc)(const t3 * const *a, const t3 *const *b); \
|
|
67
|
+
typedef void (*sk_##t1##_freefunc)(t3 *a); \
|
|
68
|
+
typedef t3 * (*sk_##t1##_copyfunc)(const t3 *a); \
|
|
69
|
+
static ossl_unused ossl_inline int sk_##t1##_num(const STACK_OF(t1) *sk) \
|
|
70
|
+
{ \
|
|
71
|
+
return OPENSSL_sk_num((const OPENSSL_STACK *)sk); \
|
|
72
|
+
} \
|
|
73
|
+
static ossl_unused ossl_inline t2 *sk_##t1##_value(const STACK_OF(t1) *sk, int idx) \
|
|
74
|
+
{ \
|
|
75
|
+
return (t2 *)OPENSSL_sk_value((const OPENSSL_STACK *)sk, idx); \
|
|
76
|
+
} \
|
|
77
|
+
static ossl_unused ossl_inline STACK_OF(t1) *sk_##t1##_new(sk_##t1##_compfunc compare) \
|
|
78
|
+
{ \
|
|
79
|
+
return (STACK_OF(t1) *)OPENSSL_sk_new((OPENSSL_sk_compfunc)compare); \
|
|
80
|
+
} \
|
|
81
|
+
static ossl_unused ossl_inline STACK_OF(t1) *sk_##t1##_new_null(void) \
|
|
82
|
+
{ \
|
|
83
|
+
return (STACK_OF(t1) *)OPENSSL_sk_new_null(); \
|
|
84
|
+
} \
|
|
85
|
+
static ossl_unused ossl_inline STACK_OF(t1) *sk_##t1##_new_reserve(sk_##t1##_compfunc compare, int n) \
|
|
86
|
+
{ \
|
|
87
|
+
return (STACK_OF(t1) *)OPENSSL_sk_new_reserve((OPENSSL_sk_compfunc)compare, n); \
|
|
88
|
+
} \
|
|
89
|
+
static ossl_unused ossl_inline int sk_##t1##_reserve(STACK_OF(t1) *sk, int n) \
|
|
90
|
+
{ \
|
|
91
|
+
return OPENSSL_sk_reserve((OPENSSL_STACK *)sk, n); \
|
|
92
|
+
} \
|
|
93
|
+
static ossl_unused ossl_inline void sk_##t1##_free(STACK_OF(t1) *sk) \
|
|
94
|
+
{ \
|
|
95
|
+
OPENSSL_sk_free((OPENSSL_STACK *)sk); \
|
|
96
|
+
} \
|
|
97
|
+
static ossl_unused ossl_inline void sk_##t1##_zero(STACK_OF(t1) *sk) \
|
|
98
|
+
{ \
|
|
99
|
+
OPENSSL_sk_zero((OPENSSL_STACK *)sk); \
|
|
100
|
+
} \
|
|
101
|
+
static ossl_unused ossl_inline t2 *sk_##t1##_delete(STACK_OF(t1) *sk, int i) \
|
|
102
|
+
{ \
|
|
103
|
+
return (t2 *)OPENSSL_sk_delete((OPENSSL_STACK *)sk, i); \
|
|
104
|
+
} \
|
|
105
|
+
static ossl_unused ossl_inline t2 *sk_##t1##_delete_ptr(STACK_OF(t1) *sk, t2 *ptr) \
|
|
106
|
+
{ \
|
|
107
|
+
return (t2 *)OPENSSL_sk_delete_ptr((OPENSSL_STACK *)sk, \
|
|
108
|
+
(const void *)ptr); \
|
|
109
|
+
} \
|
|
110
|
+
static ossl_unused ossl_inline int sk_##t1##_push(STACK_OF(t1) *sk, t2 *ptr) \
|
|
111
|
+
{ \
|
|
112
|
+
return OPENSSL_sk_push((OPENSSL_STACK *)sk, (const void *)ptr); \
|
|
113
|
+
} \
|
|
114
|
+
static ossl_unused ossl_inline int sk_##t1##_unshift(STACK_OF(t1) *sk, t2 *ptr) \
|
|
115
|
+
{ \
|
|
116
|
+
return OPENSSL_sk_unshift((OPENSSL_STACK *)sk, (const void *)ptr); \
|
|
117
|
+
} \
|
|
118
|
+
static ossl_unused ossl_inline t2 *sk_##t1##_pop(STACK_OF(t1) *sk) \
|
|
119
|
+
{ \
|
|
120
|
+
return (t2 *)OPENSSL_sk_pop((OPENSSL_STACK *)sk); \
|
|
121
|
+
} \
|
|
122
|
+
static ossl_unused ossl_inline t2 *sk_##t1##_shift(STACK_OF(t1) *sk) \
|
|
123
|
+
{ \
|
|
124
|
+
return (t2 *)OPENSSL_sk_shift((OPENSSL_STACK *)sk); \
|
|
125
|
+
} \
|
|
126
|
+
static ossl_unused ossl_inline void sk_##t1##_pop_free(STACK_OF(t1) *sk, sk_##t1##_freefunc freefunc) \
|
|
127
|
+
{ \
|
|
128
|
+
OPENSSL_sk_pop_free((OPENSSL_STACK *)sk, (OPENSSL_sk_freefunc)freefunc); \
|
|
129
|
+
} \
|
|
130
|
+
static ossl_unused ossl_inline int sk_##t1##_insert(STACK_OF(t1) *sk, t2 *ptr, int idx) \
|
|
131
|
+
{ \
|
|
132
|
+
return OPENSSL_sk_insert((OPENSSL_STACK *)sk, (const void *)ptr, idx); \
|
|
133
|
+
} \
|
|
134
|
+
static ossl_unused ossl_inline t2 *sk_##t1##_set(STACK_OF(t1) *sk, int idx, t2 *ptr) \
|
|
135
|
+
{ \
|
|
136
|
+
return (t2 *)OPENSSL_sk_set((OPENSSL_STACK *)sk, idx, (const void *)ptr); \
|
|
137
|
+
} \
|
|
138
|
+
static ossl_unused ossl_inline int sk_##t1##_find(STACK_OF(t1) *sk, t2 *ptr) \
|
|
139
|
+
{ \
|
|
140
|
+
return OPENSSL_sk_find((OPENSSL_STACK *)sk, (const void *)ptr); \
|
|
141
|
+
} \
|
|
142
|
+
static ossl_unused ossl_inline int sk_##t1##_find_ex(STACK_OF(t1) *sk, t2 *ptr) \
|
|
143
|
+
{ \
|
|
144
|
+
return OPENSSL_sk_find_ex((OPENSSL_STACK *)sk, (const void *)ptr); \
|
|
145
|
+
} \
|
|
146
|
+
static ossl_unused ossl_inline int sk_##t1##_find_all(STACK_OF(t1) *sk, t2 *ptr, int *pnum) \
|
|
147
|
+
{ \
|
|
148
|
+
return OPENSSL_sk_find_all((OPENSSL_STACK *)sk, (const void *)ptr, pnum); \
|
|
149
|
+
} \
|
|
150
|
+
static ossl_unused ossl_inline void sk_##t1##_sort(STACK_OF(t1) *sk) \
|
|
151
|
+
{ \
|
|
152
|
+
OPENSSL_sk_sort((OPENSSL_STACK *)sk); \
|
|
153
|
+
} \
|
|
154
|
+
static ossl_unused ossl_inline int sk_##t1##_is_sorted(const STACK_OF(t1) *sk) \
|
|
155
|
+
{ \
|
|
156
|
+
return OPENSSL_sk_is_sorted((const OPENSSL_STACK *)sk); \
|
|
157
|
+
} \
|
|
158
|
+
static ossl_unused ossl_inline STACK_OF(t1) * sk_##t1##_dup(const STACK_OF(t1) *sk) \
|
|
159
|
+
{ \
|
|
160
|
+
return (STACK_OF(t1) *)OPENSSL_sk_dup((const OPENSSL_STACK *)sk); \
|
|
161
|
+
} \
|
|
162
|
+
static ossl_unused ossl_inline STACK_OF(t1) *sk_##t1##_deep_copy(const STACK_OF(t1) *sk, \
|
|
163
|
+
sk_##t1##_copyfunc copyfunc, \
|
|
164
|
+
sk_##t1##_freefunc freefunc) \
|
|
165
|
+
{ \
|
|
166
|
+
return (STACK_OF(t1) *)OPENSSL_sk_deep_copy((const OPENSSL_STACK *)sk, \
|
|
167
|
+
(OPENSSL_sk_copyfunc)copyfunc, \
|
|
168
|
+
(OPENSSL_sk_freefunc)freefunc); \
|
|
169
|
+
} \
|
|
170
|
+
static ossl_unused ossl_inline sk_##t1##_compfunc sk_##t1##_set_cmp_func(STACK_OF(t1) *sk, sk_##t1##_compfunc compare) \
|
|
171
|
+
{ \
|
|
172
|
+
return (sk_##t1##_compfunc)OPENSSL_sk_set_cmp_func((OPENSSL_STACK *)sk, (OPENSSL_sk_compfunc)compare); \
|
|
173
|
+
}
|
|
174
|
+
|
|
175
|
+
# define DEFINE_STACK_OF(t) SKM_DEFINE_STACK_OF(t, t, t)
|
|
176
|
+
# define DEFINE_STACK_OF_CONST(t) SKM_DEFINE_STACK_OF(t, const t, t)
|
|
177
|
+
# define DEFINE_SPECIAL_STACK_OF(t1, t2) SKM_DEFINE_STACK_OF(t1, t2, t2)
|
|
178
|
+
# define DEFINE_SPECIAL_STACK_OF_CONST(t1, t2) \
|
|
179
|
+
SKM_DEFINE_STACK_OF(t1, const t2, t2)
|
|
180
|
+
|
|
181
|
+
/*-
|
|
182
|
+
* Strings are special: normally an lhash entry will point to a single
|
|
183
|
+
* (somewhat) mutable object. In the case of strings:
|
|
184
|
+
*
|
|
185
|
+
* a) Instead of a single char, there is an array of chars, NUL-terminated.
|
|
186
|
+
* b) The string may have be immutable.
|
|
187
|
+
*
|
|
188
|
+
* So, they need their own declarations. Especially important for
|
|
189
|
+
* type-checking tools, such as Deputy.
|
|
190
|
+
*
|
|
191
|
+
* In practice, however, it appears to be hard to have a const
|
|
192
|
+
* string. For now, I'm settling for dealing with the fact it is a
|
|
193
|
+
* string at all.
|
|
194
|
+
*/
|
|
195
|
+
typedef char *OPENSSL_STRING;
|
|
196
|
+
typedef const char *OPENSSL_CSTRING;
|
|
197
|
+
|
|
198
|
+
/*-
|
|
199
|
+
* Confusingly, LHASH_OF(STRING) deals with char ** throughout, but
|
|
200
|
+
* STACK_OF(STRING) is really more like STACK_OF(char), only, as mentioned
|
|
201
|
+
* above, instead of a single char each entry is a NUL-terminated array of
|
|
202
|
+
* chars. So, we have to implement STRING specially for STACK_OF. This is
|
|
203
|
+
* dealt with in the autogenerated macros below.
|
|
204
|
+
*/
|
|
205
|
+
SKM_DEFINE_STACK_OF_INTERNAL(OPENSSL_STRING, char, char)
|
|
206
|
+
#define sk_OPENSSL_STRING_num(sk) OPENSSL_sk_num(ossl_check_const_OPENSSL_STRING_sk_type(sk))
|
|
207
|
+
#define sk_OPENSSL_STRING_value(sk, idx) ((char *)OPENSSL_sk_value(ossl_check_const_OPENSSL_STRING_sk_type(sk), (idx)))
|
|
208
|
+
#define sk_OPENSSL_STRING_new(cmp) ((STACK_OF(OPENSSL_STRING) *)OPENSSL_sk_new(ossl_check_OPENSSL_STRING_compfunc_type(cmp)))
|
|
209
|
+
#define sk_OPENSSL_STRING_new_null() ((STACK_OF(OPENSSL_STRING) *)OPENSSL_sk_new_null())
|
|
210
|
+
#define sk_OPENSSL_STRING_new_reserve(cmp, n) ((STACK_OF(OPENSSL_STRING) *)OPENSSL_sk_new_reserve(ossl_check_OPENSSL_STRING_compfunc_type(cmp), (n)))
|
|
211
|
+
#define sk_OPENSSL_STRING_reserve(sk, n) OPENSSL_sk_reserve(ossl_check_OPENSSL_STRING_sk_type(sk), (n))
|
|
212
|
+
#define sk_OPENSSL_STRING_free(sk) OPENSSL_sk_free(ossl_check_OPENSSL_STRING_sk_type(sk))
|
|
213
|
+
#define sk_OPENSSL_STRING_zero(sk) OPENSSL_sk_zero(ossl_check_OPENSSL_STRING_sk_type(sk))
|
|
214
|
+
#define sk_OPENSSL_STRING_delete(sk, i) ((char *)OPENSSL_sk_delete(ossl_check_OPENSSL_STRING_sk_type(sk), (i)))
|
|
215
|
+
#define sk_OPENSSL_STRING_delete_ptr(sk, ptr) ((char *)OPENSSL_sk_delete_ptr(ossl_check_OPENSSL_STRING_sk_type(sk), ossl_check_OPENSSL_STRING_type(ptr)))
|
|
216
|
+
#define sk_OPENSSL_STRING_push(sk, ptr) OPENSSL_sk_push(ossl_check_OPENSSL_STRING_sk_type(sk), ossl_check_OPENSSL_STRING_type(ptr))
|
|
217
|
+
#define sk_OPENSSL_STRING_unshift(sk, ptr) OPENSSL_sk_unshift(ossl_check_OPENSSL_STRING_sk_type(sk), ossl_check_OPENSSL_STRING_type(ptr))
|
|
218
|
+
#define sk_OPENSSL_STRING_pop(sk) ((char *)OPENSSL_sk_pop(ossl_check_OPENSSL_STRING_sk_type(sk)))
|
|
219
|
+
#define sk_OPENSSL_STRING_shift(sk) ((char *)OPENSSL_sk_shift(ossl_check_OPENSSL_STRING_sk_type(sk)))
|
|
220
|
+
#define sk_OPENSSL_STRING_pop_free(sk, freefunc) OPENSSL_sk_pop_free(ossl_check_OPENSSL_STRING_sk_type(sk),ossl_check_OPENSSL_STRING_freefunc_type(freefunc))
|
|
221
|
+
#define sk_OPENSSL_STRING_insert(sk, ptr, idx) OPENSSL_sk_insert(ossl_check_OPENSSL_STRING_sk_type(sk), ossl_check_OPENSSL_STRING_type(ptr), (idx))
|
|
222
|
+
#define sk_OPENSSL_STRING_set(sk, idx, ptr) ((char *)OPENSSL_sk_set(ossl_check_OPENSSL_STRING_sk_type(sk), (idx), ossl_check_OPENSSL_STRING_type(ptr)))
|
|
223
|
+
#define sk_OPENSSL_STRING_find(sk, ptr) OPENSSL_sk_find(ossl_check_OPENSSL_STRING_sk_type(sk), ossl_check_OPENSSL_STRING_type(ptr))
|
|
224
|
+
#define sk_OPENSSL_STRING_find_ex(sk, ptr) OPENSSL_sk_find_ex(ossl_check_OPENSSL_STRING_sk_type(sk), ossl_check_OPENSSL_STRING_type(ptr))
|
|
225
|
+
#define sk_OPENSSL_STRING_find_all(sk, ptr, pnum) OPENSSL_sk_find_all(ossl_check_OPENSSL_STRING_sk_type(sk), ossl_check_OPENSSL_STRING_type(ptr), pnum)
|
|
226
|
+
#define sk_OPENSSL_STRING_sort(sk) OPENSSL_sk_sort(ossl_check_OPENSSL_STRING_sk_type(sk))
|
|
227
|
+
#define sk_OPENSSL_STRING_is_sorted(sk) OPENSSL_sk_is_sorted(ossl_check_const_OPENSSL_STRING_sk_type(sk))
|
|
228
|
+
#define sk_OPENSSL_STRING_dup(sk) ((STACK_OF(OPENSSL_STRING) *)OPENSSL_sk_dup(ossl_check_const_OPENSSL_STRING_sk_type(sk)))
|
|
229
|
+
#define sk_OPENSSL_STRING_deep_copy(sk, copyfunc, freefunc) ((STACK_OF(OPENSSL_STRING) *)OPENSSL_sk_deep_copy(ossl_check_const_OPENSSL_STRING_sk_type(sk), ossl_check_OPENSSL_STRING_copyfunc_type(copyfunc), ossl_check_OPENSSL_STRING_freefunc_type(freefunc)))
|
|
230
|
+
#define sk_OPENSSL_STRING_set_cmp_func(sk, cmp) ((sk_OPENSSL_STRING_compfunc)OPENSSL_sk_set_cmp_func(ossl_check_OPENSSL_STRING_sk_type(sk), ossl_check_OPENSSL_STRING_compfunc_type(cmp)))
|
|
231
|
+
SKM_DEFINE_STACK_OF_INTERNAL(OPENSSL_CSTRING, const char, char)
|
|
232
|
+
#define sk_OPENSSL_CSTRING_num(sk) OPENSSL_sk_num(ossl_check_const_OPENSSL_CSTRING_sk_type(sk))
|
|
233
|
+
#define sk_OPENSSL_CSTRING_value(sk, idx) ((const char *)OPENSSL_sk_value(ossl_check_const_OPENSSL_CSTRING_sk_type(sk), (idx)))
|
|
234
|
+
#define sk_OPENSSL_CSTRING_new(cmp) ((STACK_OF(OPENSSL_CSTRING) *)OPENSSL_sk_new(ossl_check_OPENSSL_CSTRING_compfunc_type(cmp)))
|
|
235
|
+
#define sk_OPENSSL_CSTRING_new_null() ((STACK_OF(OPENSSL_CSTRING) *)OPENSSL_sk_new_null())
|
|
236
|
+
#define sk_OPENSSL_CSTRING_new_reserve(cmp, n) ((STACK_OF(OPENSSL_CSTRING) *)OPENSSL_sk_new_reserve(ossl_check_OPENSSL_CSTRING_compfunc_type(cmp), (n)))
|
|
237
|
+
#define sk_OPENSSL_CSTRING_reserve(sk, n) OPENSSL_sk_reserve(ossl_check_OPENSSL_CSTRING_sk_type(sk), (n))
|
|
238
|
+
#define sk_OPENSSL_CSTRING_free(sk) OPENSSL_sk_free(ossl_check_OPENSSL_CSTRING_sk_type(sk))
|
|
239
|
+
#define sk_OPENSSL_CSTRING_zero(sk) OPENSSL_sk_zero(ossl_check_OPENSSL_CSTRING_sk_type(sk))
|
|
240
|
+
#define sk_OPENSSL_CSTRING_delete(sk, i) ((const char *)OPENSSL_sk_delete(ossl_check_OPENSSL_CSTRING_sk_type(sk), (i)))
|
|
241
|
+
#define sk_OPENSSL_CSTRING_delete_ptr(sk, ptr) ((const char *)OPENSSL_sk_delete_ptr(ossl_check_OPENSSL_CSTRING_sk_type(sk), ossl_check_OPENSSL_CSTRING_type(ptr)))
|
|
242
|
+
#define sk_OPENSSL_CSTRING_push(sk, ptr) OPENSSL_sk_push(ossl_check_OPENSSL_CSTRING_sk_type(sk), ossl_check_OPENSSL_CSTRING_type(ptr))
|
|
243
|
+
#define sk_OPENSSL_CSTRING_unshift(sk, ptr) OPENSSL_sk_unshift(ossl_check_OPENSSL_CSTRING_sk_type(sk), ossl_check_OPENSSL_CSTRING_type(ptr))
|
|
244
|
+
#define sk_OPENSSL_CSTRING_pop(sk) ((const char *)OPENSSL_sk_pop(ossl_check_OPENSSL_CSTRING_sk_type(sk)))
|
|
245
|
+
#define sk_OPENSSL_CSTRING_shift(sk) ((const char *)OPENSSL_sk_shift(ossl_check_OPENSSL_CSTRING_sk_type(sk)))
|
|
246
|
+
#define sk_OPENSSL_CSTRING_pop_free(sk, freefunc) OPENSSL_sk_pop_free(ossl_check_OPENSSL_CSTRING_sk_type(sk),ossl_check_OPENSSL_CSTRING_freefunc_type(freefunc))
|
|
247
|
+
#define sk_OPENSSL_CSTRING_insert(sk, ptr, idx) OPENSSL_sk_insert(ossl_check_OPENSSL_CSTRING_sk_type(sk), ossl_check_OPENSSL_CSTRING_type(ptr), (idx))
|
|
248
|
+
#define sk_OPENSSL_CSTRING_set(sk, idx, ptr) ((const char *)OPENSSL_sk_set(ossl_check_OPENSSL_CSTRING_sk_type(sk), (idx), ossl_check_OPENSSL_CSTRING_type(ptr)))
|
|
249
|
+
#define sk_OPENSSL_CSTRING_find(sk, ptr) OPENSSL_sk_find(ossl_check_OPENSSL_CSTRING_sk_type(sk), ossl_check_OPENSSL_CSTRING_type(ptr))
|
|
250
|
+
#define sk_OPENSSL_CSTRING_find_ex(sk, ptr) OPENSSL_sk_find_ex(ossl_check_OPENSSL_CSTRING_sk_type(sk), ossl_check_OPENSSL_CSTRING_type(ptr))
|
|
251
|
+
#define sk_OPENSSL_CSTRING_find_all(sk, ptr, pnum) OPENSSL_sk_find_all(ossl_check_OPENSSL_CSTRING_sk_type(sk), ossl_check_OPENSSL_CSTRING_type(ptr), pnum)
|
|
252
|
+
#define sk_OPENSSL_CSTRING_sort(sk) OPENSSL_sk_sort(ossl_check_OPENSSL_CSTRING_sk_type(sk))
|
|
253
|
+
#define sk_OPENSSL_CSTRING_is_sorted(sk) OPENSSL_sk_is_sorted(ossl_check_const_OPENSSL_CSTRING_sk_type(sk))
|
|
254
|
+
#define sk_OPENSSL_CSTRING_dup(sk) ((STACK_OF(OPENSSL_CSTRING) *)OPENSSL_sk_dup(ossl_check_const_OPENSSL_CSTRING_sk_type(sk)))
|
|
255
|
+
#define sk_OPENSSL_CSTRING_deep_copy(sk, copyfunc, freefunc) ((STACK_OF(OPENSSL_CSTRING) *)OPENSSL_sk_deep_copy(ossl_check_const_OPENSSL_CSTRING_sk_type(sk), ossl_check_OPENSSL_CSTRING_copyfunc_type(copyfunc), ossl_check_OPENSSL_CSTRING_freefunc_type(freefunc)))
|
|
256
|
+
#define sk_OPENSSL_CSTRING_set_cmp_func(sk, cmp) ((sk_OPENSSL_CSTRING_compfunc)OPENSSL_sk_set_cmp_func(ossl_check_OPENSSL_CSTRING_sk_type(sk), ossl_check_OPENSSL_CSTRING_compfunc_type(cmp)))
|
|
257
|
+
|
|
258
|
+
|
|
259
|
+
#if !defined(OPENSSL_NO_DEPRECATED_3_0)
|
|
260
|
+
/*
|
|
261
|
+
* This is not used by OpenSSL. A block of bytes, NOT nul-terminated.
|
|
262
|
+
* These should also be distinguished from "normal" stacks.
|
|
263
|
+
*/
|
|
264
|
+
typedef void *OPENSSL_BLOCK;
|
|
265
|
+
SKM_DEFINE_STACK_OF_INTERNAL(OPENSSL_BLOCK, void, void)
|
|
266
|
+
#define sk_OPENSSL_BLOCK_num(sk) OPENSSL_sk_num(ossl_check_const_OPENSSL_BLOCK_sk_type(sk))
|
|
267
|
+
#define sk_OPENSSL_BLOCK_value(sk, idx) ((void *)OPENSSL_sk_value(ossl_check_const_OPENSSL_BLOCK_sk_type(sk), (idx)))
|
|
268
|
+
#define sk_OPENSSL_BLOCK_new(cmp) ((STACK_OF(OPENSSL_BLOCK) *)OPENSSL_sk_new(ossl_check_OPENSSL_BLOCK_compfunc_type(cmp)))
|
|
269
|
+
#define sk_OPENSSL_BLOCK_new_null() ((STACK_OF(OPENSSL_BLOCK) *)OPENSSL_sk_new_null())
|
|
270
|
+
#define sk_OPENSSL_BLOCK_new_reserve(cmp, n) ((STACK_OF(OPENSSL_BLOCK) *)OPENSSL_sk_new_reserve(ossl_check_OPENSSL_BLOCK_compfunc_type(cmp), (n)))
|
|
271
|
+
#define sk_OPENSSL_BLOCK_reserve(sk, n) OPENSSL_sk_reserve(ossl_check_OPENSSL_BLOCK_sk_type(sk), (n))
|
|
272
|
+
#define sk_OPENSSL_BLOCK_free(sk) OPENSSL_sk_free(ossl_check_OPENSSL_BLOCK_sk_type(sk))
|
|
273
|
+
#define sk_OPENSSL_BLOCK_zero(sk) OPENSSL_sk_zero(ossl_check_OPENSSL_BLOCK_sk_type(sk))
|
|
274
|
+
#define sk_OPENSSL_BLOCK_delete(sk, i) ((void *)OPENSSL_sk_delete(ossl_check_OPENSSL_BLOCK_sk_type(sk), (i)))
|
|
275
|
+
#define sk_OPENSSL_BLOCK_delete_ptr(sk, ptr) ((void *)OPENSSL_sk_delete_ptr(ossl_check_OPENSSL_BLOCK_sk_type(sk), ossl_check_OPENSSL_BLOCK_type(ptr)))
|
|
276
|
+
#define sk_OPENSSL_BLOCK_push(sk, ptr) OPENSSL_sk_push(ossl_check_OPENSSL_BLOCK_sk_type(sk), ossl_check_OPENSSL_BLOCK_type(ptr))
|
|
277
|
+
#define sk_OPENSSL_BLOCK_unshift(sk, ptr) OPENSSL_sk_unshift(ossl_check_OPENSSL_BLOCK_sk_type(sk), ossl_check_OPENSSL_BLOCK_type(ptr))
|
|
278
|
+
#define sk_OPENSSL_BLOCK_pop(sk) ((void *)OPENSSL_sk_pop(ossl_check_OPENSSL_BLOCK_sk_type(sk)))
|
|
279
|
+
#define sk_OPENSSL_BLOCK_shift(sk) ((void *)OPENSSL_sk_shift(ossl_check_OPENSSL_BLOCK_sk_type(sk)))
|
|
280
|
+
#define sk_OPENSSL_BLOCK_pop_free(sk, freefunc) OPENSSL_sk_pop_free(ossl_check_OPENSSL_BLOCK_sk_type(sk),ossl_check_OPENSSL_BLOCK_freefunc_type(freefunc))
|
|
281
|
+
#define sk_OPENSSL_BLOCK_insert(sk, ptr, idx) OPENSSL_sk_insert(ossl_check_OPENSSL_BLOCK_sk_type(sk), ossl_check_OPENSSL_BLOCK_type(ptr), (idx))
|
|
282
|
+
#define sk_OPENSSL_BLOCK_set(sk, idx, ptr) ((void *)OPENSSL_sk_set(ossl_check_OPENSSL_BLOCK_sk_type(sk), (idx), ossl_check_OPENSSL_BLOCK_type(ptr)))
|
|
283
|
+
#define sk_OPENSSL_BLOCK_find(sk, ptr) OPENSSL_sk_find(ossl_check_OPENSSL_BLOCK_sk_type(sk), ossl_check_OPENSSL_BLOCK_type(ptr))
|
|
284
|
+
#define sk_OPENSSL_BLOCK_find_ex(sk, ptr) OPENSSL_sk_find_ex(ossl_check_OPENSSL_BLOCK_sk_type(sk), ossl_check_OPENSSL_BLOCK_type(ptr))
|
|
285
|
+
#define sk_OPENSSL_BLOCK_find_all(sk, ptr, pnum) OPENSSL_sk_find_all(ossl_check_OPENSSL_BLOCK_sk_type(sk), ossl_check_OPENSSL_BLOCK_type(ptr), pnum)
|
|
286
|
+
#define sk_OPENSSL_BLOCK_sort(sk) OPENSSL_sk_sort(ossl_check_OPENSSL_BLOCK_sk_type(sk))
|
|
287
|
+
#define sk_OPENSSL_BLOCK_is_sorted(sk) OPENSSL_sk_is_sorted(ossl_check_const_OPENSSL_BLOCK_sk_type(sk))
|
|
288
|
+
#define sk_OPENSSL_BLOCK_dup(sk) ((STACK_OF(OPENSSL_BLOCK) *)OPENSSL_sk_dup(ossl_check_const_OPENSSL_BLOCK_sk_type(sk)))
|
|
289
|
+
#define sk_OPENSSL_BLOCK_deep_copy(sk, copyfunc, freefunc) ((STACK_OF(OPENSSL_BLOCK) *)OPENSSL_sk_deep_copy(ossl_check_const_OPENSSL_BLOCK_sk_type(sk), ossl_check_OPENSSL_BLOCK_copyfunc_type(copyfunc), ossl_check_OPENSSL_BLOCK_freefunc_type(freefunc)))
|
|
290
|
+
#define sk_OPENSSL_BLOCK_set_cmp_func(sk, cmp) ((sk_OPENSSL_BLOCK_compfunc)OPENSSL_sk_set_cmp_func(ossl_check_OPENSSL_BLOCK_sk_type(sk), ossl_check_OPENSSL_BLOCK_compfunc_type(cmp)))
|
|
291
|
+
|
|
292
|
+
#endif
|
|
293
|
+
|
|
294
|
+
# ifdef __cplusplus
|
|
295
|
+
}
|
|
296
|
+
# endif
|
|
297
|
+
#endif
|
|
@@ -0,0 +1,285 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* WARNING: do not edit!
|
|
3
|
+
* Generated by Makefile from include/openssl/srp.h.in
|
|
4
|
+
*
|
|
5
|
+
* Copyright 2004-2021 The OpenSSL Project Authors. All Rights Reserved.
|
|
6
|
+
* Copyright (c) 2004, EdelKey Project. All Rights Reserved.
|
|
7
|
+
*
|
|
8
|
+
* Licensed under the Apache License 2.0 (the "License"). You may not use
|
|
9
|
+
* this file except in compliance with the License. You can obtain a copy
|
|
10
|
+
* in the file LICENSE in the source distribution or at
|
|
11
|
+
* https://www.openssl.org/source/license.html
|
|
12
|
+
*
|
|
13
|
+
* Originally written by Christophe Renou and Peter Sylvester,
|
|
14
|
+
* for the EdelKey project.
|
|
15
|
+
*/
|
|
16
|
+
|
|
17
|
+
|
|
18
|
+
|
|
19
|
+
#ifndef OPENSSL_SRP_H
|
|
20
|
+
# define OPENSSL_SRP_H
|
|
21
|
+
# pragma once
|
|
22
|
+
|
|
23
|
+
# include <openssl/macros.h>
|
|
24
|
+
# ifndef OPENSSL_NO_DEPRECATED_3_0
|
|
25
|
+
# define HEADER_SRP_H
|
|
26
|
+
# endif
|
|
27
|
+
|
|
28
|
+
#include <openssl/opensslconf.h>
|
|
29
|
+
|
|
30
|
+
#ifndef OPENSSL_NO_SRP
|
|
31
|
+
# include <stdio.h>
|
|
32
|
+
# include <string.h>
|
|
33
|
+
# include <openssl/safestack.h>
|
|
34
|
+
# include <openssl/bn.h>
|
|
35
|
+
# include <openssl/crypto.h>
|
|
36
|
+
|
|
37
|
+
# ifdef __cplusplus
|
|
38
|
+
extern "C" {
|
|
39
|
+
# endif
|
|
40
|
+
|
|
41
|
+
# ifndef OPENSSL_NO_DEPRECATED_3_0
|
|
42
|
+
|
|
43
|
+
typedef struct SRP_gN_cache_st {
|
|
44
|
+
char *b64_bn;
|
|
45
|
+
BIGNUM *bn;
|
|
46
|
+
} SRP_gN_cache;
|
|
47
|
+
SKM_DEFINE_STACK_OF_INTERNAL(SRP_gN_cache, SRP_gN_cache, SRP_gN_cache)
|
|
48
|
+
#define sk_SRP_gN_cache_num(sk) OPENSSL_sk_num(ossl_check_const_SRP_gN_cache_sk_type(sk))
|
|
49
|
+
#define sk_SRP_gN_cache_value(sk, idx) ((SRP_gN_cache *)OPENSSL_sk_value(ossl_check_const_SRP_gN_cache_sk_type(sk), (idx)))
|
|
50
|
+
#define sk_SRP_gN_cache_new(cmp) ((STACK_OF(SRP_gN_cache) *)OPENSSL_sk_new(ossl_check_SRP_gN_cache_compfunc_type(cmp)))
|
|
51
|
+
#define sk_SRP_gN_cache_new_null() ((STACK_OF(SRP_gN_cache) *)OPENSSL_sk_new_null())
|
|
52
|
+
#define sk_SRP_gN_cache_new_reserve(cmp, n) ((STACK_OF(SRP_gN_cache) *)OPENSSL_sk_new_reserve(ossl_check_SRP_gN_cache_compfunc_type(cmp), (n)))
|
|
53
|
+
#define sk_SRP_gN_cache_reserve(sk, n) OPENSSL_sk_reserve(ossl_check_SRP_gN_cache_sk_type(sk), (n))
|
|
54
|
+
#define sk_SRP_gN_cache_free(sk) OPENSSL_sk_free(ossl_check_SRP_gN_cache_sk_type(sk))
|
|
55
|
+
#define sk_SRP_gN_cache_zero(sk) OPENSSL_sk_zero(ossl_check_SRP_gN_cache_sk_type(sk))
|
|
56
|
+
#define sk_SRP_gN_cache_delete(sk, i) ((SRP_gN_cache *)OPENSSL_sk_delete(ossl_check_SRP_gN_cache_sk_type(sk), (i)))
|
|
57
|
+
#define sk_SRP_gN_cache_delete_ptr(sk, ptr) ((SRP_gN_cache *)OPENSSL_sk_delete_ptr(ossl_check_SRP_gN_cache_sk_type(sk), ossl_check_SRP_gN_cache_type(ptr)))
|
|
58
|
+
#define sk_SRP_gN_cache_push(sk, ptr) OPENSSL_sk_push(ossl_check_SRP_gN_cache_sk_type(sk), ossl_check_SRP_gN_cache_type(ptr))
|
|
59
|
+
#define sk_SRP_gN_cache_unshift(sk, ptr) OPENSSL_sk_unshift(ossl_check_SRP_gN_cache_sk_type(sk), ossl_check_SRP_gN_cache_type(ptr))
|
|
60
|
+
#define sk_SRP_gN_cache_pop(sk) ((SRP_gN_cache *)OPENSSL_sk_pop(ossl_check_SRP_gN_cache_sk_type(sk)))
|
|
61
|
+
#define sk_SRP_gN_cache_shift(sk) ((SRP_gN_cache *)OPENSSL_sk_shift(ossl_check_SRP_gN_cache_sk_type(sk)))
|
|
62
|
+
#define sk_SRP_gN_cache_pop_free(sk, freefunc) OPENSSL_sk_pop_free(ossl_check_SRP_gN_cache_sk_type(sk),ossl_check_SRP_gN_cache_freefunc_type(freefunc))
|
|
63
|
+
#define sk_SRP_gN_cache_insert(sk, ptr, idx) OPENSSL_sk_insert(ossl_check_SRP_gN_cache_sk_type(sk), ossl_check_SRP_gN_cache_type(ptr), (idx))
|
|
64
|
+
#define sk_SRP_gN_cache_set(sk, idx, ptr) ((SRP_gN_cache *)OPENSSL_sk_set(ossl_check_SRP_gN_cache_sk_type(sk), (idx), ossl_check_SRP_gN_cache_type(ptr)))
|
|
65
|
+
#define sk_SRP_gN_cache_find(sk, ptr) OPENSSL_sk_find(ossl_check_SRP_gN_cache_sk_type(sk), ossl_check_SRP_gN_cache_type(ptr))
|
|
66
|
+
#define sk_SRP_gN_cache_find_ex(sk, ptr) OPENSSL_sk_find_ex(ossl_check_SRP_gN_cache_sk_type(sk), ossl_check_SRP_gN_cache_type(ptr))
|
|
67
|
+
#define sk_SRP_gN_cache_find_all(sk, ptr, pnum) OPENSSL_sk_find_all(ossl_check_SRP_gN_cache_sk_type(sk), ossl_check_SRP_gN_cache_type(ptr), pnum)
|
|
68
|
+
#define sk_SRP_gN_cache_sort(sk) OPENSSL_sk_sort(ossl_check_SRP_gN_cache_sk_type(sk))
|
|
69
|
+
#define sk_SRP_gN_cache_is_sorted(sk) OPENSSL_sk_is_sorted(ossl_check_const_SRP_gN_cache_sk_type(sk))
|
|
70
|
+
#define sk_SRP_gN_cache_dup(sk) ((STACK_OF(SRP_gN_cache) *)OPENSSL_sk_dup(ossl_check_const_SRP_gN_cache_sk_type(sk)))
|
|
71
|
+
#define sk_SRP_gN_cache_deep_copy(sk, copyfunc, freefunc) ((STACK_OF(SRP_gN_cache) *)OPENSSL_sk_deep_copy(ossl_check_const_SRP_gN_cache_sk_type(sk), ossl_check_SRP_gN_cache_copyfunc_type(copyfunc), ossl_check_SRP_gN_cache_freefunc_type(freefunc)))
|
|
72
|
+
#define sk_SRP_gN_cache_set_cmp_func(sk, cmp) ((sk_SRP_gN_cache_compfunc)OPENSSL_sk_set_cmp_func(ossl_check_SRP_gN_cache_sk_type(sk), ossl_check_SRP_gN_cache_compfunc_type(cmp)))
|
|
73
|
+
|
|
74
|
+
|
|
75
|
+
|
|
76
|
+
typedef struct SRP_user_pwd_st {
|
|
77
|
+
/* Owned by us. */
|
|
78
|
+
char *id;
|
|
79
|
+
BIGNUM *s;
|
|
80
|
+
BIGNUM *v;
|
|
81
|
+
/* Not owned by us. */
|
|
82
|
+
const BIGNUM *g;
|
|
83
|
+
const BIGNUM *N;
|
|
84
|
+
/* Owned by us. */
|
|
85
|
+
char *info;
|
|
86
|
+
} SRP_user_pwd;
|
|
87
|
+
SKM_DEFINE_STACK_OF_INTERNAL(SRP_user_pwd, SRP_user_pwd, SRP_user_pwd)
|
|
88
|
+
#define sk_SRP_user_pwd_num(sk) OPENSSL_sk_num(ossl_check_const_SRP_user_pwd_sk_type(sk))
|
|
89
|
+
#define sk_SRP_user_pwd_value(sk, idx) ((SRP_user_pwd *)OPENSSL_sk_value(ossl_check_const_SRP_user_pwd_sk_type(sk), (idx)))
|
|
90
|
+
#define sk_SRP_user_pwd_new(cmp) ((STACK_OF(SRP_user_pwd) *)OPENSSL_sk_new(ossl_check_SRP_user_pwd_compfunc_type(cmp)))
|
|
91
|
+
#define sk_SRP_user_pwd_new_null() ((STACK_OF(SRP_user_pwd) *)OPENSSL_sk_new_null())
|
|
92
|
+
#define sk_SRP_user_pwd_new_reserve(cmp, n) ((STACK_OF(SRP_user_pwd) *)OPENSSL_sk_new_reserve(ossl_check_SRP_user_pwd_compfunc_type(cmp), (n)))
|
|
93
|
+
#define sk_SRP_user_pwd_reserve(sk, n) OPENSSL_sk_reserve(ossl_check_SRP_user_pwd_sk_type(sk), (n))
|
|
94
|
+
#define sk_SRP_user_pwd_free(sk) OPENSSL_sk_free(ossl_check_SRP_user_pwd_sk_type(sk))
|
|
95
|
+
#define sk_SRP_user_pwd_zero(sk) OPENSSL_sk_zero(ossl_check_SRP_user_pwd_sk_type(sk))
|
|
96
|
+
#define sk_SRP_user_pwd_delete(sk, i) ((SRP_user_pwd *)OPENSSL_sk_delete(ossl_check_SRP_user_pwd_sk_type(sk), (i)))
|
|
97
|
+
#define sk_SRP_user_pwd_delete_ptr(sk, ptr) ((SRP_user_pwd *)OPENSSL_sk_delete_ptr(ossl_check_SRP_user_pwd_sk_type(sk), ossl_check_SRP_user_pwd_type(ptr)))
|
|
98
|
+
#define sk_SRP_user_pwd_push(sk, ptr) OPENSSL_sk_push(ossl_check_SRP_user_pwd_sk_type(sk), ossl_check_SRP_user_pwd_type(ptr))
|
|
99
|
+
#define sk_SRP_user_pwd_unshift(sk, ptr) OPENSSL_sk_unshift(ossl_check_SRP_user_pwd_sk_type(sk), ossl_check_SRP_user_pwd_type(ptr))
|
|
100
|
+
#define sk_SRP_user_pwd_pop(sk) ((SRP_user_pwd *)OPENSSL_sk_pop(ossl_check_SRP_user_pwd_sk_type(sk)))
|
|
101
|
+
#define sk_SRP_user_pwd_shift(sk) ((SRP_user_pwd *)OPENSSL_sk_shift(ossl_check_SRP_user_pwd_sk_type(sk)))
|
|
102
|
+
#define sk_SRP_user_pwd_pop_free(sk, freefunc) OPENSSL_sk_pop_free(ossl_check_SRP_user_pwd_sk_type(sk),ossl_check_SRP_user_pwd_freefunc_type(freefunc))
|
|
103
|
+
#define sk_SRP_user_pwd_insert(sk, ptr, idx) OPENSSL_sk_insert(ossl_check_SRP_user_pwd_sk_type(sk), ossl_check_SRP_user_pwd_type(ptr), (idx))
|
|
104
|
+
#define sk_SRP_user_pwd_set(sk, idx, ptr) ((SRP_user_pwd *)OPENSSL_sk_set(ossl_check_SRP_user_pwd_sk_type(sk), (idx), ossl_check_SRP_user_pwd_type(ptr)))
|
|
105
|
+
#define sk_SRP_user_pwd_find(sk, ptr) OPENSSL_sk_find(ossl_check_SRP_user_pwd_sk_type(sk), ossl_check_SRP_user_pwd_type(ptr))
|
|
106
|
+
#define sk_SRP_user_pwd_find_ex(sk, ptr) OPENSSL_sk_find_ex(ossl_check_SRP_user_pwd_sk_type(sk), ossl_check_SRP_user_pwd_type(ptr))
|
|
107
|
+
#define sk_SRP_user_pwd_find_all(sk, ptr, pnum) OPENSSL_sk_find_all(ossl_check_SRP_user_pwd_sk_type(sk), ossl_check_SRP_user_pwd_type(ptr), pnum)
|
|
108
|
+
#define sk_SRP_user_pwd_sort(sk) OPENSSL_sk_sort(ossl_check_SRP_user_pwd_sk_type(sk))
|
|
109
|
+
#define sk_SRP_user_pwd_is_sorted(sk) OPENSSL_sk_is_sorted(ossl_check_const_SRP_user_pwd_sk_type(sk))
|
|
110
|
+
#define sk_SRP_user_pwd_dup(sk) ((STACK_OF(SRP_user_pwd) *)OPENSSL_sk_dup(ossl_check_const_SRP_user_pwd_sk_type(sk)))
|
|
111
|
+
#define sk_SRP_user_pwd_deep_copy(sk, copyfunc, freefunc) ((STACK_OF(SRP_user_pwd) *)OPENSSL_sk_deep_copy(ossl_check_const_SRP_user_pwd_sk_type(sk), ossl_check_SRP_user_pwd_copyfunc_type(copyfunc), ossl_check_SRP_user_pwd_freefunc_type(freefunc)))
|
|
112
|
+
#define sk_SRP_user_pwd_set_cmp_func(sk, cmp) ((sk_SRP_user_pwd_compfunc)OPENSSL_sk_set_cmp_func(ossl_check_SRP_user_pwd_sk_type(sk), ossl_check_SRP_user_pwd_compfunc_type(cmp)))
|
|
113
|
+
|
|
114
|
+
|
|
115
|
+
OSSL_DEPRECATEDIN_3_0
|
|
116
|
+
SRP_user_pwd *SRP_user_pwd_new(void);
|
|
117
|
+
OSSL_DEPRECATEDIN_3_0
|
|
118
|
+
void SRP_user_pwd_free(SRP_user_pwd *user_pwd);
|
|
119
|
+
|
|
120
|
+
OSSL_DEPRECATEDIN_3_0
|
|
121
|
+
void SRP_user_pwd_set_gN(SRP_user_pwd *user_pwd, const BIGNUM *g,
|
|
122
|
+
const BIGNUM *N);
|
|
123
|
+
OSSL_DEPRECATEDIN_3_0
|
|
124
|
+
int SRP_user_pwd_set1_ids(SRP_user_pwd *user_pwd, const char *id,
|
|
125
|
+
const char *info);
|
|
126
|
+
OSSL_DEPRECATEDIN_3_0
|
|
127
|
+
int SRP_user_pwd_set0_sv(SRP_user_pwd *user_pwd, BIGNUM *s, BIGNUM *v);
|
|
128
|
+
|
|
129
|
+
typedef struct SRP_VBASE_st {
|
|
130
|
+
STACK_OF(SRP_user_pwd) *users_pwd;
|
|
131
|
+
STACK_OF(SRP_gN_cache) *gN_cache;
|
|
132
|
+
/* to simulate a user */
|
|
133
|
+
char *seed_key;
|
|
134
|
+
const BIGNUM *default_g;
|
|
135
|
+
const BIGNUM *default_N;
|
|
136
|
+
} SRP_VBASE;
|
|
137
|
+
|
|
138
|
+
/*
|
|
139
|
+
* Internal structure storing N and g pair
|
|
140
|
+
*/
|
|
141
|
+
typedef struct SRP_gN_st {
|
|
142
|
+
char *id;
|
|
143
|
+
const BIGNUM *g;
|
|
144
|
+
const BIGNUM *N;
|
|
145
|
+
} SRP_gN;
|
|
146
|
+
SKM_DEFINE_STACK_OF_INTERNAL(SRP_gN, SRP_gN, SRP_gN)
|
|
147
|
+
#define sk_SRP_gN_num(sk) OPENSSL_sk_num(ossl_check_const_SRP_gN_sk_type(sk))
|
|
148
|
+
#define sk_SRP_gN_value(sk, idx) ((SRP_gN *)OPENSSL_sk_value(ossl_check_const_SRP_gN_sk_type(sk), (idx)))
|
|
149
|
+
#define sk_SRP_gN_new(cmp) ((STACK_OF(SRP_gN) *)OPENSSL_sk_new(ossl_check_SRP_gN_compfunc_type(cmp)))
|
|
150
|
+
#define sk_SRP_gN_new_null() ((STACK_OF(SRP_gN) *)OPENSSL_sk_new_null())
|
|
151
|
+
#define sk_SRP_gN_new_reserve(cmp, n) ((STACK_OF(SRP_gN) *)OPENSSL_sk_new_reserve(ossl_check_SRP_gN_compfunc_type(cmp), (n)))
|
|
152
|
+
#define sk_SRP_gN_reserve(sk, n) OPENSSL_sk_reserve(ossl_check_SRP_gN_sk_type(sk), (n))
|
|
153
|
+
#define sk_SRP_gN_free(sk) OPENSSL_sk_free(ossl_check_SRP_gN_sk_type(sk))
|
|
154
|
+
#define sk_SRP_gN_zero(sk) OPENSSL_sk_zero(ossl_check_SRP_gN_sk_type(sk))
|
|
155
|
+
#define sk_SRP_gN_delete(sk, i) ((SRP_gN *)OPENSSL_sk_delete(ossl_check_SRP_gN_sk_type(sk), (i)))
|
|
156
|
+
#define sk_SRP_gN_delete_ptr(sk, ptr) ((SRP_gN *)OPENSSL_sk_delete_ptr(ossl_check_SRP_gN_sk_type(sk), ossl_check_SRP_gN_type(ptr)))
|
|
157
|
+
#define sk_SRP_gN_push(sk, ptr) OPENSSL_sk_push(ossl_check_SRP_gN_sk_type(sk), ossl_check_SRP_gN_type(ptr))
|
|
158
|
+
#define sk_SRP_gN_unshift(sk, ptr) OPENSSL_sk_unshift(ossl_check_SRP_gN_sk_type(sk), ossl_check_SRP_gN_type(ptr))
|
|
159
|
+
#define sk_SRP_gN_pop(sk) ((SRP_gN *)OPENSSL_sk_pop(ossl_check_SRP_gN_sk_type(sk)))
|
|
160
|
+
#define sk_SRP_gN_shift(sk) ((SRP_gN *)OPENSSL_sk_shift(ossl_check_SRP_gN_sk_type(sk)))
|
|
161
|
+
#define sk_SRP_gN_pop_free(sk, freefunc) OPENSSL_sk_pop_free(ossl_check_SRP_gN_sk_type(sk),ossl_check_SRP_gN_freefunc_type(freefunc))
|
|
162
|
+
#define sk_SRP_gN_insert(sk, ptr, idx) OPENSSL_sk_insert(ossl_check_SRP_gN_sk_type(sk), ossl_check_SRP_gN_type(ptr), (idx))
|
|
163
|
+
#define sk_SRP_gN_set(sk, idx, ptr) ((SRP_gN *)OPENSSL_sk_set(ossl_check_SRP_gN_sk_type(sk), (idx), ossl_check_SRP_gN_type(ptr)))
|
|
164
|
+
#define sk_SRP_gN_find(sk, ptr) OPENSSL_sk_find(ossl_check_SRP_gN_sk_type(sk), ossl_check_SRP_gN_type(ptr))
|
|
165
|
+
#define sk_SRP_gN_find_ex(sk, ptr) OPENSSL_sk_find_ex(ossl_check_SRP_gN_sk_type(sk), ossl_check_SRP_gN_type(ptr))
|
|
166
|
+
#define sk_SRP_gN_find_all(sk, ptr, pnum) OPENSSL_sk_find_all(ossl_check_SRP_gN_sk_type(sk), ossl_check_SRP_gN_type(ptr), pnum)
|
|
167
|
+
#define sk_SRP_gN_sort(sk) OPENSSL_sk_sort(ossl_check_SRP_gN_sk_type(sk))
|
|
168
|
+
#define sk_SRP_gN_is_sorted(sk) OPENSSL_sk_is_sorted(ossl_check_const_SRP_gN_sk_type(sk))
|
|
169
|
+
#define sk_SRP_gN_dup(sk) ((STACK_OF(SRP_gN) *)OPENSSL_sk_dup(ossl_check_const_SRP_gN_sk_type(sk)))
|
|
170
|
+
#define sk_SRP_gN_deep_copy(sk, copyfunc, freefunc) ((STACK_OF(SRP_gN) *)OPENSSL_sk_deep_copy(ossl_check_const_SRP_gN_sk_type(sk), ossl_check_SRP_gN_copyfunc_type(copyfunc), ossl_check_SRP_gN_freefunc_type(freefunc)))
|
|
171
|
+
#define sk_SRP_gN_set_cmp_func(sk, cmp) ((sk_SRP_gN_compfunc)OPENSSL_sk_set_cmp_func(ossl_check_SRP_gN_sk_type(sk), ossl_check_SRP_gN_compfunc_type(cmp)))
|
|
172
|
+
|
|
173
|
+
|
|
174
|
+
|
|
175
|
+
OSSL_DEPRECATEDIN_3_0
|
|
176
|
+
SRP_VBASE *SRP_VBASE_new(char *seed_key);
|
|
177
|
+
OSSL_DEPRECATEDIN_3_0
|
|
178
|
+
void SRP_VBASE_free(SRP_VBASE *vb);
|
|
179
|
+
OSSL_DEPRECATEDIN_3_0
|
|
180
|
+
int SRP_VBASE_init(SRP_VBASE *vb, char *verifier_file);
|
|
181
|
+
|
|
182
|
+
OSSL_DEPRECATEDIN_3_0
|
|
183
|
+
int SRP_VBASE_add0_user(SRP_VBASE *vb, SRP_user_pwd *user_pwd);
|
|
184
|
+
|
|
185
|
+
/* NOTE: unlike in SRP_VBASE_get_by_user, caller owns the returned pointer.*/
|
|
186
|
+
OSSL_DEPRECATEDIN_3_0
|
|
187
|
+
SRP_user_pwd *SRP_VBASE_get1_by_user(SRP_VBASE *vb, char *username);
|
|
188
|
+
|
|
189
|
+
OSSL_DEPRECATEDIN_3_0
|
|
190
|
+
char *SRP_create_verifier_ex(const char *user, const char *pass, char **salt,
|
|
191
|
+
char **verifier, const char *N, const char *g,
|
|
192
|
+
OSSL_LIB_CTX *libctx, const char *propq);
|
|
193
|
+
OSSL_DEPRECATEDIN_3_0
|
|
194
|
+
char *SRP_create_verifier(const char *user, const char *pass, char **salt,
|
|
195
|
+
char **verifier, const char *N, const char *g);
|
|
196
|
+
OSSL_DEPRECATEDIN_3_0
|
|
197
|
+
int SRP_create_verifier_BN_ex(const char *user, const char *pass, BIGNUM **salt,
|
|
198
|
+
BIGNUM **verifier, const BIGNUM *N,
|
|
199
|
+
const BIGNUM *g, OSSL_LIB_CTX *libctx,
|
|
200
|
+
const char *propq);
|
|
201
|
+
OSSL_DEPRECATEDIN_3_0
|
|
202
|
+
int SRP_create_verifier_BN(const char *user, const char *pass, BIGNUM **salt,
|
|
203
|
+
BIGNUM **verifier, const BIGNUM *N,
|
|
204
|
+
const BIGNUM *g);
|
|
205
|
+
|
|
206
|
+
# define SRP_NO_ERROR 0
|
|
207
|
+
# define SRP_ERR_VBASE_INCOMPLETE_FILE 1
|
|
208
|
+
# define SRP_ERR_VBASE_BN_LIB 2
|
|
209
|
+
# define SRP_ERR_OPEN_FILE 3
|
|
210
|
+
# define SRP_ERR_MEMORY 4
|
|
211
|
+
|
|
212
|
+
# define DB_srptype 0
|
|
213
|
+
# define DB_srpverifier 1
|
|
214
|
+
# define DB_srpsalt 2
|
|
215
|
+
# define DB_srpid 3
|
|
216
|
+
# define DB_srpgN 4
|
|
217
|
+
# define DB_srpinfo 5
|
|
218
|
+
# undef DB_NUMBER
|
|
219
|
+
# define DB_NUMBER 6
|
|
220
|
+
|
|
221
|
+
# define DB_SRP_INDEX 'I'
|
|
222
|
+
# define DB_SRP_VALID 'V'
|
|
223
|
+
# define DB_SRP_REVOKED 'R'
|
|
224
|
+
# define DB_SRP_MODIF 'v'
|
|
225
|
+
|
|
226
|
+
/* see srp.c */
|
|
227
|
+
OSSL_DEPRECATEDIN_3_0
|
|
228
|
+
char *SRP_check_known_gN_param(const BIGNUM *g, const BIGNUM *N);
|
|
229
|
+
OSSL_DEPRECATEDIN_3_0
|
|
230
|
+
SRP_gN *SRP_get_default_gN(const char *id);
|
|
231
|
+
|
|
232
|
+
/* server side .... */
|
|
233
|
+
OSSL_DEPRECATEDIN_3_0
|
|
234
|
+
BIGNUM *SRP_Calc_server_key(const BIGNUM *A, const BIGNUM *v, const BIGNUM *u,
|
|
235
|
+
const BIGNUM *b, const BIGNUM *N);
|
|
236
|
+
OSSL_DEPRECATEDIN_3_0
|
|
237
|
+
BIGNUM *SRP_Calc_B_ex(const BIGNUM *b, const BIGNUM *N, const BIGNUM *g,
|
|
238
|
+
const BIGNUM *v, OSSL_LIB_CTX *libctx, const char *propq);
|
|
239
|
+
OSSL_DEPRECATEDIN_3_0
|
|
240
|
+
BIGNUM *SRP_Calc_B(const BIGNUM *b, const BIGNUM *N, const BIGNUM *g,
|
|
241
|
+
const BIGNUM *v);
|
|
242
|
+
|
|
243
|
+
OSSL_DEPRECATEDIN_3_0
|
|
244
|
+
int SRP_Verify_A_mod_N(const BIGNUM *A, const BIGNUM *N);
|
|
245
|
+
OSSL_DEPRECATEDIN_3_0
|
|
246
|
+
BIGNUM *SRP_Calc_u_ex(const BIGNUM *A, const BIGNUM *B, const BIGNUM *N,
|
|
247
|
+
OSSL_LIB_CTX *libctx, const char *propq);
|
|
248
|
+
OSSL_DEPRECATEDIN_3_0
|
|
249
|
+
BIGNUM *SRP_Calc_u(const BIGNUM *A, const BIGNUM *B, const BIGNUM *N);
|
|
250
|
+
|
|
251
|
+
/* client side .... */
|
|
252
|
+
|
|
253
|
+
OSSL_DEPRECATEDIN_3_0
|
|
254
|
+
BIGNUM *SRP_Calc_x_ex(const BIGNUM *s, const char *user, const char *pass,
|
|
255
|
+
OSSL_LIB_CTX *libctx, const char *propq);
|
|
256
|
+
OSSL_DEPRECATEDIN_3_0
|
|
257
|
+
BIGNUM *SRP_Calc_x(const BIGNUM *s, const char *user, const char *pass);
|
|
258
|
+
OSSL_DEPRECATEDIN_3_0
|
|
259
|
+
BIGNUM *SRP_Calc_A(const BIGNUM *a, const BIGNUM *N, const BIGNUM *g);
|
|
260
|
+
OSSL_DEPRECATEDIN_3_0
|
|
261
|
+
BIGNUM *SRP_Calc_client_key_ex(const BIGNUM *N, const BIGNUM *B, const BIGNUM *g,
|
|
262
|
+
const BIGNUM *x, const BIGNUM *a, const BIGNUM *u,
|
|
263
|
+
OSSL_LIB_CTX *libctx, const char *propq);
|
|
264
|
+
OSSL_DEPRECATEDIN_3_0
|
|
265
|
+
BIGNUM *SRP_Calc_client_key(const BIGNUM *N, const BIGNUM *B, const BIGNUM *g,
|
|
266
|
+
const BIGNUM *x, const BIGNUM *a, const BIGNUM *u);
|
|
267
|
+
OSSL_DEPRECATEDIN_3_0
|
|
268
|
+
int SRP_Verify_B_mod_N(const BIGNUM *B, const BIGNUM *N);
|
|
269
|
+
|
|
270
|
+
# define SRP_MINIMAL_N 1024
|
|
271
|
+
|
|
272
|
+
# endif /* OPENSSL_NO_DEPRECATED_3_0 */
|
|
273
|
+
|
|
274
|
+
/* This method ignores the configured seed and fails for an unknown user. */
|
|
275
|
+
# ifndef OPENSSL_NO_DEPRECATED_1_1_0
|
|
276
|
+
OSSL_DEPRECATEDIN_1_1_0
|
|
277
|
+
SRP_user_pwd *SRP_VBASE_get_by_user(SRP_VBASE *vb, char *username);
|
|
278
|
+
# endif
|
|
279
|
+
|
|
280
|
+
# ifdef __cplusplus
|
|
281
|
+
}
|
|
282
|
+
# endif
|
|
283
|
+
# endif
|
|
284
|
+
|
|
285
|
+
#endif
|