line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
#define PERL_constant_NOTFOUND 1 |
2
|
|
|
|
|
|
|
#define PERL_constant_NOTDEF 2 |
3
|
|
|
|
|
|
|
#define PERL_constant_ISIV 3 |
4
|
|
|
|
|
|
|
#define PERL_constant_ISNO 4 |
5
|
|
|
|
|
|
|
#define PERL_constant_ISNV 5 |
6
|
|
|
|
|
|
|
#define PERL_constant_ISPV 6 |
7
|
|
|
|
|
|
|
#define PERL_constant_ISPVN 7 |
8
|
|
|
|
|
|
|
#define PERL_constant_ISSV 8 |
9
|
|
|
|
|
|
|
#define PERL_constant_ISUNDEF 9 |
10
|
|
|
|
|
|
|
#define PERL_constant_ISUV 10 |
11
|
|
|
|
|
|
|
#define PERL_constant_ISYES 11 |
12
|
|
|
|
|
|
|
|
13
|
|
|
|
|
|
|
#ifndef NVTYPE |
14
|
|
|
|
|
|
|
typedef double NV; /* 5.6 and later define NVTYPE, and typedef NV to it. */ |
15
|
|
|
|
|
|
|
#endif |
16
|
|
|
|
|
|
|
#ifndef aTHX_ |
17
|
|
|
|
|
|
|
#define aTHX_ /* 5.6 or later define this for threading support. */ |
18
|
|
|
|
|
|
|
#endif |
19
|
|
|
|
|
|
|
#ifndef pTHX_ |
20
|
|
|
|
|
|
|
#define pTHX_ /* 5.6 or later define this for threading support. */ |
21
|
|
|
|
|
|
|
#endif |
22
|
|
|
|
|
|
|
|
23
|
|
|
|
|
|
|
static int |
24
|
3
|
|
|
|
|
|
constant_16 (pTHX_ const char *name, IV *iv_return) { |
25
|
|
|
|
|
|
|
/* When generated this function returned values for the list of names given |
26
|
|
|
|
|
|
|
here. However, subsequent manual editing may have added or removed some. |
27
|
|
|
|
|
|
|
EC_F_EC_KEY_COPY EC_F_EC_WNAF_MUL EC_R_WRONG_ORDER */ |
28
|
|
|
|
|
|
|
/* Offset 9 gives the best switch position. */ |
29
|
3
|
|
|
|
|
|
switch (name[9]) { |
30
|
|
|
|
|
|
|
case 'E': |
31
|
1
|
50
|
|
|
|
|
if (memEQ(name, "EC_F_EC_KEY_COPY", 16)) { |
32
|
|
|
|
|
|
|
/* ^ */ |
33
|
|
|
|
|
|
|
#ifdef EC_F_EC_KEY_COPY |
34
|
1
|
|
|
|
|
|
*iv_return = EC_F_EC_KEY_COPY; |
35
|
1
|
|
|
|
|
|
return PERL_constant_ISIV; |
36
|
|
|
|
|
|
|
#else |
37
|
|
|
|
|
|
|
return PERL_constant_NOTDEF; |
38
|
|
|
|
|
|
|
#endif |
39
|
|
|
|
|
|
|
} |
40
|
0
|
|
|
|
|
|
break; |
41
|
|
|
|
|
|
|
case 'G': |
42
|
1
|
50
|
|
|
|
|
if (memEQ(name, "EC_R_WRONG_ORDER", 16)) { |
43
|
|
|
|
|
|
|
/* ^ */ |
44
|
|
|
|
|
|
|
#ifdef EC_R_WRONG_ORDER |
45
|
1
|
|
|
|
|
|
*iv_return = EC_R_WRONG_ORDER; |
46
|
1
|
|
|
|
|
|
return PERL_constant_ISIV; |
47
|
|
|
|
|
|
|
#else |
48
|
|
|
|
|
|
|
return PERL_constant_NOTDEF; |
49
|
|
|
|
|
|
|
#endif |
50
|
|
|
|
|
|
|
} |
51
|
0
|
|
|
|
|
|
break; |
52
|
|
|
|
|
|
|
case 'N': |
53
|
1
|
50
|
|
|
|
|
if (memEQ(name, "EC_F_EC_WNAF_MUL", 16)) { |
54
|
|
|
|
|
|
|
/* ^ */ |
55
|
|
|
|
|
|
|
#ifdef EC_F_EC_WNAF_MUL |
56
|
1
|
|
|
|
|
|
*iv_return = EC_F_EC_WNAF_MUL; |
57
|
1
|
|
|
|
|
|
return PERL_constant_ISIV; |
58
|
|
|
|
|
|
|
#else |
59
|
|
|
|
|
|
|
return PERL_constant_NOTDEF; |
60
|
|
|
|
|
|
|
#endif |
61
|
|
|
|
|
|
|
} |
62
|
0
|
|
|
|
|
|
break; |
63
|
|
|
|
|
|
|
} |
64
|
0
|
|
|
|
|
|
return PERL_constant_NOTFOUND; |
65
|
|
|
|
|
|
|
} |
66
|
|
|
|
|
|
|
|
67
|
|
|
|
|
|
|
static int |
68
|
15
|
|
|
|
|
|
constant_17 (pTHX_ const char *name, IV *iv_return) { |
69
|
|
|
|
|
|
|
/* When generated this function returned values for the list of names given |
70
|
|
|
|
|
|
|
here. However, subsequent manual editing may have added or removed some. |
71
|
|
|
|
|
|
|
EC_F_COMPUTE_WNAF EC_F_EC_GROUP_NEW EC_F_EC_KEY_PRINT EC_F_EC_POINT_ADD |
72
|
|
|
|
|
|
|
EC_F_EC_POINT_CMP EC_F_EC_POINT_DBL EC_F_EC_POINT_MUL EC_F_EC_POINT_NEW |
73
|
|
|
|
|
|
|
EC_F_PKEY_EC_CTRL EC_F_PKEY_EC_SIGN EC_PKEY_NO_PUBKEY EC_R_DECODE_ERROR |
74
|
|
|
|
|
|
|
EC_R_INVALID_FORM EC_R_KEYS_NOT_SET EC_R_NO_FIELD_MOD */ |
75
|
|
|
|
|
|
|
/* Offset 14 gives the best switch position. */ |
76
|
15
|
|
|
|
|
|
switch (name[14]) { |
77
|
|
|
|
|
|
|
case 'A': |
78
|
1
|
50
|
|
|
|
|
if (memEQ(name, "EC_F_EC_POINT_ADD", 17)) { |
79
|
|
|
|
|
|
|
/* ^ */ |
80
|
|
|
|
|
|
|
#ifdef EC_F_EC_POINT_ADD |
81
|
1
|
|
|
|
|
|
*iv_return = EC_F_EC_POINT_ADD; |
82
|
1
|
|
|
|
|
|
return PERL_constant_ISIV; |
83
|
|
|
|
|
|
|
#else |
84
|
|
|
|
|
|
|
return PERL_constant_NOTDEF; |
85
|
|
|
|
|
|
|
#endif |
86
|
|
|
|
|
|
|
} |
87
|
0
|
|
|
|
|
|
break; |
88
|
|
|
|
|
|
|
case 'C': |
89
|
1
|
50
|
|
|
|
|
if (memEQ(name, "EC_F_EC_POINT_CMP", 17)) { |
90
|
|
|
|
|
|
|
/* ^ */ |
91
|
|
|
|
|
|
|
#ifdef EC_F_EC_POINT_CMP |
92
|
1
|
|
|
|
|
|
*iv_return = EC_F_EC_POINT_CMP; |
93
|
1
|
|
|
|
|
|
return PERL_constant_ISIV; |
94
|
|
|
|
|
|
|
#else |
95
|
|
|
|
|
|
|
return PERL_constant_NOTDEF; |
96
|
|
|
|
|
|
|
#endif |
97
|
|
|
|
|
|
|
} |
98
|
0
|
|
|
|
|
|
break; |
99
|
|
|
|
|
|
|
case 'D': |
100
|
1
|
50
|
|
|
|
|
if (memEQ(name, "EC_F_EC_POINT_DBL", 17)) { |
101
|
|
|
|
|
|
|
/* ^ */ |
102
|
|
|
|
|
|
|
#ifdef EC_F_EC_POINT_DBL |
103
|
1
|
|
|
|
|
|
*iv_return = EC_F_EC_POINT_DBL; |
104
|
1
|
|
|
|
|
|
return PERL_constant_ISIV; |
105
|
|
|
|
|
|
|
#else |
106
|
|
|
|
|
|
|
return PERL_constant_NOTDEF; |
107
|
|
|
|
|
|
|
#endif |
108
|
|
|
|
|
|
|
} |
109
|
0
|
|
|
|
|
|
break; |
110
|
|
|
|
|
|
|
case 'I': |
111
|
2
|
100
|
|
|
|
|
if (memEQ(name, "EC_F_EC_KEY_PRINT", 17)) { |
112
|
|
|
|
|
|
|
/* ^ */ |
113
|
|
|
|
|
|
|
#ifdef EC_F_EC_KEY_PRINT |
114
|
1
|
|
|
|
|
|
*iv_return = EC_F_EC_KEY_PRINT; |
115
|
1
|
|
|
|
|
|
return PERL_constant_ISIV; |
116
|
|
|
|
|
|
|
#else |
117
|
|
|
|
|
|
|
return PERL_constant_NOTDEF; |
118
|
|
|
|
|
|
|
#endif |
119
|
|
|
|
|
|
|
} |
120
|
1
|
50
|
|
|
|
|
if (memEQ(name, "EC_F_PKEY_EC_SIGN", 17)) { |
121
|
|
|
|
|
|
|
/* ^ */ |
122
|
|
|
|
|
|
|
#ifdef EC_F_PKEY_EC_SIGN |
123
|
1
|
|
|
|
|
|
*iv_return = EC_F_PKEY_EC_SIGN; |
124
|
1
|
|
|
|
|
|
return PERL_constant_ISIV; |
125
|
|
|
|
|
|
|
#else |
126
|
|
|
|
|
|
|
return PERL_constant_NOTDEF; |
127
|
|
|
|
|
|
|
#endif |
128
|
|
|
|
|
|
|
} |
129
|
0
|
|
|
|
|
|
break; |
130
|
|
|
|
|
|
|
case 'K': |
131
|
1
|
50
|
|
|
|
|
if (memEQ(name, "EC_PKEY_NO_PUBKEY", 17)) { |
132
|
|
|
|
|
|
|
/* ^ */ |
133
|
|
|
|
|
|
|
#ifdef EC_PKEY_NO_PUBKEY |
134
|
1
|
|
|
|
|
|
*iv_return = EC_PKEY_NO_PUBKEY; |
135
|
1
|
|
|
|
|
|
return PERL_constant_ISIV; |
136
|
|
|
|
|
|
|
#else |
137
|
|
|
|
|
|
|
return PERL_constant_NOTDEF; |
138
|
|
|
|
|
|
|
#endif |
139
|
|
|
|
|
|
|
} |
140
|
0
|
|
|
|
|
|
break; |
141
|
|
|
|
|
|
|
case 'M': |
142
|
2
|
100
|
|
|
|
|
if (memEQ(name, "EC_F_EC_POINT_MUL", 17)) { |
143
|
|
|
|
|
|
|
/* ^ */ |
144
|
|
|
|
|
|
|
#ifdef EC_F_EC_POINT_MUL |
145
|
1
|
|
|
|
|
|
*iv_return = EC_F_EC_POINT_MUL; |
146
|
1
|
|
|
|
|
|
return PERL_constant_ISIV; |
147
|
|
|
|
|
|
|
#else |
148
|
|
|
|
|
|
|
return PERL_constant_NOTDEF; |
149
|
|
|
|
|
|
|
#endif |
150
|
|
|
|
|
|
|
} |
151
|
1
|
50
|
|
|
|
|
if (memEQ(name, "EC_R_NO_FIELD_MOD", 17)) { |
152
|
|
|
|
|
|
|
/* ^ */ |
153
|
|
|
|
|
|
|
#ifdef EC_R_NO_FIELD_MOD |
154
|
1
|
|
|
|
|
|
*iv_return = EC_R_NO_FIELD_MOD; |
155
|
1
|
|
|
|
|
|
return PERL_constant_ISIV; |
156
|
|
|
|
|
|
|
#else |
157
|
|
|
|
|
|
|
return PERL_constant_NOTDEF; |
158
|
|
|
|
|
|
|
#endif |
159
|
|
|
|
|
|
|
} |
160
|
0
|
|
|
|
|
|
break; |
161
|
|
|
|
|
|
|
case 'N': |
162
|
3
|
100
|
|
|
|
|
if (memEQ(name, "EC_F_COMPUTE_WNAF", 17)) { |
163
|
|
|
|
|
|
|
/* ^ */ |
164
|
|
|
|
|
|
|
#ifdef EC_F_COMPUTE_WNAF |
165
|
1
|
|
|
|
|
|
*iv_return = EC_F_COMPUTE_WNAF; |
166
|
1
|
|
|
|
|
|
return PERL_constant_ISIV; |
167
|
|
|
|
|
|
|
#else |
168
|
|
|
|
|
|
|
return PERL_constant_NOTDEF; |
169
|
|
|
|
|
|
|
#endif |
170
|
|
|
|
|
|
|
} |
171
|
2
|
100
|
|
|
|
|
if (memEQ(name, "EC_F_EC_GROUP_NEW", 17)) { |
172
|
|
|
|
|
|
|
/* ^ */ |
173
|
|
|
|
|
|
|
#ifdef EC_F_EC_GROUP_NEW |
174
|
1
|
|
|
|
|
|
*iv_return = EC_F_EC_GROUP_NEW; |
175
|
1
|
|
|
|
|
|
return PERL_constant_ISIV; |
176
|
|
|
|
|
|
|
#else |
177
|
|
|
|
|
|
|
return PERL_constant_NOTDEF; |
178
|
|
|
|
|
|
|
#endif |
179
|
|
|
|
|
|
|
} |
180
|
1
|
50
|
|
|
|
|
if (memEQ(name, "EC_F_EC_POINT_NEW", 17)) { |
181
|
|
|
|
|
|
|
/* ^ */ |
182
|
|
|
|
|
|
|
#ifdef EC_F_EC_POINT_NEW |
183
|
1
|
|
|
|
|
|
*iv_return = EC_F_EC_POINT_NEW; |
184
|
1
|
|
|
|
|
|
return PERL_constant_ISIV; |
185
|
|
|
|
|
|
|
#else |
186
|
|
|
|
|
|
|
return PERL_constant_NOTDEF; |
187
|
|
|
|
|
|
|
#endif |
188
|
|
|
|
|
|
|
} |
189
|
0
|
|
|
|
|
|
break; |
190
|
|
|
|
|
|
|
case 'O': |
191
|
1
|
50
|
|
|
|
|
if (memEQ(name, "EC_R_INVALID_FORM", 17)) { |
192
|
|
|
|
|
|
|
/* ^ */ |
193
|
|
|
|
|
|
|
#ifdef EC_R_INVALID_FORM |
194
|
1
|
|
|
|
|
|
*iv_return = EC_R_INVALID_FORM; |
195
|
1
|
|
|
|
|
|
return PERL_constant_ISIV; |
196
|
|
|
|
|
|
|
#else |
197
|
|
|
|
|
|
|
return PERL_constant_NOTDEF; |
198
|
|
|
|
|
|
|
#endif |
199
|
|
|
|
|
|
|
} |
200
|
0
|
|
|
|
|
|
break; |
201
|
|
|
|
|
|
|
case 'R': |
202
|
1
|
50
|
|
|
|
|
if (memEQ(name, "EC_R_DECODE_ERROR", 17)) { |
203
|
|
|
|
|
|
|
/* ^ */ |
204
|
|
|
|
|
|
|
#ifdef EC_R_DECODE_ERROR |
205
|
1
|
|
|
|
|
|
*iv_return = EC_R_DECODE_ERROR; |
206
|
1
|
|
|
|
|
|
return PERL_constant_ISIV; |
207
|
|
|
|
|
|
|
#else |
208
|
|
|
|
|
|
|
return PERL_constant_NOTDEF; |
209
|
|
|
|
|
|
|
#endif |
210
|
|
|
|
|
|
|
} |
211
|
0
|
|
|
|
|
|
break; |
212
|
|
|
|
|
|
|
case 'S': |
213
|
1
|
50
|
|
|
|
|
if (memEQ(name, "EC_R_KEYS_NOT_SET", 17)) { |
214
|
|
|
|
|
|
|
/* ^ */ |
215
|
|
|
|
|
|
|
#ifdef EC_R_KEYS_NOT_SET |
216
|
1
|
|
|
|
|
|
*iv_return = EC_R_KEYS_NOT_SET; |
217
|
1
|
|
|
|
|
|
return PERL_constant_ISIV; |
218
|
|
|
|
|
|
|
#else |
219
|
|
|
|
|
|
|
return PERL_constant_NOTDEF; |
220
|
|
|
|
|
|
|
#endif |
221
|
|
|
|
|
|
|
} |
222
|
0
|
|
|
|
|
|
break; |
223
|
|
|
|
|
|
|
case 'T': |
224
|
1
|
50
|
|
|
|
|
if (memEQ(name, "EC_F_PKEY_EC_CTRL", 17)) { |
225
|
|
|
|
|
|
|
/* ^ */ |
226
|
|
|
|
|
|
|
#ifdef EC_F_PKEY_EC_CTRL |
227
|
1
|
|
|
|
|
|
*iv_return = EC_F_PKEY_EC_CTRL; |
228
|
1
|
|
|
|
|
|
return PERL_constant_ISIV; |
229
|
|
|
|
|
|
|
#else |
230
|
|
|
|
|
|
|
return PERL_constant_NOTDEF; |
231
|
|
|
|
|
|
|
#endif |
232
|
|
|
|
|
|
|
} |
233
|
0
|
|
|
|
|
|
break; |
234
|
|
|
|
|
|
|
} |
235
|
0
|
|
|
|
|
|
return PERL_constant_NOTFOUND; |
236
|
|
|
|
|
|
|
} |
237
|
|
|
|
|
|
|
|
238
|
|
|
|
|
|
|
static int |
239
|
6
|
|
|
|
|
|
constant_18 (pTHX_ const char *name, IV *iv_return) { |
240
|
|
|
|
|
|
|
/* When generated this function returned values for the list of names given |
241
|
|
|
|
|
|
|
here. However, subsequent manual editing may have added or removed some. |
242
|
|
|
|
|
|
|
EC_F_EC_GROUP_COPY EC_F_EC_POINT_COPY EC_R_INVALID_CURVE |
243
|
|
|
|
|
|
|
EC_R_INVALID_FIELD EC_R_UNKNOWN_GROUP EC_R_UNKNOWN_ORDER */ |
244
|
|
|
|
|
|
|
/* Offset 16 gives the best switch position. */ |
245
|
6
|
|
|
|
|
|
switch (name[16]) { |
246
|
|
|
|
|
|
|
case 'E': |
247
|
1
|
50
|
|
|
|
|
if (memEQ(name, "EC_R_UNKNOWN_ORDER", 18)) { |
248
|
|
|
|
|
|
|
/* ^ */ |
249
|
|
|
|
|
|
|
#ifdef EC_R_UNKNOWN_ORDER |
250
|
1
|
|
|
|
|
|
*iv_return = EC_R_UNKNOWN_ORDER; |
251
|
1
|
|
|
|
|
|
return PERL_constant_ISIV; |
252
|
|
|
|
|
|
|
#else |
253
|
|
|
|
|
|
|
return PERL_constant_NOTDEF; |
254
|
|
|
|
|
|
|
#endif |
255
|
|
|
|
|
|
|
} |
256
|
0
|
|
|
|
|
|
break; |
257
|
|
|
|
|
|
|
case 'L': |
258
|
1
|
50
|
|
|
|
|
if (memEQ(name, "EC_R_INVALID_FIELD", 18)) { |
259
|
|
|
|
|
|
|
/* ^ */ |
260
|
|
|
|
|
|
|
#ifdef EC_R_INVALID_FIELD |
261
|
1
|
|
|
|
|
|
*iv_return = EC_R_INVALID_FIELD; |
262
|
1
|
|
|
|
|
|
return PERL_constant_ISIV; |
263
|
|
|
|
|
|
|
#else |
264
|
|
|
|
|
|
|
return PERL_constant_NOTDEF; |
265
|
|
|
|
|
|
|
#endif |
266
|
|
|
|
|
|
|
} |
267
|
0
|
|
|
|
|
|
break; |
268
|
|
|
|
|
|
|
case 'P': |
269
|
2
|
100
|
|
|
|
|
if (memEQ(name, "EC_F_EC_GROUP_COPY", 18)) { |
270
|
|
|
|
|
|
|
/* ^ */ |
271
|
|
|
|
|
|
|
#ifdef EC_F_EC_GROUP_COPY |
272
|
1
|
|
|
|
|
|
*iv_return = EC_F_EC_GROUP_COPY; |
273
|
1
|
|
|
|
|
|
return PERL_constant_ISIV; |
274
|
|
|
|
|
|
|
#else |
275
|
|
|
|
|
|
|
return PERL_constant_NOTDEF; |
276
|
|
|
|
|
|
|
#endif |
277
|
|
|
|
|
|
|
} |
278
|
1
|
50
|
|
|
|
|
if (memEQ(name, "EC_F_EC_POINT_COPY", 18)) { |
279
|
|
|
|
|
|
|
/* ^ */ |
280
|
|
|
|
|
|
|
#ifdef EC_F_EC_POINT_COPY |
281
|
1
|
|
|
|
|
|
*iv_return = EC_F_EC_POINT_COPY; |
282
|
1
|
|
|
|
|
|
return PERL_constant_ISIV; |
283
|
|
|
|
|
|
|
#else |
284
|
|
|
|
|
|
|
return PERL_constant_NOTDEF; |
285
|
|
|
|
|
|
|
#endif |
286
|
|
|
|
|
|
|
} |
287
|
0
|
|
|
|
|
|
break; |
288
|
|
|
|
|
|
|
case 'U': |
289
|
1
|
50
|
|
|
|
|
if (memEQ(name, "EC_R_UNKNOWN_GROUP", 18)) { |
290
|
|
|
|
|
|
|
/* ^ */ |
291
|
|
|
|
|
|
|
#ifdef EC_R_UNKNOWN_GROUP |
292
|
1
|
|
|
|
|
|
*iv_return = EC_R_UNKNOWN_GROUP; |
293
|
1
|
|
|
|
|
|
return PERL_constant_ISIV; |
294
|
|
|
|
|
|
|
#else |
295
|
|
|
|
|
|
|
return PERL_constant_NOTDEF; |
296
|
|
|
|
|
|
|
#endif |
297
|
|
|
|
|
|
|
} |
298
|
0
|
|
|
|
|
|
break; |
299
|
|
|
|
|
|
|
case 'V': |
300
|
1
|
50
|
|
|
|
|
if (memEQ(name, "EC_R_INVALID_CURVE", 18)) { |
301
|
|
|
|
|
|
|
/* ^ */ |
302
|
|
|
|
|
|
|
#ifdef EC_R_INVALID_CURVE |
303
|
1
|
|
|
|
|
|
*iv_return = EC_R_INVALID_CURVE; |
304
|
1
|
|
|
|
|
|
return PERL_constant_ISIV; |
305
|
|
|
|
|
|
|
#else |
306
|
|
|
|
|
|
|
return PERL_constant_NOTDEF; |
307
|
|
|
|
|
|
|
#endif |
308
|
|
|
|
|
|
|
} |
309
|
0
|
|
|
|
|
|
break; |
310
|
|
|
|
|
|
|
} |
311
|
0
|
|
|
|
|
|
return PERL_constant_NOTFOUND; |
312
|
|
|
|
|
|
|
} |
313
|
|
|
|
|
|
|
|
314
|
|
|
|
|
|
|
static int |
315
|
3
|
|
|
|
|
|
constant_19 (pTHX_ const char *name, IV *iv_return) { |
316
|
|
|
|
|
|
|
/* When generated this function returned values for the list of names given |
317
|
|
|
|
|
|
|
here. However, subsequent manual editing may have added or removed some. |
318
|
|
|
|
|
|
|
EC_F_EC_GROUP_CHECK EC_F_PKEY_EC_DERIVE EC_F_PKEY_EC_KEYGEN */ |
319
|
|
|
|
|
|
|
/* Offset 16 gives the best switch position. */ |
320
|
3
|
|
|
|
|
|
switch (name[16]) { |
321
|
|
|
|
|
|
|
case 'E': |
322
|
1
|
50
|
|
|
|
|
if (memEQ(name, "EC_F_EC_GROUP_CHECK", 19)) { |
323
|
|
|
|
|
|
|
/* ^ */ |
324
|
|
|
|
|
|
|
#ifdef EC_F_EC_GROUP_CHECK |
325
|
1
|
|
|
|
|
|
*iv_return = EC_F_EC_GROUP_CHECK; |
326
|
1
|
|
|
|
|
|
return PERL_constant_ISIV; |
327
|
|
|
|
|
|
|
#else |
328
|
|
|
|
|
|
|
return PERL_constant_NOTDEF; |
329
|
|
|
|
|
|
|
#endif |
330
|
|
|
|
|
|
|
} |
331
|
0
|
|
|
|
|
|
break; |
332
|
|
|
|
|
|
|
case 'G': |
333
|
1
|
50
|
|
|
|
|
if (memEQ(name, "EC_F_PKEY_EC_KEYGEN", 19)) { |
334
|
|
|
|
|
|
|
/* ^ */ |
335
|
|
|
|
|
|
|
#ifdef EC_F_PKEY_EC_KEYGEN |
336
|
1
|
|
|
|
|
|
*iv_return = EC_F_PKEY_EC_KEYGEN; |
337
|
1
|
|
|
|
|
|
return PERL_constant_ISIV; |
338
|
|
|
|
|
|
|
#else |
339
|
|
|
|
|
|
|
return PERL_constant_NOTDEF; |
340
|
|
|
|
|
|
|
#endif |
341
|
|
|
|
|
|
|
} |
342
|
0
|
|
|
|
|
|
break; |
343
|
|
|
|
|
|
|
case 'I': |
344
|
1
|
50
|
|
|
|
|
if (memEQ(name, "EC_F_PKEY_EC_DERIVE", 19)) { |
345
|
|
|
|
|
|
|
/* ^ */ |
346
|
|
|
|
|
|
|
#ifdef EC_F_PKEY_EC_DERIVE |
347
|
1
|
|
|
|
|
|
*iv_return = EC_F_PKEY_EC_DERIVE; |
348
|
1
|
|
|
|
|
|
return PERL_constant_ISIV; |
349
|
|
|
|
|
|
|
#else |
350
|
|
|
|
|
|
|
return PERL_constant_NOTDEF; |
351
|
|
|
|
|
|
|
#endif |
352
|
|
|
|
|
|
|
} |
353
|
0
|
|
|
|
|
|
break; |
354
|
|
|
|
|
|
|
} |
355
|
0
|
|
|
|
|
|
return PERL_constant_NOTFOUND; |
356
|
|
|
|
|
|
|
} |
357
|
|
|
|
|
|
|
|
358
|
|
|
|
|
|
|
static int |
359
|
11
|
|
|
|
|
|
constant_20 (pTHX_ const char *name, IV *iv_return) { |
360
|
|
|
|
|
|
|
/* When generated this function returned values for the list of names given |
361
|
|
|
|
|
|
|
here. However, subsequent manual editing may have added or removed some. |
362
|
|
|
|
|
|
|
EC_F_DO_EC_KEY_PRINT EC_F_EC_KEY_PRINT_FP EC_F_EC_POINT_INVERT |
363
|
|
|
|
|
|
|
EC_F_EC_PRE_COMP_DUP EC_F_EC_PRE_COMP_NEW EC_F_I2O_ECPUBLICKEY |
364
|
|
|
|
|
|
|
EC_F_O2I_ECPUBLICKEY EC_R_FIELD_TOO_LARGE EC_R_NOT_IMPLEMENTED |
365
|
|
|
|
|
|
|
EC_R_NOT_INITIALIZED EC_R_UNDEFINED_ORDER */ |
366
|
|
|
|
|
|
|
/* Offset 17 gives the best switch position. */ |
367
|
11
|
|
|
|
|
|
switch (name[17]) { |
368
|
|
|
|
|
|
|
case 'D': |
369
|
2
|
100
|
|
|
|
|
if (memEQ(name, "EC_F_EC_PRE_COMP_DUP", 20)) { |
370
|
|
|
|
|
|
|
/* ^ */ |
371
|
|
|
|
|
|
|
#ifdef EC_F_EC_PRE_COMP_DUP |
372
|
1
|
|
|
|
|
|
*iv_return = EC_F_EC_PRE_COMP_DUP; |
373
|
1
|
|
|
|
|
|
return PERL_constant_ISIV; |
374
|
|
|
|
|
|
|
#else |
375
|
|
|
|
|
|
|
return PERL_constant_NOTDEF; |
376
|
|
|
|
|
|
|
#endif |
377
|
|
|
|
|
|
|
} |
378
|
1
|
50
|
|
|
|
|
if (memEQ(name, "EC_R_UNDEFINED_ORDER", 20)) { |
379
|
|
|
|
|
|
|
/* ^ */ |
380
|
|
|
|
|
|
|
#ifdef EC_R_UNDEFINED_ORDER |
381
|
1
|
|
|
|
|
|
*iv_return = EC_R_UNDEFINED_ORDER; |
382
|
1
|
|
|
|
|
|
return PERL_constant_ISIV; |
383
|
|
|
|
|
|
|
#else |
384
|
|
|
|
|
|
|
return PERL_constant_NOTDEF; |
385
|
|
|
|
|
|
|
#endif |
386
|
|
|
|
|
|
|
} |
387
|
0
|
|
|
|
|
|
break; |
388
|
|
|
|
|
|
|
case 'E': |
389
|
1
|
50
|
|
|
|
|
if (memEQ(name, "EC_F_EC_POINT_INVERT", 20)) { |
390
|
|
|
|
|
|
|
/* ^ */ |
391
|
|
|
|
|
|
|
#ifdef EC_F_EC_POINT_INVERT |
392
|
1
|
|
|
|
|
|
*iv_return = EC_F_EC_POINT_INVERT; |
393
|
1
|
|
|
|
|
|
return PERL_constant_ISIV; |
394
|
|
|
|
|
|
|
#else |
395
|
|
|
|
|
|
|
return PERL_constant_NOTDEF; |
396
|
|
|
|
|
|
|
#endif |
397
|
|
|
|
|
|
|
} |
398
|
0
|
|
|
|
|
|
break; |
399
|
|
|
|
|
|
|
case 'I': |
400
|
1
|
50
|
|
|
|
|
if (memEQ(name, "EC_F_DO_EC_KEY_PRINT", 20)) { |
401
|
|
|
|
|
|
|
/* ^ */ |
402
|
|
|
|
|
|
|
#ifdef EC_F_DO_EC_KEY_PRINT |
403
|
1
|
|
|
|
|
|
*iv_return = EC_F_DO_EC_KEY_PRINT; |
404
|
1
|
|
|
|
|
|
return PERL_constant_ISIV; |
405
|
|
|
|
|
|
|
#else |
406
|
|
|
|
|
|
|
return PERL_constant_NOTDEF; |
407
|
|
|
|
|
|
|
#endif |
408
|
|
|
|
|
|
|
} |
409
|
0
|
|
|
|
|
|
break; |
410
|
|
|
|
|
|
|
case 'K': |
411
|
2
|
100
|
|
|
|
|
if (memEQ(name, "EC_F_I2O_ECPUBLICKEY", 20)) { |
412
|
|
|
|
|
|
|
/* ^ */ |
413
|
|
|
|
|
|
|
#ifdef EC_F_I2O_ECPUBLICKEY |
414
|
1
|
|
|
|
|
|
*iv_return = EC_F_I2O_ECPUBLICKEY; |
415
|
1
|
|
|
|
|
|
return PERL_constant_ISIV; |
416
|
|
|
|
|
|
|
#else |
417
|
|
|
|
|
|
|
return PERL_constant_NOTDEF; |
418
|
|
|
|
|
|
|
#endif |
419
|
|
|
|
|
|
|
} |
420
|
1
|
50
|
|
|
|
|
if (memEQ(name, "EC_F_O2I_ECPUBLICKEY", 20)) { |
421
|
|
|
|
|
|
|
/* ^ */ |
422
|
|
|
|
|
|
|
#ifdef EC_F_O2I_ECPUBLICKEY |
423
|
1
|
|
|
|
|
|
*iv_return = EC_F_O2I_ECPUBLICKEY; |
424
|
1
|
|
|
|
|
|
return PERL_constant_ISIV; |
425
|
|
|
|
|
|
|
#else |
426
|
|
|
|
|
|
|
return PERL_constant_NOTDEF; |
427
|
|
|
|
|
|
|
#endif |
428
|
|
|
|
|
|
|
} |
429
|
0
|
|
|
|
|
|
break; |
430
|
|
|
|
|
|
|
case 'N': |
431
|
1
|
50
|
|
|
|
|
if (memEQ(name, "EC_F_EC_PRE_COMP_NEW", 20)) { |
432
|
|
|
|
|
|
|
/* ^ */ |
433
|
|
|
|
|
|
|
#ifdef EC_F_EC_PRE_COMP_NEW |
434
|
1
|
|
|
|
|
|
*iv_return = EC_F_EC_PRE_COMP_NEW; |
435
|
1
|
|
|
|
|
|
return PERL_constant_ISIV; |
436
|
|
|
|
|
|
|
#else |
437
|
|
|
|
|
|
|
return PERL_constant_NOTDEF; |
438
|
|
|
|
|
|
|
#endif |
439
|
|
|
|
|
|
|
} |
440
|
0
|
|
|
|
|
|
break; |
441
|
|
|
|
|
|
|
case 'R': |
442
|
1
|
50
|
|
|
|
|
if (memEQ(name, "EC_R_FIELD_TOO_LARGE", 20)) { |
443
|
|
|
|
|
|
|
/* ^ */ |
444
|
|
|
|
|
|
|
#ifdef EC_R_FIELD_TOO_LARGE |
445
|
1
|
|
|
|
|
|
*iv_return = EC_R_FIELD_TOO_LARGE; |
446
|
1
|
|
|
|
|
|
return PERL_constant_ISIV; |
447
|
|
|
|
|
|
|
#else |
448
|
|
|
|
|
|
|
return PERL_constant_NOTDEF; |
449
|
|
|
|
|
|
|
#endif |
450
|
|
|
|
|
|
|
} |
451
|
0
|
|
|
|
|
|
break; |
452
|
|
|
|
|
|
|
case 'T': |
453
|
1
|
50
|
|
|
|
|
if (memEQ(name, "EC_R_NOT_IMPLEMENTED", 20)) { |
454
|
|
|
|
|
|
|
/* ^ */ |
455
|
|
|
|
|
|
|
#ifdef EC_R_NOT_IMPLEMENTED |
456
|
1
|
|
|
|
|
|
*iv_return = EC_R_NOT_IMPLEMENTED; |
457
|
1
|
|
|
|
|
|
return PERL_constant_ISIV; |
458
|
|
|
|
|
|
|
#else |
459
|
|
|
|
|
|
|
return PERL_constant_NOTDEF; |
460
|
|
|
|
|
|
|
#endif |
461
|
|
|
|
|
|
|
} |
462
|
0
|
|
|
|
|
|
break; |
463
|
|
|
|
|
|
|
case 'Z': |
464
|
1
|
50
|
|
|
|
|
if (memEQ(name, "EC_R_NOT_INITIALIZED", 20)) { |
465
|
|
|
|
|
|
|
/* ^ */ |
466
|
|
|
|
|
|
|
#ifdef EC_R_NOT_INITIALIZED |
467
|
1
|
|
|
|
|
|
*iv_return = EC_R_NOT_INITIALIZED; |
468
|
1
|
|
|
|
|
|
return PERL_constant_ISIV; |
469
|
|
|
|
|
|
|
#else |
470
|
|
|
|
|
|
|
return PERL_constant_NOTDEF; |
471
|
|
|
|
|
|
|
#endif |
472
|
|
|
|
|
|
|
} |
473
|
0
|
|
|
|
|
|
break; |
474
|
|
|
|
|
|
|
case '_': |
475
|
1
|
50
|
|
|
|
|
if (memEQ(name, "EC_F_EC_KEY_PRINT_FP", 20)) { |
476
|
|
|
|
|
|
|
/* ^ */ |
477
|
|
|
|
|
|
|
#ifdef EC_F_EC_KEY_PRINT_FP |
478
|
1
|
|
|
|
|
|
*iv_return = EC_F_EC_KEY_PRINT_FP; |
479
|
1
|
|
|
|
|
|
return PERL_constant_ISIV; |
480
|
|
|
|
|
|
|
#else |
481
|
|
|
|
|
|
|
return PERL_constant_NOTDEF; |
482
|
|
|
|
|
|
|
#endif |
483
|
|
|
|
|
|
|
} |
484
|
0
|
|
|
|
|
|
break; |
485
|
|
|
|
|
|
|
} |
486
|
0
|
|
|
|
|
|
return PERL_constant_NOTFOUND; |
487
|
|
|
|
|
|
|
} |
488
|
|
|
|
|
|
|
|
489
|
|
|
|
|
|
|
static int |
490
|
20
|
|
|
|
|
|
constant_21 (pTHX_ const char *name, IV *iv_return) { |
491
|
|
|
|
|
|
|
/* When generated this function returned values for the list of names given |
492
|
|
|
|
|
|
|
here. However, subsequent manual editing may have added or removed some. |
493
|
|
|
|
|
|
|
EC_F_D2I_ECPARAMETERS EC_F_D2I_ECPRIVATEKEY EC_F_ECKEY_PARAM2TYPE |
494
|
|
|
|
|
|
|
EC_F_ECKEY_PUB_DECODE EC_F_ECKEY_PUB_ENCODE EC_F_ECKEY_TYPE2PARAM |
495
|
|
|
|
|
|
|
EC_F_ECP_NIST_MOD_192 EC_F_ECP_NIST_MOD_224 EC_F_ECP_NIST_MOD_256 |
496
|
|
|
|
|
|
|
EC_F_ECP_NIST_MOD_521 EC_F_EC_KEY_CHECK_KEY EC_F_I2D_ECPARAMETERS |
497
|
|
|
|
|
|
|
EC_F_I2D_ECPRIVATEKEY EC_F_PKEY_EC_CTRL_STR EC_F_PKEY_EC_PARAMGEN |
498
|
|
|
|
|
|
|
EC_PKEY_NO_PARAMETERS EC_R_BUFFER_TOO_SMALL EC_R_INVALID_ARGUMENT |
499
|
|
|
|
|
|
|
EC_R_INVALID_ENCODING EC_R_NOT_A_NIST_PRIME */ |
500
|
|
|
|
|
|
|
/* Offset 20 gives the best switch position. */ |
501
|
20
|
|
|
|
|
|
switch (name[20]) { |
502
|
|
|
|
|
|
|
case '1': |
503
|
1
|
50
|
|
|
|
|
if (memEQ(name, "EC_F_ECP_NIST_MOD_52", 20)) { |
504
|
|
|
|
|
|
|
/* 1 */ |
505
|
|
|
|
|
|
|
#ifdef EC_F_ECP_NIST_MOD_521 |
506
|
1
|
|
|
|
|
|
*iv_return = EC_F_ECP_NIST_MOD_521; |
507
|
1
|
|
|
|
|
|
return PERL_constant_ISIV; |
508
|
|
|
|
|
|
|
#else |
509
|
|
|
|
|
|
|
return PERL_constant_NOTDEF; |
510
|
|
|
|
|
|
|
#endif |
511
|
|
|
|
|
|
|
} |
512
|
0
|
|
|
|
|
|
break; |
513
|
|
|
|
|
|
|
case '2': |
514
|
1
|
50
|
|
|
|
|
if (memEQ(name, "EC_F_ECP_NIST_MOD_19", 20)) { |
515
|
|
|
|
|
|
|
/* 2 */ |
516
|
|
|
|
|
|
|
#ifdef EC_F_ECP_NIST_MOD_192 |
517
|
1
|
|
|
|
|
|
*iv_return = EC_F_ECP_NIST_MOD_192; |
518
|
1
|
|
|
|
|
|
return PERL_constant_ISIV; |
519
|
|
|
|
|
|
|
#else |
520
|
|
|
|
|
|
|
return PERL_constant_NOTDEF; |
521
|
|
|
|
|
|
|
#endif |
522
|
|
|
|
|
|
|
} |
523
|
0
|
|
|
|
|
|
break; |
524
|
|
|
|
|
|
|
case '4': |
525
|
1
|
50
|
|
|
|
|
if (memEQ(name, "EC_F_ECP_NIST_MOD_22", 20)) { |
526
|
|
|
|
|
|
|
/* 4 */ |
527
|
|
|
|
|
|
|
#ifdef EC_F_ECP_NIST_MOD_224 |
528
|
1
|
|
|
|
|
|
*iv_return = EC_F_ECP_NIST_MOD_224; |
529
|
1
|
|
|
|
|
|
return PERL_constant_ISIV; |
530
|
|
|
|
|
|
|
#else |
531
|
|
|
|
|
|
|
return PERL_constant_NOTDEF; |
532
|
|
|
|
|
|
|
#endif |
533
|
|
|
|
|
|
|
} |
534
|
0
|
|
|
|
|
|
break; |
535
|
|
|
|
|
|
|
case '6': |
536
|
1
|
50
|
|
|
|
|
if (memEQ(name, "EC_F_ECP_NIST_MOD_25", 20)) { |
537
|
|
|
|
|
|
|
/* 6 */ |
538
|
|
|
|
|
|
|
#ifdef EC_F_ECP_NIST_MOD_256 |
539
|
1
|
|
|
|
|
|
*iv_return = EC_F_ECP_NIST_MOD_256; |
540
|
1
|
|
|
|
|
|
return PERL_constant_ISIV; |
541
|
|
|
|
|
|
|
#else |
542
|
|
|
|
|
|
|
return PERL_constant_NOTDEF; |
543
|
|
|
|
|
|
|
#endif |
544
|
|
|
|
|
|
|
} |
545
|
0
|
|
|
|
|
|
break; |
546
|
|
|
|
|
|
|
case 'E': |
547
|
4
|
100
|
|
|
|
|
if (memEQ(name, "EC_F_ECKEY_PARAM2TYP", 20)) { |
548
|
|
|
|
|
|
|
/* E */ |
549
|
|
|
|
|
|
|
#ifdef EC_F_ECKEY_PARAM2TYPE |
550
|
1
|
|
|
|
|
|
*iv_return = EC_F_ECKEY_PARAM2TYPE; |
551
|
1
|
|
|
|
|
|
return PERL_constant_ISIV; |
552
|
|
|
|
|
|
|
#else |
553
|
|
|
|
|
|
|
return PERL_constant_NOTDEF; |
554
|
|
|
|
|
|
|
#endif |
555
|
|
|
|
|
|
|
} |
556
|
3
|
100
|
|
|
|
|
if (memEQ(name, "EC_F_ECKEY_PUB_DECOD", 20)) { |
557
|
|
|
|
|
|
|
/* E */ |
558
|
|
|
|
|
|
|
#ifdef EC_F_ECKEY_PUB_DECODE |
559
|
1
|
|
|
|
|
|
*iv_return = EC_F_ECKEY_PUB_DECODE; |
560
|
1
|
|
|
|
|
|
return PERL_constant_ISIV; |
561
|
|
|
|
|
|
|
#else |
562
|
|
|
|
|
|
|
return PERL_constant_NOTDEF; |
563
|
|
|
|
|
|
|
#endif |
564
|
|
|
|
|
|
|
} |
565
|
2
|
100
|
|
|
|
|
if (memEQ(name, "EC_F_ECKEY_PUB_ENCOD", 20)) { |
566
|
|
|
|
|
|
|
/* E */ |
567
|
|
|
|
|
|
|
#ifdef EC_F_ECKEY_PUB_ENCODE |
568
|
1
|
|
|
|
|
|
*iv_return = EC_F_ECKEY_PUB_ENCODE; |
569
|
1
|
|
|
|
|
|
return PERL_constant_ISIV; |
570
|
|
|
|
|
|
|
#else |
571
|
|
|
|
|
|
|
return PERL_constant_NOTDEF; |
572
|
|
|
|
|
|
|
#endif |
573
|
|
|
|
|
|
|
} |
574
|
1
|
50
|
|
|
|
|
if (memEQ(name, "EC_R_NOT_A_NIST_PRIM", 20)) { |
575
|
|
|
|
|
|
|
/* E */ |
576
|
|
|
|
|
|
|
#ifdef EC_R_NOT_A_NIST_PRIME |
577
|
1
|
|
|
|
|
|
*iv_return = EC_R_NOT_A_NIST_PRIME; |
578
|
1
|
|
|
|
|
|
return PERL_constant_ISIV; |
579
|
|
|
|
|
|
|
#else |
580
|
|
|
|
|
|
|
return PERL_constant_NOTDEF; |
581
|
|
|
|
|
|
|
#endif |
582
|
|
|
|
|
|
|
} |
583
|
0
|
|
|
|
|
|
break; |
584
|
|
|
|
|
|
|
case 'G': |
585
|
1
|
50
|
|
|
|
|
if (memEQ(name, "EC_R_INVALID_ENCODIN", 20)) { |
586
|
|
|
|
|
|
|
/* G */ |
587
|
|
|
|
|
|
|
#ifdef EC_R_INVALID_ENCODING |
588
|
1
|
|
|
|
|
|
*iv_return = EC_R_INVALID_ENCODING; |
589
|
1
|
|
|
|
|
|
return PERL_constant_ISIV; |
590
|
|
|
|
|
|
|
#else |
591
|
|
|
|
|
|
|
return PERL_constant_NOTDEF; |
592
|
|
|
|
|
|
|
#endif |
593
|
|
|
|
|
|
|
} |
594
|
0
|
|
|
|
|
|
break; |
595
|
|
|
|
|
|
|
case 'L': |
596
|
1
|
50
|
|
|
|
|
if (memEQ(name, "EC_R_BUFFER_TOO_SMAL", 20)) { |
597
|
|
|
|
|
|
|
/* L */ |
598
|
|
|
|
|
|
|
#ifdef EC_R_BUFFER_TOO_SMALL |
599
|
1
|
|
|
|
|
|
*iv_return = EC_R_BUFFER_TOO_SMALL; |
600
|
1
|
|
|
|
|
|
return PERL_constant_ISIV; |
601
|
|
|
|
|
|
|
#else |
602
|
|
|
|
|
|
|
return PERL_constant_NOTDEF; |
603
|
|
|
|
|
|
|
#endif |
604
|
|
|
|
|
|
|
} |
605
|
0
|
|
|
|
|
|
break; |
606
|
|
|
|
|
|
|
case 'M': |
607
|
1
|
50
|
|
|
|
|
if (memEQ(name, "EC_F_ECKEY_TYPE2PARA", 20)) { |
608
|
|
|
|
|
|
|
/* M */ |
609
|
|
|
|
|
|
|
#ifdef EC_F_ECKEY_TYPE2PARAM |
610
|
1
|
|
|
|
|
|
*iv_return = EC_F_ECKEY_TYPE2PARAM; |
611
|
1
|
|
|
|
|
|
return PERL_constant_ISIV; |
612
|
|
|
|
|
|
|
#else |
613
|
|
|
|
|
|
|
return PERL_constant_NOTDEF; |
614
|
|
|
|
|
|
|
#endif |
615
|
|
|
|
|
|
|
} |
616
|
0
|
|
|
|
|
|
break; |
617
|
|
|
|
|
|
|
case 'N': |
618
|
1
|
50
|
|
|
|
|
if (memEQ(name, "EC_F_PKEY_EC_PARAMGE", 20)) { |
619
|
|
|
|
|
|
|
/* N */ |
620
|
|
|
|
|
|
|
#ifdef EC_F_PKEY_EC_PARAMGEN |
621
|
1
|
|
|
|
|
|
*iv_return = EC_F_PKEY_EC_PARAMGEN; |
622
|
1
|
|
|
|
|
|
return PERL_constant_ISIV; |
623
|
|
|
|
|
|
|
#else |
624
|
|
|
|
|
|
|
return PERL_constant_NOTDEF; |
625
|
|
|
|
|
|
|
#endif |
626
|
|
|
|
|
|
|
} |
627
|
0
|
|
|
|
|
|
break; |
628
|
|
|
|
|
|
|
case 'R': |
629
|
1
|
50
|
|
|
|
|
if (memEQ(name, "EC_F_PKEY_EC_CTRL_ST", 20)) { |
630
|
|
|
|
|
|
|
/* R */ |
631
|
|
|
|
|
|
|
#ifdef EC_F_PKEY_EC_CTRL_STR |
632
|
1
|
|
|
|
|
|
*iv_return = EC_F_PKEY_EC_CTRL_STR; |
633
|
1
|
|
|
|
|
|
return PERL_constant_ISIV; |
634
|
|
|
|
|
|
|
#else |
635
|
|
|
|
|
|
|
return PERL_constant_NOTDEF; |
636
|
|
|
|
|
|
|
#endif |
637
|
|
|
|
|
|
|
} |
638
|
0
|
|
|
|
|
|
break; |
639
|
|
|
|
|
|
|
case 'S': |
640
|
3
|
100
|
|
|
|
|
if (memEQ(name, "EC_F_D2I_ECPARAMETER", 20)) { |
641
|
|
|
|
|
|
|
/* S */ |
642
|
|
|
|
|
|
|
#ifdef EC_F_D2I_ECPARAMETERS |
643
|
1
|
|
|
|
|
|
*iv_return = EC_F_D2I_ECPARAMETERS; |
644
|
1
|
|
|
|
|
|
return PERL_constant_ISIV; |
645
|
|
|
|
|
|
|
#else |
646
|
|
|
|
|
|
|
return PERL_constant_NOTDEF; |
647
|
|
|
|
|
|
|
#endif |
648
|
|
|
|
|
|
|
} |
649
|
2
|
100
|
|
|
|
|
if (memEQ(name, "EC_F_I2D_ECPARAMETER", 20)) { |
650
|
|
|
|
|
|
|
/* S */ |
651
|
|
|
|
|
|
|
#ifdef EC_F_I2D_ECPARAMETERS |
652
|
1
|
|
|
|
|
|
*iv_return = EC_F_I2D_ECPARAMETERS; |
653
|
1
|
|
|
|
|
|
return PERL_constant_ISIV; |
654
|
|
|
|
|
|
|
#else |
655
|
|
|
|
|
|
|
return PERL_constant_NOTDEF; |
656
|
|
|
|
|
|
|
#endif |
657
|
|
|
|
|
|
|
} |
658
|
1
|
50
|
|
|
|
|
if (memEQ(name, "EC_PKEY_NO_PARAMETER", 20)) { |
659
|
|
|
|
|
|
|
/* S */ |
660
|
|
|
|
|
|
|
#ifdef EC_PKEY_NO_PARAMETERS |
661
|
1
|
|
|
|
|
|
*iv_return = EC_PKEY_NO_PARAMETERS; |
662
|
1
|
|
|
|
|
|
return PERL_constant_ISIV; |
663
|
|
|
|
|
|
|
#else |
664
|
|
|
|
|
|
|
return PERL_constant_NOTDEF; |
665
|
|
|
|
|
|
|
#endif |
666
|
|
|
|
|
|
|
} |
667
|
0
|
|
|
|
|
|
break; |
668
|
|
|
|
|
|
|
case 'T': |
669
|
1
|
50
|
|
|
|
|
if (memEQ(name, "EC_R_INVALID_ARGUMEN", 20)) { |
670
|
|
|
|
|
|
|
/* T */ |
671
|
|
|
|
|
|
|
#ifdef EC_R_INVALID_ARGUMENT |
672
|
1
|
|
|
|
|
|
*iv_return = EC_R_INVALID_ARGUMENT; |
673
|
1
|
|
|
|
|
|
return PERL_constant_ISIV; |
674
|
|
|
|
|
|
|
#else |
675
|
|
|
|
|
|
|
return PERL_constant_NOTDEF; |
676
|
|
|
|
|
|
|
#endif |
677
|
|
|
|
|
|
|
} |
678
|
0
|
|
|
|
|
|
break; |
679
|
|
|
|
|
|
|
case 'Y': |
680
|
3
|
100
|
|
|
|
|
if (memEQ(name, "EC_F_D2I_ECPRIVATEKE", 20)) { |
681
|
|
|
|
|
|
|
/* Y */ |
682
|
|
|
|
|
|
|
#ifdef EC_F_D2I_ECPRIVATEKEY |
683
|
1
|
|
|
|
|
|
*iv_return = EC_F_D2I_ECPRIVATEKEY; |
684
|
1
|
|
|
|
|
|
return PERL_constant_ISIV; |
685
|
|
|
|
|
|
|
#else |
686
|
|
|
|
|
|
|
return PERL_constant_NOTDEF; |
687
|
|
|
|
|
|
|
#endif |
688
|
|
|
|
|
|
|
} |
689
|
2
|
100
|
|
|
|
|
if (memEQ(name, "EC_F_EC_KEY_CHECK_KE", 20)) { |
690
|
|
|
|
|
|
|
/* Y */ |
691
|
|
|
|
|
|
|
#ifdef EC_F_EC_KEY_CHECK_KEY |
692
|
1
|
|
|
|
|
|
*iv_return = EC_F_EC_KEY_CHECK_KEY; |
693
|
1
|
|
|
|
|
|
return PERL_constant_ISIV; |
694
|
|
|
|
|
|
|
#else |
695
|
|
|
|
|
|
|
return PERL_constant_NOTDEF; |
696
|
|
|
|
|
|
|
#endif |
697
|
|
|
|
|
|
|
} |
698
|
1
|
50
|
|
|
|
|
if (memEQ(name, "EC_F_I2D_ECPRIVATEKE", 20)) { |
699
|
|
|
|
|
|
|
/* Y */ |
700
|
|
|
|
|
|
|
#ifdef EC_F_I2D_ECPRIVATEKEY |
701
|
1
|
|
|
|
|
|
*iv_return = EC_F_I2D_ECPRIVATEKEY; |
702
|
1
|
|
|
|
|
|
return PERL_constant_ISIV; |
703
|
|
|
|
|
|
|
#else |
704
|
|
|
|
|
|
|
return PERL_constant_NOTDEF; |
705
|
|
|
|
|
|
|
#endif |
706
|
|
|
|
|
|
|
} |
707
|
0
|
|
|
|
|
|
break; |
708
|
|
|
|
|
|
|
} |
709
|
0
|
|
|
|
|
|
return PERL_constant_NOTFOUND; |
710
|
|
|
|
|
|
|
} |
711
|
|
|
|
|
|
|
|
712
|
|
|
|
|
|
|
static int |
713
|
6
|
|
|
|
|
|
constant_22 (pTHX_ const char *name, IV *iv_return) { |
714
|
|
|
|
|
|
|
/* When generated this function returned values for the list of names given |
715
|
|
|
|
|
|
|
here. However, subsequent manual editing may have added or removed some. |
716
|
|
|
|
|
|
|
EC_F_ECKEY_PRIV_DECODE EC_F_ECKEY_PRIV_ENCODE EC_R_NO_PARAMETERS_SET |
717
|
|
|
|
|
|
|
EC_R_POINT_AT_INFINITY EC_R_UNSUPPORTED_FIELD OPENSSL_EC_NAMED_CURVE */ |
718
|
|
|
|
|
|
|
/* Offset 17 gives the best switch position. */ |
719
|
6
|
|
|
|
|
|
switch (name[17]) { |
720
|
|
|
|
|
|
|
case 'C': |
721
|
1
|
50
|
|
|
|
|
if (memEQ(name, "OPENSSL_EC_NAMED_CURVE", 22)) { |
722
|
|
|
|
|
|
|
/* ^ */ |
723
|
|
|
|
|
|
|
#ifdef OPENSSL_EC_NAMED_CURVE |
724
|
1
|
|
|
|
|
|
*iv_return = OPENSSL_EC_NAMED_CURVE; |
725
|
1
|
|
|
|
|
|
return PERL_constant_ISIV; |
726
|
|
|
|
|
|
|
#else |
727
|
|
|
|
|
|
|
return PERL_constant_NOTDEF; |
728
|
|
|
|
|
|
|
#endif |
729
|
|
|
|
|
|
|
} |
730
|
0
|
|
|
|
|
|
break; |
731
|
|
|
|
|
|
|
case 'E': |
732
|
1
|
50
|
|
|
|
|
if (memEQ(name, "EC_F_ECKEY_PRIV_DECODE", 22)) { |
733
|
|
|
|
|
|
|
/* ^ */ |
734
|
|
|
|
|
|
|
#ifdef EC_F_ECKEY_PRIV_DECODE |
735
|
1
|
|
|
|
|
|
*iv_return = EC_F_ECKEY_PRIV_DECODE; |
736
|
1
|
|
|
|
|
|
return PERL_constant_ISIV; |
737
|
|
|
|
|
|
|
#else |
738
|
|
|
|
|
|
|
return PERL_constant_NOTDEF; |
739
|
|
|
|
|
|
|
#endif |
740
|
|
|
|
|
|
|
} |
741
|
0
|
|
|
|
|
|
break; |
742
|
|
|
|
|
|
|
case 'F': |
743
|
1
|
50
|
|
|
|
|
if (memEQ(name, "EC_R_UNSUPPORTED_FIELD", 22)) { |
744
|
|
|
|
|
|
|
/* ^ */ |
745
|
|
|
|
|
|
|
#ifdef EC_R_UNSUPPORTED_FIELD |
746
|
1
|
|
|
|
|
|
*iv_return = EC_R_UNSUPPORTED_FIELD; |
747
|
1
|
|
|
|
|
|
return PERL_constant_ISIV; |
748
|
|
|
|
|
|
|
#else |
749
|
|
|
|
|
|
|
return PERL_constant_NOTDEF; |
750
|
|
|
|
|
|
|
#endif |
751
|
|
|
|
|
|
|
} |
752
|
0
|
|
|
|
|
|
break; |
753
|
|
|
|
|
|
|
case 'I': |
754
|
1
|
50
|
|
|
|
|
if (memEQ(name, "EC_R_POINT_AT_INFINITY", 22)) { |
755
|
|
|
|
|
|
|
/* ^ */ |
756
|
|
|
|
|
|
|
#ifdef EC_R_POINT_AT_INFINITY |
757
|
1
|
|
|
|
|
|
*iv_return = EC_R_POINT_AT_INFINITY; |
758
|
1
|
|
|
|
|
|
return PERL_constant_ISIV; |
759
|
|
|
|
|
|
|
#else |
760
|
|
|
|
|
|
|
return PERL_constant_NOTDEF; |
761
|
|
|
|
|
|
|
#endif |
762
|
|
|
|
|
|
|
} |
763
|
0
|
|
|
|
|
|
break; |
764
|
|
|
|
|
|
|
case 'N': |
765
|
1
|
50
|
|
|
|
|
if (memEQ(name, "EC_F_ECKEY_PRIV_ENCODE", 22)) { |
766
|
|
|
|
|
|
|
/* ^ */ |
767
|
|
|
|
|
|
|
#ifdef EC_F_ECKEY_PRIV_ENCODE |
768
|
1
|
|
|
|
|
|
*iv_return = EC_F_ECKEY_PRIV_ENCODE; |
769
|
1
|
|
|
|
|
|
return PERL_constant_ISIV; |
770
|
|
|
|
|
|
|
#else |
771
|
|
|
|
|
|
|
return PERL_constant_NOTDEF; |
772
|
|
|
|
|
|
|
#endif |
773
|
|
|
|
|
|
|
} |
774
|
0
|
|
|
|
|
|
break; |
775
|
|
|
|
|
|
|
case 'S': |
776
|
1
|
50
|
|
|
|
|
if (memEQ(name, "EC_R_NO_PARAMETERS_SET", 22)) { |
777
|
|
|
|
|
|
|
/* ^ */ |
778
|
|
|
|
|
|
|
#ifdef EC_R_NO_PARAMETERS_SET |
779
|
1
|
|
|
|
|
|
*iv_return = EC_R_NO_PARAMETERS_SET; |
780
|
1
|
|
|
|
|
|
return PERL_constant_ISIV; |
781
|
|
|
|
|
|
|
#else |
782
|
|
|
|
|
|
|
return PERL_constant_NOTDEF; |
783
|
|
|
|
|
|
|
#endif |
784
|
|
|
|
|
|
|
} |
785
|
0
|
|
|
|
|
|
break; |
786
|
|
|
|
|
|
|
} |
787
|
0
|
|
|
|
|
|
return PERL_constant_NOTFOUND; |
788
|
|
|
|
|
|
|
} |
789
|
|
|
|
|
|
|
|
790
|
|
|
|
|
|
|
static int |
791
|
12
|
|
|
|
|
|
constant_23 (pTHX_ const char *name, IV *iv_return) { |
792
|
|
|
|
|
|
|
/* When generated this function returned values for the list of names given |
793
|
|
|
|
|
|
|
here. However, subsequent manual editing may have added or removed some. |
794
|
|
|
|
|
|
|
EC_F_D2I_ECPKPARAMETERS EC_F_ECKEY_PARAM_DECODE EC_F_ECPARAMETERS_PRINT |
795
|
|
|
|
|
|
|
EC_F_EC_GROUP_GET_ORDER EC_F_EC_POINT_OCT2POINT EC_F_EC_POINT_POINT2OCT |
796
|
|
|
|
|
|
|
EC_F_I2D_ECPKPARAMETERS EC_F_OLD_EC_PRIV_DECODE EC_R_ASN1_UNKNOWN_FIELD |
797
|
|
|
|
|
|
|
EC_R_MISSING_PARAMETERS POINT_CONVERSION_HYBRID */ |
798
|
|
|
|
|
|
|
/* Offset 7 gives the best switch position. */ |
799
|
12
|
|
|
|
|
|
switch (name[7]) { |
800
|
|
|
|
|
|
|
case 'D': |
801
|
2
|
100
|
|
|
|
|
if (memEQ(name, "EC_F_I2D_ECPKPARAMETERS", 23)) { |
802
|
|
|
|
|
|
|
/* ^ */ |
803
|
|
|
|
|
|
|
#ifdef EC_F_I2D_ECPKPARAMETERS |
804
|
1
|
|
|
|
|
|
*iv_return = EC_F_I2D_ECPKPARAMETERS; |
805
|
1
|
|
|
|
|
|
return PERL_constant_ISIV; |
806
|
|
|
|
|
|
|
#else |
807
|
|
|
|
|
|
|
return PERL_constant_NOTDEF; |
808
|
|
|
|
|
|
|
#endif |
809
|
|
|
|
|
|
|
} |
810
|
1
|
50
|
|
|
|
|
if (memEQ(name, "EC_F_OLD_EC_PRIV_DECODE", 23)) { |
811
|
|
|
|
|
|
|
/* ^ */ |
812
|
|
|
|
|
|
|
#ifdef EC_F_OLD_EC_PRIV_DECODE |
813
|
1
|
|
|
|
|
|
*iv_return = EC_F_OLD_EC_PRIV_DECODE; |
814
|
1
|
|
|
|
|
|
return PERL_constant_ISIV; |
815
|
|
|
|
|
|
|
#else |
816
|
|
|
|
|
|
|
return PERL_constant_NOTDEF; |
817
|
|
|
|
|
|
|
#endif |
818
|
|
|
|
|
|
|
} |
819
|
0
|
|
|
|
|
|
break; |
820
|
|
|
|
|
|
|
case 'I': |
821
|
1
|
50
|
|
|
|
|
if (memEQ(name, "EC_F_D2I_ECPKPARAMETERS", 23)) { |
822
|
|
|
|
|
|
|
/* ^ */ |
823
|
|
|
|
|
|
|
#ifdef EC_F_D2I_ECPKPARAMETERS |
824
|
1
|
|
|
|
|
|
*iv_return = EC_F_D2I_ECPKPARAMETERS; |
825
|
1
|
|
|
|
|
|
return PERL_constant_ISIV; |
826
|
|
|
|
|
|
|
#else |
827
|
|
|
|
|
|
|
return PERL_constant_NOTDEF; |
828
|
|
|
|
|
|
|
#endif |
829
|
|
|
|
|
|
|
} |
830
|
0
|
|
|
|
|
|
break; |
831
|
|
|
|
|
|
|
case 'K': |
832
|
1
|
50
|
|
|
|
|
if (memEQ(name, "EC_F_ECKEY_PARAM_DECODE", 23)) { |
833
|
|
|
|
|
|
|
/* ^ */ |
834
|
|
|
|
|
|
|
#ifdef EC_F_ECKEY_PARAM_DECODE |
835
|
1
|
|
|
|
|
|
*iv_return = EC_F_ECKEY_PARAM_DECODE; |
836
|
1
|
|
|
|
|
|
return PERL_constant_ISIV; |
837
|
|
|
|
|
|
|
#else |
838
|
|
|
|
|
|
|
return PERL_constant_NOTDEF; |
839
|
|
|
|
|
|
|
#endif |
840
|
|
|
|
|
|
|
} |
841
|
0
|
|
|
|
|
|
break; |
842
|
|
|
|
|
|
|
case 'N': |
843
|
1
|
50
|
|
|
|
|
if (memEQ(name, "EC_R_ASN1_UNKNOWN_FIELD", 23)) { |
844
|
|
|
|
|
|
|
/* ^ */ |
845
|
|
|
|
|
|
|
#ifdef EC_R_ASN1_UNKNOWN_FIELD |
846
|
1
|
|
|
|
|
|
*iv_return = EC_R_ASN1_UNKNOWN_FIELD; |
847
|
1
|
|
|
|
|
|
return PERL_constant_ISIV; |
848
|
|
|
|
|
|
|
#else |
849
|
|
|
|
|
|
|
return PERL_constant_NOTDEF; |
850
|
|
|
|
|
|
|
#endif |
851
|
|
|
|
|
|
|
} |
852
|
0
|
|
|
|
|
|
break; |
853
|
|
|
|
|
|
|
case 'O': |
854
|
2
|
50
|
|
|
|
|
if (memEQ(name, "POINT_CONVERSION_HYBRID", 23)) { |
855
|
|
|
|
|
|
|
/* ^ */ |
856
|
2
|
|
|
|
|
|
*iv_return = POINT_CONVERSION_HYBRID; |
857
|
2
|
|
|
|
|
|
return PERL_constant_ISIV; |
858
|
|
|
|
|
|
|
} |
859
|
0
|
|
|
|
|
|
break; |
860
|
|
|
|
|
|
|
case 'P': |
861
|
1
|
50
|
|
|
|
|
if (memEQ(name, "EC_F_ECPARAMETERS_PRINT", 23)) { |
862
|
|
|
|
|
|
|
/* ^ */ |
863
|
|
|
|
|
|
|
#ifdef EC_F_ECPARAMETERS_PRINT |
864
|
1
|
|
|
|
|
|
*iv_return = EC_F_ECPARAMETERS_PRINT; |
865
|
1
|
|
|
|
|
|
return PERL_constant_ISIV; |
866
|
|
|
|
|
|
|
#else |
867
|
|
|
|
|
|
|
return PERL_constant_NOTDEF; |
868
|
|
|
|
|
|
|
#endif |
869
|
|
|
|
|
|
|
} |
870
|
0
|
|
|
|
|
|
break; |
871
|
|
|
|
|
|
|
case 'S': |
872
|
1
|
50
|
|
|
|
|
if (memEQ(name, "EC_R_MISSING_PARAMETERS", 23)) { |
873
|
|
|
|
|
|
|
/* ^ */ |
874
|
|
|
|
|
|
|
#ifdef EC_R_MISSING_PARAMETERS |
875
|
1
|
|
|
|
|
|
*iv_return = EC_R_MISSING_PARAMETERS; |
876
|
1
|
|
|
|
|
|
return PERL_constant_ISIV; |
877
|
|
|
|
|
|
|
#else |
878
|
|
|
|
|
|
|
return PERL_constant_NOTDEF; |
879
|
|
|
|
|
|
|
#endif |
880
|
|
|
|
|
|
|
} |
881
|
0
|
|
|
|
|
|
break; |
882
|
|
|
|
|
|
|
case '_': |
883
|
3
|
100
|
|
|
|
|
if (memEQ(name, "EC_F_EC_GROUP_GET_ORDER", 23)) { |
884
|
|
|
|
|
|
|
/* ^ */ |
885
|
|
|
|
|
|
|
#ifdef EC_F_EC_GROUP_GET_ORDER |
886
|
1
|
|
|
|
|
|
*iv_return = EC_F_EC_GROUP_GET_ORDER; |
887
|
1
|
|
|
|
|
|
return PERL_constant_ISIV; |
888
|
|
|
|
|
|
|
#else |
889
|
|
|
|
|
|
|
return PERL_constant_NOTDEF; |
890
|
|
|
|
|
|
|
#endif |
891
|
|
|
|
|
|
|
} |
892
|
2
|
100
|
|
|
|
|
if (memEQ(name, "EC_F_EC_POINT_OCT2POINT", 23)) { |
893
|
|
|
|
|
|
|
/* ^ */ |
894
|
|
|
|
|
|
|
#ifdef EC_F_EC_POINT_OCT2POINT |
895
|
1
|
|
|
|
|
|
*iv_return = EC_F_EC_POINT_OCT2POINT; |
896
|
1
|
|
|
|
|
|
return PERL_constant_ISIV; |
897
|
|
|
|
|
|
|
#else |
898
|
|
|
|
|
|
|
return PERL_constant_NOTDEF; |
899
|
|
|
|
|
|
|
#endif |
900
|
|
|
|
|
|
|
} |
901
|
1
|
50
|
|
|
|
|
if (memEQ(name, "EC_F_EC_POINT_POINT2OCT", 23)) { |
902
|
|
|
|
|
|
|
/* ^ */ |
903
|
|
|
|
|
|
|
#ifdef EC_F_EC_POINT_POINT2OCT |
904
|
1
|
|
|
|
|
|
*iv_return = EC_F_EC_POINT_POINT2OCT; |
905
|
1
|
|
|
|
|
|
return PERL_constant_ISIV; |
906
|
|
|
|
|
|
|
#else |
907
|
|
|
|
|
|
|
return PERL_constant_NOTDEF; |
908
|
|
|
|
|
|
|
#endif |
909
|
|
|
|
|
|
|
} |
910
|
0
|
|
|
|
|
|
break; |
911
|
|
|
|
|
|
|
} |
912
|
0
|
|
|
|
|
|
return PERL_constant_NOTFOUND; |
913
|
|
|
|
|
|
|
} |
914
|
|
|
|
|
|
|
|
915
|
|
|
|
|
|
|
static int |
916
|
9
|
|
|
|
|
|
constant_24 (pTHX_ const char *name, IV *iv_return) { |
917
|
|
|
|
|
|
|
/* When generated this function returned values for the list of names given |
918
|
|
|
|
|
|
|
here. However, subsequent manual editing may have added or removed some. |
919
|
|
|
|
|
|
|
EC_F_EC_ASN1_GROUP2CURVE EC_F_EC_EX_DATA_SET_DATA EC_F_EC_GROUP_GET_DEGREE |
920
|
|
|
|
|
|
|
EC_F_EC_KEY_GENERATE_KEY EC_R_INVALID_DIGEST_TYPE EC_R_INVALID_GROUP_ORDER |
921
|
|
|
|
|
|
|
EC_R_INVALID_PRIVATE_KEY EC_R_MISSING_PRIVATE_KEY EC_R_UNDEFINED_GENERATOR |
922
|
|
|
|
|
|
|
*/ |
923
|
|
|
|
|
|
|
/* Offset 9 gives the best switch position. */ |
924
|
9
|
|
|
|
|
|
switch (name[9]) { |
925
|
|
|
|
|
|
|
case 'E': |
926
|
1
|
50
|
|
|
|
|
if (memEQ(name, "EC_F_EC_KEY_GENERATE_KEY", 24)) { |
927
|
|
|
|
|
|
|
/* ^ */ |
928
|
|
|
|
|
|
|
#ifdef EC_F_EC_KEY_GENERATE_KEY |
929
|
1
|
|
|
|
|
|
*iv_return = EC_F_EC_KEY_GENERATE_KEY; |
930
|
1
|
|
|
|
|
|
return PERL_constant_ISIV; |
931
|
|
|
|
|
|
|
#else |
932
|
|
|
|
|
|
|
return PERL_constant_NOTDEF; |
933
|
|
|
|
|
|
|
#endif |
934
|
|
|
|
|
|
|
} |
935
|
0
|
|
|
|
|
|
break; |
936
|
|
|
|
|
|
|
case 'F': |
937
|
1
|
50
|
|
|
|
|
if (memEQ(name, "EC_R_UNDEFINED_GENERATOR", 24)) { |
938
|
|
|
|
|
|
|
/* ^ */ |
939
|
|
|
|
|
|
|
#ifdef EC_R_UNDEFINED_GENERATOR |
940
|
1
|
|
|
|
|
|
*iv_return = EC_R_UNDEFINED_GENERATOR; |
941
|
1
|
|
|
|
|
|
return PERL_constant_ISIV; |
942
|
|
|
|
|
|
|
#else |
943
|
|
|
|
|
|
|
return PERL_constant_NOTDEF; |
944
|
|
|
|
|
|
|
#endif |
945
|
|
|
|
|
|
|
} |
946
|
0
|
|
|
|
|
|
break; |
947
|
|
|
|
|
|
|
case 'I': |
948
|
1
|
50
|
|
|
|
|
if (memEQ(name, "EC_R_MISSING_PRIVATE_KEY", 24)) { |
949
|
|
|
|
|
|
|
/* ^ */ |
950
|
|
|
|
|
|
|
#ifdef EC_R_MISSING_PRIVATE_KEY |
951
|
1
|
|
|
|
|
|
*iv_return = EC_R_MISSING_PRIVATE_KEY; |
952
|
1
|
|
|
|
|
|
return PERL_constant_ISIV; |
953
|
|
|
|
|
|
|
#else |
954
|
|
|
|
|
|
|
return PERL_constant_NOTDEF; |
955
|
|
|
|
|
|
|
#endif |
956
|
|
|
|
|
|
|
} |
957
|
0
|
|
|
|
|
|
break; |
958
|
|
|
|
|
|
|
case 'L': |
959
|
3
|
100
|
|
|
|
|
if (memEQ(name, "EC_R_INVALID_DIGEST_TYPE", 24)) { |
960
|
|
|
|
|
|
|
/* ^ */ |
961
|
|
|
|
|
|
|
#ifdef EC_R_INVALID_DIGEST_TYPE |
962
|
1
|
|
|
|
|
|
*iv_return = EC_R_INVALID_DIGEST_TYPE; |
963
|
1
|
|
|
|
|
|
return PERL_constant_ISIV; |
964
|
|
|
|
|
|
|
#else |
965
|
|
|
|
|
|
|
return PERL_constant_NOTDEF; |
966
|
|
|
|
|
|
|
#endif |
967
|
|
|
|
|
|
|
} |
968
|
2
|
100
|
|
|
|
|
if (memEQ(name, "EC_R_INVALID_GROUP_ORDER", 24)) { |
969
|
|
|
|
|
|
|
/* ^ */ |
970
|
|
|
|
|
|
|
#ifdef EC_R_INVALID_GROUP_ORDER |
971
|
1
|
|
|
|
|
|
*iv_return = EC_R_INVALID_GROUP_ORDER; |
972
|
1
|
|
|
|
|
|
return PERL_constant_ISIV; |
973
|
|
|
|
|
|
|
#else |
974
|
|
|
|
|
|
|
return PERL_constant_NOTDEF; |
975
|
|
|
|
|
|
|
#endif |
976
|
|
|
|
|
|
|
} |
977
|
1
|
50
|
|
|
|
|
if (memEQ(name, "EC_R_INVALID_PRIVATE_KEY", 24)) { |
978
|
|
|
|
|
|
|
/* ^ */ |
979
|
|
|
|
|
|
|
#ifdef EC_R_INVALID_PRIVATE_KEY |
980
|
1
|
|
|
|
|
|
*iv_return = EC_R_INVALID_PRIVATE_KEY; |
981
|
1
|
|
|
|
|
|
return PERL_constant_ISIV; |
982
|
|
|
|
|
|
|
#else |
983
|
|
|
|
|
|
|
return PERL_constant_NOTDEF; |
984
|
|
|
|
|
|
|
#endif |
985
|
|
|
|
|
|
|
} |
986
|
0
|
|
|
|
|
|
break; |
987
|
|
|
|
|
|
|
case 'R': |
988
|
1
|
50
|
|
|
|
|
if (memEQ(name, "EC_F_EC_GROUP_GET_DEGREE", 24)) { |
989
|
|
|
|
|
|
|
/* ^ */ |
990
|
|
|
|
|
|
|
#ifdef EC_F_EC_GROUP_GET_DEGREE |
991
|
1
|
|
|
|
|
|
*iv_return = EC_F_EC_GROUP_GET_DEGREE; |
992
|
1
|
|
|
|
|
|
return PERL_constant_ISIV; |
993
|
|
|
|
|
|
|
#else |
994
|
|
|
|
|
|
|
return PERL_constant_NOTDEF; |
995
|
|
|
|
|
|
|
#endif |
996
|
|
|
|
|
|
|
} |
997
|
0
|
|
|
|
|
|
break; |
998
|
|
|
|
|
|
|
case 'S': |
999
|
1
|
50
|
|
|
|
|
if (memEQ(name, "EC_F_EC_ASN1_GROUP2CURVE", 24)) { |
1000
|
|
|
|
|
|
|
/* ^ */ |
1001
|
|
|
|
|
|
|
#ifdef EC_F_EC_ASN1_GROUP2CURVE |
1002
|
1
|
|
|
|
|
|
*iv_return = EC_F_EC_ASN1_GROUP2CURVE; |
1003
|
1
|
|
|
|
|
|
return PERL_constant_ISIV; |
1004
|
|
|
|
|
|
|
#else |
1005
|
|
|
|
|
|
|
return PERL_constant_NOTDEF; |
1006
|
|
|
|
|
|
|
#endif |
1007
|
|
|
|
|
|
|
} |
1008
|
0
|
|
|
|
|
|
break; |
1009
|
|
|
|
|
|
|
case 'X': |
1010
|
1
|
50
|
|
|
|
|
if (memEQ(name, "EC_F_EC_EX_DATA_SET_DATA", 24)) { |
1011
|
|
|
|
|
|
|
/* ^ */ |
1012
|
|
|
|
|
|
|
#ifdef EC_F_EC_EX_DATA_SET_DATA |
1013
|
1
|
|
|
|
|
|
*iv_return = EC_F_EC_EX_DATA_SET_DATA; |
1014
|
1
|
|
|
|
|
|
return PERL_constant_ISIV; |
1015
|
|
|
|
|
|
|
#else |
1016
|
|
|
|
|
|
|
return PERL_constant_NOTDEF; |
1017
|
|
|
|
|
|
|
#endif |
1018
|
|
|
|
|
|
|
} |
1019
|
0
|
|
|
|
|
|
break; |
1020
|
|
|
|
|
|
|
} |
1021
|
0
|
|
|
|
|
|
return PERL_constant_NOTFOUND; |
1022
|
|
|
|
|
|
|
} |
1023
|
|
|
|
|
|
|
|
1024
|
|
|
|
|
|
|
static int |
1025
|
5
|
|
|
|
|
|
constant_25 (pTHX_ const char *name, IV *iv_return) { |
1026
|
|
|
|
|
|
|
/* When generated this function returned values for the list of names given |
1027
|
|
|
|
|
|
|
here. However, subsequent manual editing may have added or removed some. |
1028
|
|
|
|
|
|
|
EC_F_ECPKPARAMETERS_PRINT EC_F_EC_POINT_IS_ON_CURVE |
1029
|
|
|
|
|
|
|
EC_F_EC_POINT_MAKE_AFFINE EC_R_DISCRIMINANT_IS_ZERO |
1030
|
|
|
|
|
|
|
EC_R_INCOMPATIBLE_OBJECTS */ |
1031
|
|
|
|
|
|
|
/* Offset 14 gives the best switch position. */ |
1032
|
5
|
|
|
|
|
|
switch (name[14]) { |
1033
|
|
|
|
|
|
|
case 'A': |
1034
|
1
|
50
|
|
|
|
|
if (memEQ(name, "EC_R_DISCRIMINANT_IS_ZERO", 25)) { |
1035
|
|
|
|
|
|
|
/* ^ */ |
1036
|
|
|
|
|
|
|
#ifdef EC_R_DISCRIMINANT_IS_ZERO |
1037
|
1
|
|
|
|
|
|
*iv_return = EC_R_DISCRIMINANT_IS_ZERO; |
1038
|
1
|
|
|
|
|
|
return PERL_constant_ISIV; |
1039
|
|
|
|
|
|
|
#else |
1040
|
|
|
|
|
|
|
return PERL_constant_NOTDEF; |
1041
|
|
|
|
|
|
|
#endif |
1042
|
|
|
|
|
|
|
} |
1043
|
0
|
|
|
|
|
|
break; |
1044
|
|
|
|
|
|
|
case 'B': |
1045
|
1
|
50
|
|
|
|
|
if (memEQ(name, "EC_R_INCOMPATIBLE_OBJECTS", 25)) { |
1046
|
|
|
|
|
|
|
/* ^ */ |
1047
|
|
|
|
|
|
|
#ifdef EC_R_INCOMPATIBLE_OBJECTS |
1048
|
1
|
|
|
|
|
|
*iv_return = EC_R_INCOMPATIBLE_OBJECTS; |
1049
|
1
|
|
|
|
|
|
return PERL_constant_ISIV; |
1050
|
|
|
|
|
|
|
#else |
1051
|
|
|
|
|
|
|
return PERL_constant_NOTDEF; |
1052
|
|
|
|
|
|
|
#endif |
1053
|
|
|
|
|
|
|
} |
1054
|
0
|
|
|
|
|
|
break; |
1055
|
|
|
|
|
|
|
case 'E': |
1056
|
1
|
50
|
|
|
|
|
if (memEQ(name, "EC_F_ECPKPARAMETERS_PRINT", 25)) { |
1057
|
|
|
|
|
|
|
/* ^ */ |
1058
|
|
|
|
|
|
|
#ifdef EC_F_ECPKPARAMETERS_PRINT |
1059
|
1
|
|
|
|
|
|
*iv_return = EC_F_ECPKPARAMETERS_PRINT; |
1060
|
1
|
|
|
|
|
|
return PERL_constant_ISIV; |
1061
|
|
|
|
|
|
|
#else |
1062
|
|
|
|
|
|
|
return PERL_constant_NOTDEF; |
1063
|
|
|
|
|
|
|
#endif |
1064
|
|
|
|
|
|
|
} |
1065
|
0
|
|
|
|
|
|
break; |
1066
|
|
|
|
|
|
|
case 'I': |
1067
|
1
|
50
|
|
|
|
|
if (memEQ(name, "EC_F_EC_POINT_IS_ON_CURVE", 25)) { |
1068
|
|
|
|
|
|
|
/* ^ */ |
1069
|
|
|
|
|
|
|
#ifdef EC_F_EC_POINT_IS_ON_CURVE |
1070
|
1
|
|
|
|
|
|
*iv_return = EC_F_EC_POINT_IS_ON_CURVE; |
1071
|
1
|
|
|
|
|
|
return PERL_constant_ISIV; |
1072
|
|
|
|
|
|
|
#else |
1073
|
|
|
|
|
|
|
return PERL_constant_NOTDEF; |
1074
|
|
|
|
|
|
|
#endif |
1075
|
|
|
|
|
|
|
} |
1076
|
0
|
|
|
|
|
|
break; |
1077
|
|
|
|
|
|
|
case 'M': |
1078
|
1
|
50
|
|
|
|
|
if (memEQ(name, "EC_F_EC_POINT_MAKE_AFFINE", 25)) { |
1079
|
|
|
|
|
|
|
/* ^ */ |
1080
|
|
|
|
|
|
|
#ifdef EC_F_EC_POINT_MAKE_AFFINE |
1081
|
1
|
|
|
|
|
|
*iv_return = EC_F_EC_POINT_MAKE_AFFINE; |
1082
|
1
|
|
|
|
|
|
return PERL_constant_ISIV; |
1083
|
|
|
|
|
|
|
#else |
1084
|
|
|
|
|
|
|
return PERL_constant_NOTDEF; |
1085
|
|
|
|
|
|
|
#endif |
1086
|
|
|
|
|
|
|
} |
1087
|
0
|
|
|
|
|
|
break; |
1088
|
|
|
|
|
|
|
} |
1089
|
0
|
|
|
|
|
|
return PERL_constant_NOTFOUND; |
1090
|
|
|
|
|
|
|
} |
1091
|
|
|
|
|
|
|
|
1092
|
|
|
|
|
|
|
static int |
1093
|
11
|
|
|
|
|
|
constant_26 (pTHX_ const char *name, IV *iv_return) { |
1094
|
|
|
|
|
|
|
/* When generated this function returned values for the list of names given |
1095
|
|
|
|
|
|
|
here. However, subsequent manual editing may have added or removed some. |
1096
|
|
|
|
|
|
|
EC_F_ECPARAMETERS_PRINT_FP EC_F_EC_ASN1_GROUP2FIELDID |
1097
|
|
|
|
|
|
|
EC_F_EC_GFP_MONT_FIELD_MUL EC_F_EC_GFP_MONT_FIELD_SQR |
1098
|
|
|
|
|
|
|
EC_F_EC_GFP_NIST_FIELD_MUL EC_F_EC_GFP_NIST_FIELD_SQR |
1099
|
|
|
|
|
|
|
EC_F_EC_GROUP_GET_COFACTOR EC_F_EC_POINTS_MAKE_AFFINE |
1100
|
|
|
|
|
|
|
EC_R_PASSED_NULL_PARAMETER EC_R_POINT_IS_NOT_ON_CURVE |
1101
|
|
|
|
|
|
|
OPENSSL_ECC_MAX_FIELD_BITS */ |
1102
|
|
|
|
|
|
|
/* Offset 24 gives the best switch position. */ |
1103
|
11
|
|
|
|
|
|
switch (name[24]) { |
1104
|
|
|
|
|
|
|
case 'E': |
1105
|
1
|
50
|
|
|
|
|
if (memEQ(name, "EC_R_PASSED_NULL_PARAMETER", 26)) { |
1106
|
|
|
|
|
|
|
/* ^ */ |
1107
|
|
|
|
|
|
|
#ifdef EC_R_PASSED_NULL_PARAMETER |
1108
|
1
|
|
|
|
|
|
*iv_return = EC_R_PASSED_NULL_PARAMETER; |
1109
|
1
|
|
|
|
|
|
return PERL_constant_ISIV; |
1110
|
|
|
|
|
|
|
#else |
1111
|
|
|
|
|
|
|
return PERL_constant_NOTDEF; |
1112
|
|
|
|
|
|
|
#endif |
1113
|
|
|
|
|
|
|
} |
1114
|
0
|
|
|
|
|
|
break; |
1115
|
|
|
|
|
|
|
case 'F': |
1116
|
1
|
50
|
|
|
|
|
if (memEQ(name, "EC_F_ECPARAMETERS_PRINT_FP", 26)) { |
1117
|
|
|
|
|
|
|
/* ^ */ |
1118
|
|
|
|
|
|
|
#ifdef EC_F_ECPARAMETERS_PRINT_FP |
1119
|
1
|
|
|
|
|
|
*iv_return = EC_F_ECPARAMETERS_PRINT_FP; |
1120
|
1
|
|
|
|
|
|
return PERL_constant_ISIV; |
1121
|
|
|
|
|
|
|
#else |
1122
|
|
|
|
|
|
|
return PERL_constant_NOTDEF; |
1123
|
|
|
|
|
|
|
#endif |
1124
|
|
|
|
|
|
|
} |
1125
|
0
|
|
|
|
|
|
break; |
1126
|
|
|
|
|
|
|
case 'I': |
1127
|
1
|
50
|
|
|
|
|
if (memEQ(name, "EC_F_EC_ASN1_GROUP2FIELDID", 26)) { |
1128
|
|
|
|
|
|
|
/* ^ */ |
1129
|
|
|
|
|
|
|
#ifdef EC_F_EC_ASN1_GROUP2FIELDID |
1130
|
1
|
|
|
|
|
|
*iv_return = EC_F_EC_ASN1_GROUP2FIELDID; |
1131
|
1
|
|
|
|
|
|
return PERL_constant_ISIV; |
1132
|
|
|
|
|
|
|
#else |
1133
|
|
|
|
|
|
|
return PERL_constant_NOTDEF; |
1134
|
|
|
|
|
|
|
#endif |
1135
|
|
|
|
|
|
|
} |
1136
|
0
|
|
|
|
|
|
break; |
1137
|
|
|
|
|
|
|
case 'N': |
1138
|
1
|
50
|
|
|
|
|
if (memEQ(name, "EC_F_EC_POINTS_MAKE_AFFINE", 26)) { |
1139
|
|
|
|
|
|
|
/* ^ */ |
1140
|
|
|
|
|
|
|
#ifdef EC_F_EC_POINTS_MAKE_AFFINE |
1141
|
1
|
|
|
|
|
|
*iv_return = EC_F_EC_POINTS_MAKE_AFFINE; |
1142
|
1
|
|
|
|
|
|
return PERL_constant_ISIV; |
1143
|
|
|
|
|
|
|
#else |
1144
|
|
|
|
|
|
|
return PERL_constant_NOTDEF; |
1145
|
|
|
|
|
|
|
#endif |
1146
|
|
|
|
|
|
|
} |
1147
|
0
|
|
|
|
|
|
break; |
1148
|
|
|
|
|
|
|
case 'O': |
1149
|
1
|
50
|
|
|
|
|
if (memEQ(name, "EC_F_EC_GROUP_GET_COFACTOR", 26)) { |
1150
|
|
|
|
|
|
|
/* ^ */ |
1151
|
|
|
|
|
|
|
#ifdef EC_F_EC_GROUP_GET_COFACTOR |
1152
|
1
|
|
|
|
|
|
*iv_return = EC_F_EC_GROUP_GET_COFACTOR; |
1153
|
1
|
|
|
|
|
|
return PERL_constant_ISIV; |
1154
|
|
|
|
|
|
|
#else |
1155
|
|
|
|
|
|
|
return PERL_constant_NOTDEF; |
1156
|
|
|
|
|
|
|
#endif |
1157
|
|
|
|
|
|
|
} |
1158
|
0
|
|
|
|
|
|
break; |
1159
|
|
|
|
|
|
|
case 'Q': |
1160
|
2
|
100
|
|
|
|
|
if (memEQ(name, "EC_F_EC_GFP_MONT_FIELD_SQR", 26)) { |
1161
|
|
|
|
|
|
|
/* ^ */ |
1162
|
|
|
|
|
|
|
#ifdef EC_F_EC_GFP_MONT_FIELD_SQR |
1163
|
1
|
|
|
|
|
|
*iv_return = EC_F_EC_GFP_MONT_FIELD_SQR; |
1164
|
1
|
|
|
|
|
|
return PERL_constant_ISIV; |
1165
|
|
|
|
|
|
|
#else |
1166
|
|
|
|
|
|
|
return PERL_constant_NOTDEF; |
1167
|
|
|
|
|
|
|
#endif |
1168
|
|
|
|
|
|
|
} |
1169
|
1
|
50
|
|
|
|
|
if (memEQ(name, "EC_F_EC_GFP_NIST_FIELD_SQR", 26)) { |
1170
|
|
|
|
|
|
|
/* ^ */ |
1171
|
|
|
|
|
|
|
#ifdef EC_F_EC_GFP_NIST_FIELD_SQR |
1172
|
1
|
|
|
|
|
|
*iv_return = EC_F_EC_GFP_NIST_FIELD_SQR; |
1173
|
1
|
|
|
|
|
|
return PERL_constant_ISIV; |
1174
|
|
|
|
|
|
|
#else |
1175
|
|
|
|
|
|
|
return PERL_constant_NOTDEF; |
1176
|
|
|
|
|
|
|
#endif |
1177
|
|
|
|
|
|
|
} |
1178
|
0
|
|
|
|
|
|
break; |
1179
|
|
|
|
|
|
|
case 'T': |
1180
|
1
|
50
|
|
|
|
|
if (memEQ(name, "OPENSSL_ECC_MAX_FIELD_BITS", 26)) { |
1181
|
|
|
|
|
|
|
/* ^ */ |
1182
|
|
|
|
|
|
|
#ifdef OPENSSL_ECC_MAX_FIELD_BITS |
1183
|
1
|
|
|
|
|
|
*iv_return = OPENSSL_ECC_MAX_FIELD_BITS; |
1184
|
1
|
|
|
|
|
|
return PERL_constant_ISIV; |
1185
|
|
|
|
|
|
|
#else |
1186
|
|
|
|
|
|
|
return PERL_constant_NOTDEF; |
1187
|
|
|
|
|
|
|
#endif |
1188
|
|
|
|
|
|
|
} |
1189
|
0
|
|
|
|
|
|
break; |
1190
|
|
|
|
|
|
|
case 'U': |
1191
|
2
|
100
|
|
|
|
|
if (memEQ(name, "EC_F_EC_GFP_MONT_FIELD_MUL", 26)) { |
1192
|
|
|
|
|
|
|
/* ^ */ |
1193
|
|
|
|
|
|
|
#ifdef EC_F_EC_GFP_MONT_FIELD_MUL |
1194
|
1
|
|
|
|
|
|
*iv_return = EC_F_EC_GFP_MONT_FIELD_MUL; |
1195
|
1
|
|
|
|
|
|
return PERL_constant_ISIV; |
1196
|
|
|
|
|
|
|
#else |
1197
|
|
|
|
|
|
|
return PERL_constant_NOTDEF; |
1198
|
|
|
|
|
|
|
#endif |
1199
|
|
|
|
|
|
|
} |
1200
|
1
|
50
|
|
|
|
|
if (memEQ(name, "EC_F_EC_GFP_NIST_FIELD_MUL", 26)) { |
1201
|
|
|
|
|
|
|
/* ^ */ |
1202
|
|
|
|
|
|
|
#ifdef EC_F_EC_GFP_NIST_FIELD_MUL |
1203
|
1
|
|
|
|
|
|
*iv_return = EC_F_EC_GFP_NIST_FIELD_MUL; |
1204
|
1
|
|
|
|
|
|
return PERL_constant_ISIV; |
1205
|
|
|
|
|
|
|
#else |
1206
|
|
|
|
|
|
|
return PERL_constant_NOTDEF; |
1207
|
|
|
|
|
|
|
#endif |
1208
|
|
|
|
|
|
|
} |
1209
|
0
|
|
|
|
|
|
break; |
1210
|
|
|
|
|
|
|
case 'V': |
1211
|
1
|
50
|
|
|
|
|
if (memEQ(name, "EC_R_POINT_IS_NOT_ON_CURVE", 26)) { |
1212
|
|
|
|
|
|
|
/* ^ */ |
1213
|
|
|
|
|
|
|
#ifdef EC_R_POINT_IS_NOT_ON_CURVE |
1214
|
1
|
|
|
|
|
|
*iv_return = EC_R_POINT_IS_NOT_ON_CURVE; |
1215
|
1
|
|
|
|
|
|
return PERL_constant_ISIV; |
1216
|
|
|
|
|
|
|
#else |
1217
|
|
|
|
|
|
|
return PERL_constant_NOTDEF; |
1218
|
|
|
|
|
|
|
#endif |
1219
|
|
|
|
|
|
|
} |
1220
|
0
|
|
|
|
|
|
break; |
1221
|
|
|
|
|
|
|
} |
1222
|
0
|
|
|
|
|
|
return PERL_constant_NOTFOUND; |
1223
|
|
|
|
|
|
|
} |
1224
|
|
|
|
|
|
|
|
1225
|
|
|
|
|
|
|
static int |
1226
|
6
|
|
|
|
|
|
constant_27 (pTHX_ const char *name, IV *iv_return) { |
1227
|
|
|
|
|
|
|
/* When generated this function returned values for the list of names given |
1228
|
|
|
|
|
|
|
here. However, subsequent manual editing may have added or removed some. |
1229
|
|
|
|
|
|
|
EC_F_EC_GROUP_GET_CURVE_GFP EC_F_EC_GROUP_NEW_FROM_DATA |
1230
|
|
|
|
|
|
|
EC_F_EC_GROUP_SET_CURVE_GFP EC_F_EC_GROUP_SET_GENERATOR |
1231
|
|
|
|
|
|
|
POINT_CONVERSION_COMPRESSED */ |
1232
|
|
|
|
|
|
|
/* Offset 20 gives the best switch position. */ |
1233
|
6
|
|
|
|
|
|
switch (name[20]) { |
1234
|
|
|
|
|
|
|
case 'N': |
1235
|
1
|
50
|
|
|
|
|
if (memEQ(name, "EC_F_EC_GROUP_SET_GENERATOR", 27)) { |
1236
|
|
|
|
|
|
|
/* ^ */ |
1237
|
|
|
|
|
|
|
#ifdef EC_F_EC_GROUP_SET_GENERATOR |
1238
|
1
|
|
|
|
|
|
*iv_return = EC_F_EC_GROUP_SET_GENERATOR; |
1239
|
1
|
|
|
|
|
|
return PERL_constant_ISIV; |
1240
|
|
|
|
|
|
|
#else |
1241
|
|
|
|
|
|
|
return PERL_constant_NOTDEF; |
1242
|
|
|
|
|
|
|
#endif |
1243
|
|
|
|
|
|
|
} |
1244
|
0
|
|
|
|
|
|
break; |
1245
|
|
|
|
|
|
|
case 'O': |
1246
|
1
|
50
|
|
|
|
|
if (memEQ(name, "EC_F_EC_GROUP_NEW_FROM_DATA", 27)) { |
1247
|
|
|
|
|
|
|
/* ^ */ |
1248
|
|
|
|
|
|
|
#ifdef EC_F_EC_GROUP_NEW_FROM_DATA |
1249
|
1
|
|
|
|
|
|
*iv_return = EC_F_EC_GROUP_NEW_FROM_DATA; |
1250
|
1
|
|
|
|
|
|
return PERL_constant_ISIV; |
1251
|
|
|
|
|
|
|
#else |
1252
|
|
|
|
|
|
|
return PERL_constant_NOTDEF; |
1253
|
|
|
|
|
|
|
#endif |
1254
|
|
|
|
|
|
|
} |
1255
|
0
|
|
|
|
|
|
break; |
1256
|
|
|
|
|
|
|
case 'P': |
1257
|
2
|
50
|
|
|
|
|
if (memEQ(name, "POINT_CONVERSION_COMPRESSED", 27)) { |
1258
|
|
|
|
|
|
|
/* ^ */ |
1259
|
2
|
|
|
|
|
|
*iv_return = POINT_CONVERSION_COMPRESSED; |
1260
|
2
|
|
|
|
|
|
return PERL_constant_ISIV; |
1261
|
|
|
|
|
|
|
} |
1262
|
0
|
|
|
|
|
|
break; |
1263
|
|
|
|
|
|
|
case 'R': |
1264
|
2
|
100
|
|
|
|
|
if (memEQ(name, "EC_F_EC_GROUP_GET_CURVE_GFP", 27)) { |
1265
|
|
|
|
|
|
|
/* ^ */ |
1266
|
|
|
|
|
|
|
#ifdef EC_F_EC_GROUP_GET_CURVE_GFP |
1267
|
1
|
|
|
|
|
|
*iv_return = EC_F_EC_GROUP_GET_CURVE_GFP; |
1268
|
1
|
|
|
|
|
|
return PERL_constant_ISIV; |
1269
|
|
|
|
|
|
|
#else |
1270
|
|
|
|
|
|
|
return PERL_constant_NOTDEF; |
1271
|
|
|
|
|
|
|
#endif |
1272
|
|
|
|
|
|
|
} |
1273
|
1
|
50
|
|
|
|
|
if (memEQ(name, "EC_F_EC_GROUP_SET_CURVE_GFP", 27)) { |
1274
|
|
|
|
|
|
|
/* ^ */ |
1275
|
|
|
|
|
|
|
#ifdef EC_F_EC_GROUP_SET_CURVE_GFP |
1276
|
1
|
|
|
|
|
|
*iv_return = EC_F_EC_GROUP_SET_CURVE_GFP; |
1277
|
1
|
|
|
|
|
|
return PERL_constant_ISIV; |
1278
|
|
|
|
|
|
|
#else |
1279
|
|
|
|
|
|
|
return PERL_constant_NOTDEF; |
1280
|
|
|
|
|
|
|
#endif |
1281
|
|
|
|
|
|
|
} |
1282
|
0
|
|
|
|
|
|
break; |
1283
|
|
|
|
|
|
|
} |
1284
|
0
|
|
|
|
|
|
return PERL_constant_NOTFOUND; |
1285
|
|
|
|
|
|
|
} |
1286
|
|
|
|
|
|
|
|
1287
|
|
|
|
|
|
|
static int |
1288
|
11
|
|
|
|
|
|
constant_28 (pTHX_ const char *name, IV *iv_return) { |
1289
|
|
|
|
|
|
|
/* When generated this function returned values for the list of names given |
1290
|
|
|
|
|
|
|
here. However, subsequent manual editing may have added or removed some. |
1291
|
|
|
|
|
|
|
EC_F_ECPKPARAMETERS_PRINT_FP EC_F_EC_GFP_SIMPLE_OCT2POINT |
1292
|
|
|
|
|
|
|
EC_F_EC_GFP_SIMPLE_POINT2OCT EC_F_EC_GROUP_GET0_GENERATOR |
1293
|
|
|
|
|
|
|
EC_F_EC_GROUP_GET_CURVE_GF2M EC_F_EC_GROUP_SET_CURVE_GF2M |
1294
|
|
|
|
|
|
|
EC_F_EC_GROUP_SET_EXTRA_DATA EC_F_EC_POINT_IS_AT_INFINITY |
1295
|
|
|
|
|
|
|
EC_F_EC_WNAF_PRECOMPUTE_MULT EC_R_INVALID_COMPRESSION_BIT |
1296
|
|
|
|
|
|
|
EC_R_INVALID_TRINOMIAL_BASIS */ |
1297
|
|
|
|
|
|
|
/* Offset 20 gives the best switch position. */ |
1298
|
11
|
|
|
|
|
|
switch (name[20]) { |
1299
|
|
|
|
|
|
|
case 'A': |
1300
|
1
|
50
|
|
|
|
|
if (memEQ(name, "EC_R_INVALID_TRINOMIAL_BASIS", 28)) { |
1301
|
|
|
|
|
|
|
/* ^ */ |
1302
|
|
|
|
|
|
|
#ifdef EC_R_INVALID_TRINOMIAL_BASIS |
1303
|
1
|
|
|
|
|
|
*iv_return = EC_R_INVALID_TRINOMIAL_BASIS; |
1304
|
1
|
|
|
|
|
|
return PERL_constant_ISIV; |
1305
|
|
|
|
|
|
|
#else |
1306
|
|
|
|
|
|
|
return PERL_constant_NOTDEF; |
1307
|
|
|
|
|
|
|
#endif |
1308
|
|
|
|
|
|
|
} |
1309
|
0
|
|
|
|
|
|
break; |
1310
|
|
|
|
|
|
|
case 'C': |
1311
|
1
|
50
|
|
|
|
|
if (memEQ(name, "EC_F_EC_GFP_SIMPLE_OCT2POINT", 28)) { |
1312
|
|
|
|
|
|
|
/* ^ */ |
1313
|
|
|
|
|
|
|
#ifdef EC_F_EC_GFP_SIMPLE_OCT2POINT |
1314
|
1
|
|
|
|
|
|
*iv_return = EC_F_EC_GFP_SIMPLE_OCT2POINT; |
1315
|
1
|
|
|
|
|
|
return PERL_constant_ISIV; |
1316
|
|
|
|
|
|
|
#else |
1317
|
|
|
|
|
|
|
return PERL_constant_NOTDEF; |
1318
|
|
|
|
|
|
|
#endif |
1319
|
|
|
|
|
|
|
} |
1320
|
0
|
|
|
|
|
|
break; |
1321
|
|
|
|
|
|
|
case 'E': |
1322
|
1
|
50
|
|
|
|
|
if (memEQ(name, "EC_F_EC_GROUP_GET0_GENERATOR", 28)) { |
1323
|
|
|
|
|
|
|
/* ^ */ |
1324
|
|
|
|
|
|
|
#ifdef EC_F_EC_GROUP_GET0_GENERATOR |
1325
|
1
|
|
|
|
|
|
*iv_return = EC_F_EC_GROUP_GET0_GENERATOR; |
1326
|
1
|
|
|
|
|
|
return PERL_constant_ISIV; |
1327
|
|
|
|
|
|
|
#else |
1328
|
|
|
|
|
|
|
return PERL_constant_NOTDEF; |
1329
|
|
|
|
|
|
|
#endif |
1330
|
|
|
|
|
|
|
} |
1331
|
0
|
|
|
|
|
|
break; |
1332
|
|
|
|
|
|
|
case 'I': |
1333
|
1
|
50
|
|
|
|
|
if (memEQ(name, "EC_F_EC_POINT_IS_AT_INFINITY", 28)) { |
1334
|
|
|
|
|
|
|
/* ^ */ |
1335
|
|
|
|
|
|
|
#ifdef EC_F_EC_POINT_IS_AT_INFINITY |
1336
|
1
|
|
|
|
|
|
*iv_return = EC_F_EC_POINT_IS_AT_INFINITY; |
1337
|
1
|
|
|
|
|
|
return PERL_constant_ISIV; |
1338
|
|
|
|
|
|
|
#else |
1339
|
|
|
|
|
|
|
return PERL_constant_NOTDEF; |
1340
|
|
|
|
|
|
|
#endif |
1341
|
|
|
|
|
|
|
} |
1342
|
0
|
|
|
|
|
|
break; |
1343
|
|
|
|
|
|
|
case 'O': |
1344
|
1
|
50
|
|
|
|
|
if (memEQ(name, "EC_F_EC_GFP_SIMPLE_POINT2OCT", 28)) { |
1345
|
|
|
|
|
|
|
/* ^ */ |
1346
|
|
|
|
|
|
|
#ifdef EC_F_EC_GFP_SIMPLE_POINT2OCT |
1347
|
1
|
|
|
|
|
|
*iv_return = EC_F_EC_GFP_SIMPLE_POINT2OCT; |
1348
|
1
|
|
|
|
|
|
return PERL_constant_ISIV; |
1349
|
|
|
|
|
|
|
#else |
1350
|
|
|
|
|
|
|
return PERL_constant_NOTDEF; |
1351
|
|
|
|
|
|
|
#endif |
1352
|
|
|
|
|
|
|
} |
1353
|
0
|
|
|
|
|
|
break; |
1354
|
|
|
|
|
|
|
case 'P': |
1355
|
1
|
50
|
|
|
|
|
if (memEQ(name, "EC_F_ECPKPARAMETERS_PRINT_FP", 28)) { |
1356
|
|
|
|
|
|
|
/* ^ */ |
1357
|
|
|
|
|
|
|
#ifdef EC_F_ECPKPARAMETERS_PRINT_FP |
1358
|
1
|
|
|
|
|
|
*iv_return = EC_F_ECPKPARAMETERS_PRINT_FP; |
1359
|
1
|
|
|
|
|
|
return PERL_constant_ISIV; |
1360
|
|
|
|
|
|
|
#else |
1361
|
|
|
|
|
|
|
return PERL_constant_NOTDEF; |
1362
|
|
|
|
|
|
|
#endif |
1363
|
|
|
|
|
|
|
} |
1364
|
0
|
|
|
|
|
|
break; |
1365
|
|
|
|
|
|
|
case 'R': |
1366
|
2
|
100
|
|
|
|
|
if (memEQ(name, "EC_F_EC_GROUP_GET_CURVE_GF2M", 28)) { |
1367
|
|
|
|
|
|
|
/* ^ */ |
1368
|
|
|
|
|
|
|
#ifdef EC_F_EC_GROUP_GET_CURVE_GF2M |
1369
|
1
|
|
|
|
|
|
*iv_return = EC_F_EC_GROUP_GET_CURVE_GF2M; |
1370
|
1
|
|
|
|
|
|
return PERL_constant_ISIV; |
1371
|
|
|
|
|
|
|
#else |
1372
|
|
|
|
|
|
|
return PERL_constant_NOTDEF; |
1373
|
|
|
|
|
|
|
#endif |
1374
|
|
|
|
|
|
|
} |
1375
|
1
|
50
|
|
|
|
|
if (memEQ(name, "EC_F_EC_GROUP_SET_CURVE_GF2M", 28)) { |
1376
|
|
|
|
|
|
|
/* ^ */ |
1377
|
|
|
|
|
|
|
#ifdef EC_F_EC_GROUP_SET_CURVE_GF2M |
1378
|
1
|
|
|
|
|
|
*iv_return = EC_F_EC_GROUP_SET_CURVE_GF2M; |
1379
|
1
|
|
|
|
|
|
return PERL_constant_ISIV; |
1380
|
|
|
|
|
|
|
#else |
1381
|
|
|
|
|
|
|
return PERL_constant_NOTDEF; |
1382
|
|
|
|
|
|
|
#endif |
1383
|
|
|
|
|
|
|
} |
1384
|
0
|
|
|
|
|
|
break; |
1385
|
|
|
|
|
|
|
case 'S': |
1386
|
1
|
50
|
|
|
|
|
if (memEQ(name, "EC_R_INVALID_COMPRESSION_BIT", 28)) { |
1387
|
|
|
|
|
|
|
/* ^ */ |
1388
|
|
|
|
|
|
|
#ifdef EC_R_INVALID_COMPRESSION_BIT |
1389
|
1
|
|
|
|
|
|
*iv_return = EC_R_INVALID_COMPRESSION_BIT; |
1390
|
1
|
|
|
|
|
|
return PERL_constant_ISIV; |
1391
|
|
|
|
|
|
|
#else |
1392
|
|
|
|
|
|
|
return PERL_constant_NOTDEF; |
1393
|
|
|
|
|
|
|
#endif |
1394
|
|
|
|
|
|
|
} |
1395
|
0
|
|
|
|
|
|
break; |
1396
|
|
|
|
|
|
|
case 'T': |
1397
|
1
|
50
|
|
|
|
|
if (memEQ(name, "EC_F_EC_GROUP_SET_EXTRA_DATA", 28)) { |
1398
|
|
|
|
|
|
|
/* ^ */ |
1399
|
|
|
|
|
|
|
#ifdef EC_F_EC_GROUP_SET_EXTRA_DATA |
1400
|
1
|
|
|
|
|
|
*iv_return = EC_F_EC_GROUP_SET_EXTRA_DATA; |
1401
|
1
|
|
|
|
|
|
return PERL_constant_ISIV; |
1402
|
|
|
|
|
|
|
#else |
1403
|
|
|
|
|
|
|
return PERL_constant_NOTDEF; |
1404
|
|
|
|
|
|
|
#endif |
1405
|
|
|
|
|
|
|
} |
1406
|
0
|
|
|
|
|
|
break; |
1407
|
|
|
|
|
|
|
case 'U': |
1408
|
1
|
50
|
|
|
|
|
if (memEQ(name, "EC_F_EC_WNAF_PRECOMPUTE_MULT", 28)) { |
1409
|
|
|
|
|
|
|
/* ^ */ |
1410
|
|
|
|
|
|
|
#ifdef EC_F_EC_WNAF_PRECOMPUTE_MULT |
1411
|
1
|
|
|
|
|
|
*iv_return = EC_F_EC_WNAF_PRECOMPUTE_MULT; |
1412
|
1
|
|
|
|
|
|
return PERL_constant_ISIV; |
1413
|
|
|
|
|
|
|
#else |
1414
|
|
|
|
|
|
|
return PERL_constant_NOTDEF; |
1415
|
|
|
|
|
|
|
#endif |
1416
|
|
|
|
|
|
|
} |
1417
|
0
|
|
|
|
|
|
break; |
1418
|
|
|
|
|
|
|
} |
1419
|
0
|
|
|
|
|
|
return PERL_constant_NOTFOUND; |
1420
|
|
|
|
|
|
|
} |
1421
|
|
|
|
|
|
|
|
1422
|
|
|
|
|
|
|
static int |
1423
|
11
|
|
|
|
|
|
constant_29 (pTHX_ const char *name, IV *iv_return) { |
1424
|
|
|
|
|
|
|
/* When generated this function returned values for the list of names given |
1425
|
|
|
|
|
|
|
here. However, subsequent manual editing may have added or removed some. |
1426
|
|
|
|
|
|
|
EC_F_EC_ASN1_GROUP2PARAMETERS EC_F_EC_ASN1_PARAMETERS2GROUP |
1427
|
|
|
|
|
|
|
EC_F_EC_GF2M_SIMPLE_OCT2POINT EC_F_EC_GF2M_SIMPLE_POINT2OCT |
1428
|
|
|
|
|
|
|
EC_F_EC_GFP_MONT_FIELD_DECODE EC_F_EC_GFP_MONT_FIELD_ENCODE |
1429
|
|
|
|
|
|
|
EC_F_EC_GROUP_PRECOMPUTE_MULT EC_F_EC_POINT_SET_TO_INFINITY |
1430
|
|
|
|
|
|
|
EC_R_INVALID_COMPRESSED_POINT POINT_CONVERSION_UNCOMPRESSED */ |
1431
|
|
|
|
|
|
|
/* Offset 21 gives the best switch position. */ |
1432
|
11
|
|
|
|
|
|
switch (name[21]) { |
1433
|
|
|
|
|
|
|
case 'C': |
1434
|
1
|
50
|
|
|
|
|
if (memEQ(name, "EC_F_EC_GF2M_SIMPLE_OCT2POINT", 29)) { |
1435
|
|
|
|
|
|
|
/* ^ */ |
1436
|
|
|
|
|
|
|
#ifdef EC_F_EC_GF2M_SIMPLE_OCT2POINT |
1437
|
1
|
|
|
|
|
|
*iv_return = EC_F_EC_GF2M_SIMPLE_OCT2POINT; |
1438
|
1
|
|
|
|
|
|
return PERL_constant_ISIV; |
1439
|
|
|
|
|
|
|
#else |
1440
|
|
|
|
|
|
|
return PERL_constant_NOTDEF; |
1441
|
|
|
|
|
|
|
#endif |
1442
|
|
|
|
|
|
|
} |
1443
|
0
|
|
|
|
|
|
break; |
1444
|
|
|
|
|
|
|
case 'D': |
1445
|
2
|
100
|
|
|
|
|
if (memEQ(name, "EC_F_EC_GFP_MONT_FIELD_DECODE", 29)) { |
1446
|
|
|
|
|
|
|
/* ^ */ |
1447
|
|
|
|
|
|
|
#ifdef EC_F_EC_GFP_MONT_FIELD_DECODE |
1448
|
1
|
|
|
|
|
|
*iv_return = EC_F_EC_GFP_MONT_FIELD_DECODE; |
1449
|
1
|
|
|
|
|
|
return PERL_constant_ISIV; |
1450
|
|
|
|
|
|
|
#else |
1451
|
|
|
|
|
|
|
return PERL_constant_NOTDEF; |
1452
|
|
|
|
|
|
|
#endif |
1453
|
|
|
|
|
|
|
} |
1454
|
1
|
50
|
|
|
|
|
if (memEQ(name, "EC_F_EC_GFP_MONT_FIELD_ENCODE", 29)) { |
1455
|
|
|
|
|
|
|
/* ^ */ |
1456
|
|
|
|
|
|
|
#ifdef EC_F_EC_GFP_MONT_FIELD_ENCODE |
1457
|
1
|
|
|
|
|
|
*iv_return = EC_F_EC_GFP_MONT_FIELD_ENCODE; |
1458
|
1
|
|
|
|
|
|
return PERL_constant_ISIV; |
1459
|
|
|
|
|
|
|
#else |
1460
|
|
|
|
|
|
|
return PERL_constant_NOTDEF; |
1461
|
|
|
|
|
|
|
#endif |
1462
|
|
|
|
|
|
|
} |
1463
|
0
|
|
|
|
|
|
break; |
1464
|
|
|
|
|
|
|
case 'E': |
1465
|
1
|
50
|
|
|
|
|
if (memEQ(name, "EC_R_INVALID_COMPRESSED_POINT", 29)) { |
1466
|
|
|
|
|
|
|
/* ^ */ |
1467
|
|
|
|
|
|
|
#ifdef EC_R_INVALID_COMPRESSED_POINT |
1468
|
1
|
|
|
|
|
|
*iv_return = EC_R_INVALID_COMPRESSED_POINT; |
1469
|
1
|
|
|
|
|
|
return PERL_constant_ISIV; |
1470
|
|
|
|
|
|
|
#else |
1471
|
|
|
|
|
|
|
return PERL_constant_NOTDEF; |
1472
|
|
|
|
|
|
|
#endif |
1473
|
|
|
|
|
|
|
} |
1474
|
0
|
|
|
|
|
|
break; |
1475
|
|
|
|
|
|
|
case 'I': |
1476
|
1
|
50
|
|
|
|
|
if (memEQ(name, "EC_F_EC_POINT_SET_TO_INFINITY", 29)) { |
1477
|
|
|
|
|
|
|
/* ^ */ |
1478
|
|
|
|
|
|
|
#ifdef EC_F_EC_POINT_SET_TO_INFINITY |
1479
|
1
|
|
|
|
|
|
*iv_return = EC_F_EC_POINT_SET_TO_INFINITY; |
1480
|
1
|
|
|
|
|
|
return PERL_constant_ISIV; |
1481
|
|
|
|
|
|
|
#else |
1482
|
|
|
|
|
|
|
return PERL_constant_NOTDEF; |
1483
|
|
|
|
|
|
|
#endif |
1484
|
|
|
|
|
|
|
} |
1485
|
0
|
|
|
|
|
|
break; |
1486
|
|
|
|
|
|
|
case 'M': |
1487
|
2
|
50
|
|
|
|
|
if (memEQ(name, "POINT_CONVERSION_UNCOMPRESSED", 29)) { |
1488
|
|
|
|
|
|
|
/* ^ */ |
1489
|
2
|
|
|
|
|
|
*iv_return = POINT_CONVERSION_UNCOMPRESSED; |
1490
|
2
|
|
|
|
|
|
return PERL_constant_ISIV; |
1491
|
|
|
|
|
|
|
} |
1492
|
0
|
|
|
|
|
|
break; |
1493
|
|
|
|
|
|
|
case 'O': |
1494
|
1
|
50
|
|
|
|
|
if (memEQ(name, "EC_F_EC_GF2M_SIMPLE_POINT2OCT", 29)) { |
1495
|
|
|
|
|
|
|
/* ^ */ |
1496
|
|
|
|
|
|
|
#ifdef EC_F_EC_GF2M_SIMPLE_POINT2OCT |
1497
|
1
|
|
|
|
|
|
*iv_return = EC_F_EC_GF2M_SIMPLE_POINT2OCT; |
1498
|
1
|
|
|
|
|
|
return PERL_constant_ISIV; |
1499
|
|
|
|
|
|
|
#else |
1500
|
|
|
|
|
|
|
return PERL_constant_NOTDEF; |
1501
|
|
|
|
|
|
|
#endif |
1502
|
|
|
|
|
|
|
} |
1503
|
0
|
|
|
|
|
|
break; |
1504
|
|
|
|
|
|
|
case 'R': |
1505
|
2
|
100
|
|
|
|
|
if (memEQ(name, "EC_F_EC_ASN1_GROUP2PARAMETERS", 29)) { |
1506
|
|
|
|
|
|
|
/* ^ */ |
1507
|
|
|
|
|
|
|
#ifdef EC_F_EC_ASN1_GROUP2PARAMETERS |
1508
|
1
|
|
|
|
|
|
*iv_return = EC_F_EC_ASN1_GROUP2PARAMETERS; |
1509
|
1
|
|
|
|
|
|
return PERL_constant_ISIV; |
1510
|
|
|
|
|
|
|
#else |
1511
|
|
|
|
|
|
|
return PERL_constant_NOTDEF; |
1512
|
|
|
|
|
|
|
#endif |
1513
|
|
|
|
|
|
|
} |
1514
|
1
|
50
|
|
|
|
|
if (memEQ(name, "EC_F_EC_ASN1_PARAMETERS2GROUP", 29)) { |
1515
|
|
|
|
|
|
|
/* ^ */ |
1516
|
|
|
|
|
|
|
#ifdef EC_F_EC_ASN1_PARAMETERS2GROUP |
1517
|
1
|
|
|
|
|
|
*iv_return = EC_F_EC_ASN1_PARAMETERS2GROUP; |
1518
|
1
|
|
|
|
|
|
return PERL_constant_ISIV; |
1519
|
|
|
|
|
|
|
#else |
1520
|
|
|
|
|
|
|
return PERL_constant_NOTDEF; |
1521
|
|
|
|
|
|
|
#endif |
1522
|
|
|
|
|
|
|
} |
1523
|
0
|
|
|
|
|
|
break; |
1524
|
|
|
|
|
|
|
case 'U': |
1525
|
1
|
50
|
|
|
|
|
if (memEQ(name, "EC_F_EC_GROUP_PRECOMPUTE_MULT", 29)) { |
1526
|
|
|
|
|
|
|
/* ^ */ |
1527
|
|
|
|
|
|
|
#ifdef EC_F_EC_GROUP_PRECOMPUTE_MULT |
1528
|
1
|
|
|
|
|
|
*iv_return = EC_F_EC_GROUP_PRECOMPUTE_MULT; |
1529
|
1
|
|
|
|
|
|
return PERL_constant_ISIV; |
1530
|
|
|
|
|
|
|
#else |
1531
|
|
|
|
|
|
|
return PERL_constant_NOTDEF; |
1532
|
|
|
|
|
|
|
#endif |
1533
|
|
|
|
|
|
|
} |
1534
|
0
|
|
|
|
|
|
break; |
1535
|
|
|
|
|
|
|
} |
1536
|
0
|
|
|
|
|
|
return PERL_constant_NOTFOUND; |
1537
|
|
|
|
|
|
|
} |
1538
|
|
|
|
|
|
|
|
1539
|
|
|
|
|
|
|
static int |
1540
|
8
|
|
|
|
|
|
constant_31 (pTHX_ const char *name, IV *iv_return) { |
1541
|
|
|
|
|
|
|
/* When generated this function returned values for the list of names given |
1542
|
|
|
|
|
|
|
here. However, subsequent manual editing may have added or removed some. |
1543
|
|
|
|
|
|
|
EC_F_EC_ASN1_GROUP2PKPARAMETERS EC_F_EC_ASN1_PKPARAMETERS2GROUP |
1544
|
|
|
|
|
|
|
EC_F_EC_GROUP_NEW_BY_CURVE_NAME EC_R_D2I_ECPKPARAMETERS_FAILURE |
1545
|
|
|
|
|
|
|
EC_R_GROUP2PKPARAMETERS_FAILURE EC_R_I2D_ECPKPARAMETERS_FAILURE |
1546
|
|
|
|
|
|
|
EC_R_NOT_A_SUPPORTED_NIST_PRIME EC_R_PKPARAMETERS2GROUP_FAILURE */ |
1547
|
|
|
|
|
|
|
/* Offset 10 gives the best switch position. */ |
1548
|
8
|
|
|
|
|
|
switch (name[10]) { |
1549
|
|
|
|
|
|
|
case '2': |
1550
|
1
|
50
|
|
|
|
|
if (memEQ(name, "EC_R_GROUP2PKPARAMETERS_FAILURE", 31)) { |
1551
|
|
|
|
|
|
|
/* ^ */ |
1552
|
|
|
|
|
|
|
#ifdef EC_R_GROUP2PKPARAMETERS_FAILURE |
1553
|
1
|
|
|
|
|
|
*iv_return = EC_R_GROUP2PKPARAMETERS_FAILURE; |
1554
|
1
|
|
|
|
|
|
return PERL_constant_ISIV; |
1555
|
|
|
|
|
|
|
#else |
1556
|
|
|
|
|
|
|
return PERL_constant_NOTDEF; |
1557
|
|
|
|
|
|
|
#endif |
1558
|
|
|
|
|
|
|
} |
1559
|
0
|
|
|
|
|
|
break; |
1560
|
|
|
|
|
|
|
case 'A': |
1561
|
1
|
50
|
|
|
|
|
if (memEQ(name, "EC_R_PKPARAMETERS2GROUP_FAILURE", 31)) { |
1562
|
|
|
|
|
|
|
/* ^ */ |
1563
|
|
|
|
|
|
|
#ifdef EC_R_PKPARAMETERS2GROUP_FAILURE |
1564
|
1
|
|
|
|
|
|
*iv_return = EC_R_PKPARAMETERS2GROUP_FAILURE; |
1565
|
1
|
|
|
|
|
|
return PERL_constant_ISIV; |
1566
|
|
|
|
|
|
|
#else |
1567
|
|
|
|
|
|
|
return PERL_constant_NOTDEF; |
1568
|
|
|
|
|
|
|
#endif |
1569
|
|
|
|
|
|
|
} |
1570
|
0
|
|
|
|
|
|
break; |
1571
|
|
|
|
|
|
|
case 'C': |
1572
|
2
|
100
|
|
|
|
|
if (memEQ(name, "EC_R_D2I_ECPKPARAMETERS_FAILURE", 31)) { |
1573
|
|
|
|
|
|
|
/* ^ */ |
1574
|
|
|
|
|
|
|
#ifdef EC_R_D2I_ECPKPARAMETERS_FAILURE |
1575
|
1
|
|
|
|
|
|
*iv_return = EC_R_D2I_ECPKPARAMETERS_FAILURE; |
1576
|
1
|
|
|
|
|
|
return PERL_constant_ISIV; |
1577
|
|
|
|
|
|
|
#else |
1578
|
|
|
|
|
|
|
return PERL_constant_NOTDEF; |
1579
|
|
|
|
|
|
|
#endif |
1580
|
|
|
|
|
|
|
} |
1581
|
1
|
50
|
|
|
|
|
if (memEQ(name, "EC_R_I2D_ECPKPARAMETERS_FAILURE", 31)) { |
1582
|
|
|
|
|
|
|
/* ^ */ |
1583
|
|
|
|
|
|
|
#ifdef EC_R_I2D_ECPKPARAMETERS_FAILURE |
1584
|
1
|
|
|
|
|
|
*iv_return = EC_R_I2D_ECPKPARAMETERS_FAILURE; |
1585
|
1
|
|
|
|
|
|
return PERL_constant_ISIV; |
1586
|
|
|
|
|
|
|
#else |
1587
|
|
|
|
|
|
|
return PERL_constant_NOTDEF; |
1588
|
|
|
|
|
|
|
#endif |
1589
|
|
|
|
|
|
|
} |
1590
|
0
|
|
|
|
|
|
break; |
1591
|
|
|
|
|
|
|
case 'N': |
1592
|
2
|
100
|
|
|
|
|
if (memEQ(name, "EC_F_EC_ASN1_GROUP2PKPARAMETERS", 31)) { |
1593
|
|
|
|
|
|
|
/* ^ */ |
1594
|
|
|
|
|
|
|
#ifdef EC_F_EC_ASN1_GROUP2PKPARAMETERS |
1595
|
1
|
|
|
|
|
|
*iv_return = EC_F_EC_ASN1_GROUP2PKPARAMETERS; |
1596
|
1
|
|
|
|
|
|
return PERL_constant_ISIV; |
1597
|
|
|
|
|
|
|
#else |
1598
|
|
|
|
|
|
|
return PERL_constant_NOTDEF; |
1599
|
|
|
|
|
|
|
#endif |
1600
|
|
|
|
|
|
|
} |
1601
|
1
|
50
|
|
|
|
|
if (memEQ(name, "EC_F_EC_ASN1_PKPARAMETERS2GROUP", 31)) { |
1602
|
|
|
|
|
|
|
/* ^ */ |
1603
|
|
|
|
|
|
|
#ifdef EC_F_EC_ASN1_PKPARAMETERS2GROUP |
1604
|
1
|
|
|
|
|
|
*iv_return = EC_F_EC_ASN1_PKPARAMETERS2GROUP; |
1605
|
1
|
|
|
|
|
|
return PERL_constant_ISIV; |
1606
|
|
|
|
|
|
|
#else |
1607
|
|
|
|
|
|
|
return PERL_constant_NOTDEF; |
1608
|
|
|
|
|
|
|
#endif |
1609
|
|
|
|
|
|
|
} |
1610
|
0
|
|
|
|
|
|
break; |
1611
|
|
|
|
|
|
|
case 'O': |
1612
|
1
|
50
|
|
|
|
|
if (memEQ(name, "EC_F_EC_GROUP_NEW_BY_CURVE_NAME", 31)) { |
1613
|
|
|
|
|
|
|
/* ^ */ |
1614
|
|
|
|
|
|
|
#ifdef EC_F_EC_GROUP_NEW_BY_CURVE_NAME |
1615
|
1
|
|
|
|
|
|
*iv_return = EC_F_EC_GROUP_NEW_BY_CURVE_NAME; |
1616
|
1
|
|
|
|
|
|
return PERL_constant_ISIV; |
1617
|
|
|
|
|
|
|
#else |
1618
|
|
|
|
|
|
|
return PERL_constant_NOTDEF; |
1619
|
|
|
|
|
|
|
#endif |
1620
|
|
|
|
|
|
|
} |
1621
|
0
|
|
|
|
|
|
break; |
1622
|
|
|
|
|
|
|
case '_': |
1623
|
1
|
50
|
|
|
|
|
if (memEQ(name, "EC_R_NOT_A_SUPPORTED_NIST_PRIME", 31)) { |
1624
|
|
|
|
|
|
|
/* ^ */ |
1625
|
|
|
|
|
|
|
#ifdef EC_R_NOT_A_SUPPORTED_NIST_PRIME |
1626
|
1
|
|
|
|
|
|
*iv_return = EC_R_NOT_A_SUPPORTED_NIST_PRIME; |
1627
|
1
|
|
|
|
|
|
return PERL_constant_ISIV; |
1628
|
|
|
|
|
|
|
#else |
1629
|
|
|
|
|
|
|
return PERL_constant_NOTDEF; |
1630
|
|
|
|
|
|
|
#endif |
1631
|
|
|
|
|
|
|
} |
1632
|
0
|
|
|
|
|
|
break; |
1633
|
|
|
|
|
|
|
} |
1634
|
0
|
|
|
|
|
|
return PERL_constant_NOTFOUND; |
1635
|
|
|
|
|
|
|
} |
1636
|
|
|
|
|
|
|
|
1637
|
|
|
|
|
|
|
static int |
1638
|
3
|
|
|
|
|
|
constant_32 (pTHX_ const char *name, IV *iv_return) { |
1639
|
|
|
|
|
|
|
/* When generated this function returned values for the list of names given |
1640
|
|
|
|
|
|
|
here. However, subsequent manual editing may have added or removed some. |
1641
|
|
|
|
|
|
|
EC_F_EC_GFP_MONT_GROUP_SET_CURVE EC_F_EC_GFP_NIST_GROUP_SET_CURVE |
1642
|
|
|
|
|
|
|
EC_F_EC_GROUP_CHECK_DISCRIMINANT */ |
1643
|
|
|
|
|
|
|
/* Offset 12 gives the best switch position. */ |
1644
|
3
|
|
|
|
|
|
switch (name[12]) { |
1645
|
|
|
|
|
|
|
case 'M': |
1646
|
1
|
50
|
|
|
|
|
if (memEQ(name, "EC_F_EC_GFP_MONT_GROUP_SET_CURVE", 32)) { |
1647
|
|
|
|
|
|
|
/* ^ */ |
1648
|
|
|
|
|
|
|
#ifdef EC_F_EC_GFP_MONT_GROUP_SET_CURVE |
1649
|
1
|
|
|
|
|
|
*iv_return = EC_F_EC_GFP_MONT_GROUP_SET_CURVE; |
1650
|
1
|
|
|
|
|
|
return PERL_constant_ISIV; |
1651
|
|
|
|
|
|
|
#else |
1652
|
|
|
|
|
|
|
return PERL_constant_NOTDEF; |
1653
|
|
|
|
|
|
|
#endif |
1654
|
|
|
|
|
|
|
} |
1655
|
0
|
|
|
|
|
|
break; |
1656
|
|
|
|
|
|
|
case 'N': |
1657
|
1
|
50
|
|
|
|
|
if (memEQ(name, "EC_F_EC_GFP_NIST_GROUP_SET_CURVE", 32)) { |
1658
|
|
|
|
|
|
|
/* ^ */ |
1659
|
|
|
|
|
|
|
#ifdef EC_F_EC_GFP_NIST_GROUP_SET_CURVE |
1660
|
1
|
|
|
|
|
|
*iv_return = EC_F_EC_GFP_NIST_GROUP_SET_CURVE; |
1661
|
1
|
|
|
|
|
|
return PERL_constant_ISIV; |
1662
|
|
|
|
|
|
|
#else |
1663
|
|
|
|
|
|
|
return PERL_constant_NOTDEF; |
1664
|
|
|
|
|
|
|
#endif |
1665
|
|
|
|
|
|
|
} |
1666
|
0
|
|
|
|
|
|
break; |
1667
|
|
|
|
|
|
|
case 'P': |
1668
|
1
|
50
|
|
|
|
|
if (memEQ(name, "EC_F_EC_GROUP_CHECK_DISCRIMINANT", 32)) { |
1669
|
|
|
|
|
|
|
/* ^ */ |
1670
|
|
|
|
|
|
|
#ifdef EC_F_EC_GROUP_CHECK_DISCRIMINANT |
1671
|
1
|
|
|
|
|
|
*iv_return = EC_F_EC_GROUP_CHECK_DISCRIMINANT; |
1672
|
1
|
|
|
|
|
|
return PERL_constant_ISIV; |
1673
|
|
|
|
|
|
|
#else |
1674
|
|
|
|
|
|
|
return PERL_constant_NOTDEF; |
1675
|
|
|
|
|
|
|
#endif |
1676
|
|
|
|
|
|
|
} |
1677
|
0
|
|
|
|
|
|
break; |
1678
|
|
|
|
|
|
|
} |
1679
|
0
|
|
|
|
|
|
return PERL_constant_NOTFOUND; |
1680
|
|
|
|
|
|
|
} |
1681
|
|
|
|
|
|
|
|
1682
|
|
|
|
|
|
|
static int |
1683
|
3
|
|
|
|
|
|
constant_33 (pTHX_ const char *name, IV *iv_return) { |
1684
|
|
|
|
|
|
|
/* When generated this function returned values for the list of names given |
1685
|
|
|
|
|
|
|
here. However, subsequent manual editing may have added or removed some. |
1686
|
|
|
|
|
|
|
EC_F_EC_GFP_MONT_FIELD_SET_TO_ONE EC_F_EC_GROUP_GET_TRINOMIAL_BASIS |
1687
|
|
|
|
|
|
|
EC_R_EC_GROUP_NEW_BY_NAME_FAILURE */ |
1688
|
|
|
|
|
|
|
/* Offset 30 gives the best switch position. */ |
1689
|
3
|
|
|
|
|
|
switch (name[30]) { |
1690
|
|
|
|
|
|
|
case 'O': |
1691
|
1
|
50
|
|
|
|
|
if (memEQ(name, "EC_F_EC_GFP_MONT_FIELD_SET_TO_ONE", 33)) { |
1692
|
|
|
|
|
|
|
/* ^ */ |
1693
|
|
|
|
|
|
|
#ifdef EC_F_EC_GFP_MONT_FIELD_SET_TO_ONE |
1694
|
1
|
|
|
|
|
|
*iv_return = EC_F_EC_GFP_MONT_FIELD_SET_TO_ONE; |
1695
|
1
|
|
|
|
|
|
return PERL_constant_ISIV; |
1696
|
|
|
|
|
|
|
#else |
1697
|
|
|
|
|
|
|
return PERL_constant_NOTDEF; |
1698
|
|
|
|
|
|
|
#endif |
1699
|
|
|
|
|
|
|
} |
1700
|
0
|
|
|
|
|
|
break; |
1701
|
|
|
|
|
|
|
case 'S': |
1702
|
1
|
50
|
|
|
|
|
if (memEQ(name, "EC_F_EC_GROUP_GET_TRINOMIAL_BASIS", 33)) { |
1703
|
|
|
|
|
|
|
/* ^ */ |
1704
|
|
|
|
|
|
|
#ifdef EC_F_EC_GROUP_GET_TRINOMIAL_BASIS |
1705
|
1
|
|
|
|
|
|
*iv_return = EC_F_EC_GROUP_GET_TRINOMIAL_BASIS; |
1706
|
1
|
|
|
|
|
|
return PERL_constant_ISIV; |
1707
|
|
|
|
|
|
|
#else |
1708
|
|
|
|
|
|
|
return PERL_constant_NOTDEF; |
1709
|
|
|
|
|
|
|
#endif |
1710
|
|
|
|
|
|
|
} |
1711
|
0
|
|
|
|
|
|
break; |
1712
|
|
|
|
|
|
|
case 'U': |
1713
|
1
|
50
|
|
|
|
|
if (memEQ(name, "EC_R_EC_GROUP_NEW_BY_NAME_FAILURE", 33)) { |
1714
|
|
|
|
|
|
|
/* ^ */ |
1715
|
|
|
|
|
|
|
#ifdef EC_R_EC_GROUP_NEW_BY_NAME_FAILURE |
1716
|
1
|
|
|
|
|
|
*iv_return = EC_R_EC_GROUP_NEW_BY_NAME_FAILURE; |
1717
|
1
|
|
|
|
|
|
return PERL_constant_ISIV; |
1718
|
|
|
|
|
|
|
#else |
1719
|
|
|
|
|
|
|
return PERL_constant_NOTDEF; |
1720
|
|
|
|
|
|
|
#endif |
1721
|
|
|
|
|
|
|
} |
1722
|
0
|
|
|
|
|
|
break; |
1723
|
|
|
|
|
|
|
} |
1724
|
0
|
|
|
|
|
|
return PERL_constant_NOTFOUND; |
1725
|
|
|
|
|
|
|
} |
1726
|
|
|
|
|
|
|
|
1727
|
|
|
|
|
|
|
static int |
1728
|
3
|
|
|
|
|
|
constant_35 (pTHX_ const char *name, IV *iv_return) { |
1729
|
|
|
|
|
|
|
/* When generated this function returned values for the list of names given |
1730
|
|
|
|
|
|
|
here. However, subsequent manual editing may have added or removed some. |
1731
|
|
|
|
|
|
|
EC_F_EC_GF2M_SIMPLE_GROUP_SET_CURVE EC_F_EC_GROUP_GET_PENTANOMIAL_BASIS |
1732
|
|
|
|
|
|
|
EVP_PKEY_CTRL_EC_PARAMGEN_CURVE_NID */ |
1733
|
|
|
|
|
|
|
/* Offset 24 gives the best switch position. */ |
1734
|
3
|
|
|
|
|
|
switch (name[24]) { |
1735
|
|
|
|
|
|
|
case 'N': |
1736
|
1
|
50
|
|
|
|
|
if (memEQ(name, "EVP_PKEY_CTRL_EC_PARAMGEN_CURVE_NID", 35)) { |
1737
|
|
|
|
|
|
|
/* ^ */ |
1738
|
|
|
|
|
|
|
#ifdef EVP_PKEY_CTRL_EC_PARAMGEN_CURVE_NID |
1739
|
1
|
|
|
|
|
|
*iv_return = EVP_PKEY_CTRL_EC_PARAMGEN_CURVE_NID; |
1740
|
1
|
|
|
|
|
|
return PERL_constant_ISIV; |
1741
|
|
|
|
|
|
|
#else |
1742
|
|
|
|
|
|
|
return PERL_constant_NOTDEF; |
1743
|
|
|
|
|
|
|
#endif |
1744
|
|
|
|
|
|
|
} |
1745
|
0
|
|
|
|
|
|
break; |
1746
|
|
|
|
|
|
|
case 'O': |
1747
|
1
|
50
|
|
|
|
|
if (memEQ(name, "EC_F_EC_GROUP_GET_PENTANOMIAL_BASIS", 35)) { |
1748
|
|
|
|
|
|
|
/* ^ */ |
1749
|
|
|
|
|
|
|
#ifdef EC_F_EC_GROUP_GET_PENTANOMIAL_BASIS |
1750
|
1
|
|
|
|
|
|
*iv_return = EC_F_EC_GROUP_GET_PENTANOMIAL_BASIS; |
1751
|
1
|
|
|
|
|
|
return PERL_constant_ISIV; |
1752
|
|
|
|
|
|
|
#else |
1753
|
|
|
|
|
|
|
return PERL_constant_NOTDEF; |
1754
|
|
|
|
|
|
|
#endif |
1755
|
|
|
|
|
|
|
} |
1756
|
0
|
|
|
|
|
|
break; |
1757
|
|
|
|
|
|
|
case 'P': |
1758
|
1
|
50
|
|
|
|
|
if (memEQ(name, "EC_F_EC_GF2M_SIMPLE_GROUP_SET_CURVE", 35)) { |
1759
|
|
|
|
|
|
|
/* ^ */ |
1760
|
|
|
|
|
|
|
#ifdef EC_F_EC_GF2M_SIMPLE_GROUP_SET_CURVE |
1761
|
1
|
|
|
|
|
|
*iv_return = EC_F_EC_GF2M_SIMPLE_GROUP_SET_CURVE; |
1762
|
1
|
|
|
|
|
|
return PERL_constant_ISIV; |
1763
|
|
|
|
|
|
|
#else |
1764
|
|
|
|
|
|
|
return PERL_constant_NOTDEF; |
1765
|
|
|
|
|
|
|
#endif |
1766
|
|
|
|
|
|
|
} |
1767
|
0
|
|
|
|
|
|
break; |
1768
|
|
|
|
|
|
|
} |
1769
|
0
|
|
|
|
|
|
return PERL_constant_NOTFOUND; |
1770
|
|
|
|
|
|
|
} |
1771
|
|
|
|
|
|
|
|
1772
|
|
|
|
|
|
|
static int |
1773
|
3
|
|
|
|
|
|
constant_38 (pTHX_ const char *name, IV *iv_return) { |
1774
|
|
|
|
|
|
|
/* When generated this function returned values for the list of names given |
1775
|
|
|
|
|
|
|
here. However, subsequent manual editing may have added or removed some. |
1776
|
|
|
|
|
|
|
EC_F_EC_GF2M_MONTGOMERY_POINT_MULTIPLY |
1777
|
|
|
|
|
|
|
EC_F_EC_GFP_SIMPLE_GROUP_SET_CURVE_GFP |
1778
|
|
|
|
|
|
|
EC_F_EC_GFP_SIMPLE_GROUP_SET_GENERATOR */ |
1779
|
|
|
|
|
|
|
/* Offset 31 gives the best switch position. */ |
1780
|
3
|
|
|
|
|
|
switch (name[31]) { |
1781
|
|
|
|
|
|
|
case 'N': |
1782
|
1
|
50
|
|
|
|
|
if (memEQ(name, "EC_F_EC_GFP_SIMPLE_GROUP_SET_GENERATOR", 38)) { |
1783
|
|
|
|
|
|
|
/* ^ */ |
1784
|
|
|
|
|
|
|
#ifdef EC_F_EC_GFP_SIMPLE_GROUP_SET_GENERATOR |
1785
|
1
|
|
|
|
|
|
*iv_return = EC_F_EC_GFP_SIMPLE_GROUP_SET_GENERATOR; |
1786
|
1
|
|
|
|
|
|
return PERL_constant_ISIV; |
1787
|
|
|
|
|
|
|
#else |
1788
|
|
|
|
|
|
|
return PERL_constant_NOTDEF; |
1789
|
|
|
|
|
|
|
#endif |
1790
|
|
|
|
|
|
|
} |
1791
|
0
|
|
|
|
|
|
break; |
1792
|
|
|
|
|
|
|
case 'R': |
1793
|
1
|
50
|
|
|
|
|
if (memEQ(name, "EC_F_EC_GFP_SIMPLE_GROUP_SET_CURVE_GFP", 38)) { |
1794
|
|
|
|
|
|
|
/* ^ */ |
1795
|
|
|
|
|
|
|
#ifdef EC_F_EC_GFP_SIMPLE_GROUP_SET_CURVE_GFP |
1796
|
1
|
|
|
|
|
|
*iv_return = EC_F_EC_GFP_SIMPLE_GROUP_SET_CURVE_GFP; |
1797
|
1
|
|
|
|
|
|
return PERL_constant_ISIV; |
1798
|
|
|
|
|
|
|
#else |
1799
|
|
|
|
|
|
|
return PERL_constant_NOTDEF; |
1800
|
|
|
|
|
|
|
#endif |
1801
|
|
|
|
|
|
|
} |
1802
|
0
|
|
|
|
|
|
break; |
1803
|
|
|
|
|
|
|
case 'U': |
1804
|
1
|
50
|
|
|
|
|
if (memEQ(name, "EC_F_EC_GF2M_MONTGOMERY_POINT_MULTIPLY", 38)) { |
1805
|
|
|
|
|
|
|
/* ^ */ |
1806
|
|
|
|
|
|
|
#ifdef EC_F_EC_GF2M_MONTGOMERY_POINT_MULTIPLY |
1807
|
1
|
|
|
|
|
|
*iv_return = EC_F_EC_GF2M_MONTGOMERY_POINT_MULTIPLY; |
1808
|
1
|
|
|
|
|
|
return PERL_constant_ISIV; |
1809
|
|
|
|
|
|
|
#else |
1810
|
|
|
|
|
|
|
return PERL_constant_NOTDEF; |
1811
|
|
|
|
|
|
|
#endif |
1812
|
|
|
|
|
|
|
} |
1813
|
0
|
|
|
|
|
|
break; |
1814
|
|
|
|
|
|
|
} |
1815
|
0
|
|
|
|
|
|
return PERL_constant_NOTFOUND; |
1816
|
|
|
|
|
|
|
} |
1817
|
|
|
|
|
|
|
|
1818
|
|
|
|
|
|
|
static int |
1819
|
4
|
|
|
|
|
|
constant_45 (pTHX_ const char *name, IV *iv_return) { |
1820
|
|
|
|
|
|
|
/* When generated this function returned values for the list of names given |
1821
|
|
|
|
|
|
|
here. However, subsequent manual editing may have added or removed some. |
1822
|
|
|
|
|
|
|
EC_F_EC_GFP_SIMPLE_SET_COMPRESSED_COORDINATES |
1823
|
|
|
|
|
|
|
EC_F_EC_POINT_GET_JPROJECTIVE_COORDINATES_GFP |
1824
|
|
|
|
|
|
|
EC_F_EC_POINT_SET_COMPRESSED_COORDINATES_GF2M |
1825
|
|
|
|
|
|
|
EC_F_EC_POINT_SET_JPROJECTIVE_COORDINATES_GFP */ |
1826
|
|
|
|
|
|
|
/* Offset 19 gives the best switch position. */ |
1827
|
4
|
|
|
|
|
|
switch (name[19]) { |
1828
|
|
|
|
|
|
|
case 'O': |
1829
|
1
|
50
|
|
|
|
|
if (memEQ(name, "EC_F_EC_POINT_SET_COMPRESSED_COORDINATES_GF2M", 45)) { |
1830
|
|
|
|
|
|
|
/* ^ */ |
1831
|
|
|
|
|
|
|
#ifdef EC_F_EC_POINT_SET_COMPRESSED_COORDINATES_GF2M |
1832
|
1
|
|
|
|
|
|
*iv_return = EC_F_EC_POINT_SET_COMPRESSED_COORDINATES_GF2M; |
1833
|
1
|
|
|
|
|
|
return PERL_constant_ISIV; |
1834
|
|
|
|
|
|
|
#else |
1835
|
|
|
|
|
|
|
return PERL_constant_NOTDEF; |
1836
|
|
|
|
|
|
|
#endif |
1837
|
|
|
|
|
|
|
} |
1838
|
0
|
|
|
|
|
|
break; |
1839
|
|
|
|
|
|
|
case 'P': |
1840
|
2
|
100
|
|
|
|
|
if (memEQ(name, "EC_F_EC_POINT_GET_JPROJECTIVE_COORDINATES_GFP", 45)) { |
1841
|
|
|
|
|
|
|
/* ^ */ |
1842
|
|
|
|
|
|
|
#ifdef EC_F_EC_POINT_GET_JPROJECTIVE_COORDINATES_GFP |
1843
|
1
|
|
|
|
|
|
*iv_return = EC_F_EC_POINT_GET_JPROJECTIVE_COORDINATES_GFP; |
1844
|
1
|
|
|
|
|
|
return PERL_constant_ISIV; |
1845
|
|
|
|
|
|
|
#else |
1846
|
|
|
|
|
|
|
return PERL_constant_NOTDEF; |
1847
|
|
|
|
|
|
|
#endif |
1848
|
|
|
|
|
|
|
} |
1849
|
1
|
50
|
|
|
|
|
if (memEQ(name, "EC_F_EC_POINT_SET_JPROJECTIVE_COORDINATES_GFP", 45)) { |
1850
|
|
|
|
|
|
|
/* ^ */ |
1851
|
|
|
|
|
|
|
#ifdef EC_F_EC_POINT_SET_JPROJECTIVE_COORDINATES_GFP |
1852
|
1
|
|
|
|
|
|
*iv_return = EC_F_EC_POINT_SET_JPROJECTIVE_COORDINATES_GFP; |
1853
|
1
|
|
|
|
|
|
return PERL_constant_ISIV; |
1854
|
|
|
|
|
|
|
#else |
1855
|
|
|
|
|
|
|
return PERL_constant_NOTDEF; |
1856
|
|
|
|
|
|
|
#endif |
1857
|
|
|
|
|
|
|
} |
1858
|
0
|
|
|
|
|
|
break; |
1859
|
|
|
|
|
|
|
case 'S': |
1860
|
1
|
50
|
|
|
|
|
if (memEQ(name, "EC_F_EC_GFP_SIMPLE_SET_COMPRESSED_COORDINATES", 45)) { |
1861
|
|
|
|
|
|
|
/* ^ */ |
1862
|
|
|
|
|
|
|
#ifdef EC_F_EC_GFP_SIMPLE_SET_COMPRESSED_COORDINATES |
1863
|
1
|
|
|
|
|
|
*iv_return = EC_F_EC_GFP_SIMPLE_SET_COMPRESSED_COORDINATES; |
1864
|
1
|
|
|
|
|
|
return PERL_constant_ISIV; |
1865
|
|
|
|
|
|
|
#else |
1866
|
|
|
|
|
|
|
return PERL_constant_NOTDEF; |
1867
|
|
|
|
|
|
|
#endif |
1868
|
|
|
|
|
|
|
} |
1869
|
0
|
|
|
|
|
|
break; |
1870
|
|
|
|
|
|
|
} |
1871
|
0
|
|
|
|
|
|
return PERL_constant_NOTFOUND; |
1872
|
|
|
|
|
|
|
} |
1873
|
|
|
|
|
|
|
|
1874
|
|
|
|
|
|
|
static int |
1875
|
176
|
|
|
|
|
|
constant (pTHX_ const char *name, STRLEN len, IV *iv_return) { |
1876
|
|
|
|
|
|
|
/* Initially switch on the length of the name. */ |
1877
|
|
|
|
|
|
|
/* When generated this function returned values for the list of names given |
1878
|
|
|
|
|
|
|
in this section of perl code. Rather than manually editing these functions |
1879
|
|
|
|
|
|
|
to add or remove constants, which would result in this comment and section |
1880
|
|
|
|
|
|
|
of code becoming inaccurate, we recommend that you edit this section of |
1881
|
|
|
|
|
|
|
code, and use it to regenerate a new set of constant functions which you |
1882
|
|
|
|
|
|
|
then use to replace the originals. |
1883
|
|
|
|
|
|
|
|
1884
|
|
|
|
|
|
|
Regenerate these constant functions by feeding this entire source file to |
1885
|
|
|
|
|
|
|
perl -x |
1886
|
|
|
|
|
|
|
|
1887
|
|
|
|
|
|
|
#!/usr/local/bin/perl -w |
1888
|
|
|
|
|
|
|
use ExtUtils::Constant qw (constant_types C_constant XS_constant); |
1889
|
|
|
|
|
|
|
|
1890
|
|
|
|
|
|
|
my $types = {map {($_, 1)} qw(IV)}; |
1891
|
|
|
|
|
|
|
my @names = (qw(EC_F_COMPUTE_WNAF EC_F_D2I_ECPARAMETERS EC_F_D2I_ECPKPARAMETERS |
1892
|
|
|
|
|
|
|
EC_F_D2I_ECPRIVATEKEY EC_F_DO_EC_KEY_PRINT EC_F_ECKEY_PARAM2TYPE |
1893
|
|
|
|
|
|
|
EC_F_ECKEY_PARAM_DECODE EC_F_ECKEY_PRIV_DECODE |
1894
|
|
|
|
|
|
|
EC_F_ECKEY_PRIV_ENCODE EC_F_ECKEY_PUB_DECODE |
1895
|
|
|
|
|
|
|
EC_F_ECKEY_PUB_ENCODE EC_F_ECKEY_TYPE2PARAM |
1896
|
|
|
|
|
|
|
EC_F_ECPARAMETERS_PRINT EC_F_ECPARAMETERS_PRINT_FP |
1897
|
|
|
|
|
|
|
EC_F_ECPKPARAMETERS_PRINT EC_F_ECPKPARAMETERS_PRINT_FP |
1898
|
|
|
|
|
|
|
EC_F_ECP_NIST_MOD_192 EC_F_ECP_NIST_MOD_224 |
1899
|
|
|
|
|
|
|
EC_F_ECP_NIST_MOD_256 EC_F_ECP_NIST_MOD_521 |
1900
|
|
|
|
|
|
|
EC_F_EC_ASN1_GROUP2CURVE EC_F_EC_ASN1_GROUP2FIELDID |
1901
|
|
|
|
|
|
|
EC_F_EC_ASN1_GROUP2PARAMETERS EC_F_EC_ASN1_GROUP2PKPARAMETERS |
1902
|
|
|
|
|
|
|
EC_F_EC_ASN1_PARAMETERS2GROUP EC_F_EC_ASN1_PKPARAMETERS2GROUP |
1903
|
|
|
|
|
|
|
EC_F_EC_EX_DATA_SET_DATA EC_F_EC_GF2M_MONTGOMERY_POINT_MULTIPLY |
1904
|
|
|
|
|
|
|
EC_F_EC_GF2M_SIMPLE_GROUP_CHECK_DISCRIMINANT |
1905
|
|
|
|
|
|
|
EC_F_EC_GF2M_SIMPLE_GROUP_SET_CURVE |
1906
|
|
|
|
|
|
|
EC_F_EC_GF2M_SIMPLE_OCT2POINT EC_F_EC_GF2M_SIMPLE_POINT2OCT |
1907
|
|
|
|
|
|
|
EC_F_EC_GF2M_SIMPLE_POINT_GET_AFFINE_COORDINATES |
1908
|
|
|
|
|
|
|
EC_F_EC_GF2M_SIMPLE_POINT_SET_AFFINE_COORDINATES |
1909
|
|
|
|
|
|
|
EC_F_EC_GF2M_SIMPLE_SET_COMPRESSED_COORDINATES |
1910
|
|
|
|
|
|
|
EC_F_EC_GFP_MONT_FIELD_DECODE EC_F_EC_GFP_MONT_FIELD_ENCODE |
1911
|
|
|
|
|
|
|
EC_F_EC_GFP_MONT_FIELD_MUL EC_F_EC_GFP_MONT_FIELD_SET_TO_ONE |
1912
|
|
|
|
|
|
|
EC_F_EC_GFP_MONT_FIELD_SQR EC_F_EC_GFP_MONT_GROUP_SET_CURVE |
1913
|
|
|
|
|
|
|
EC_F_EC_GFP_MONT_GROUP_SET_CURVE_GFP EC_F_EC_GFP_NIST_FIELD_MUL |
1914
|
|
|
|
|
|
|
EC_F_EC_GFP_NIST_FIELD_SQR EC_F_EC_GFP_NIST_GROUP_SET_CURVE |
1915
|
|
|
|
|
|
|
EC_F_EC_GFP_SIMPLE_GROUP_CHECK_DISCRIMINANT |
1916
|
|
|
|
|
|
|
EC_F_EC_GFP_SIMPLE_GROUP_SET_CURVE |
1917
|
|
|
|
|
|
|
EC_F_EC_GFP_SIMPLE_GROUP_SET_CURVE_GFP |
1918
|
|
|
|
|
|
|
EC_F_EC_GFP_SIMPLE_GROUP_SET_GENERATOR |
1919
|
|
|
|
|
|
|
EC_F_EC_GFP_SIMPLE_MAKE_AFFINE EC_F_EC_GFP_SIMPLE_OCT2POINT |
1920
|
|
|
|
|
|
|
EC_F_EC_GFP_SIMPLE_POINT2OCT |
1921
|
|
|
|
|
|
|
EC_F_EC_GFP_SIMPLE_POINTS_MAKE_AFFINE |
1922
|
|
|
|
|
|
|
EC_F_EC_GFP_SIMPLE_POINT_GET_AFFINE_COORDINATES |
1923
|
|
|
|
|
|
|
EC_F_EC_GFP_SIMPLE_POINT_GET_AFFINE_COORDINATES_GFP |
1924
|
|
|
|
|
|
|
EC_F_EC_GFP_SIMPLE_POINT_SET_AFFINE_COORDINATES |
1925
|
|
|
|
|
|
|
EC_F_EC_GFP_SIMPLE_POINT_SET_AFFINE_COORDINATES_GFP |
1926
|
|
|
|
|
|
|
EC_F_EC_GFP_SIMPLE_SET_COMPRESSED_COORDINATES |
1927
|
|
|
|
|
|
|
EC_F_EC_GFP_SIMPLE_SET_COMPRESSED_COORDINATES_GFP |
1928
|
|
|
|
|
|
|
EC_F_EC_GROUP_CHECK EC_F_EC_GROUP_CHECK_DISCRIMINANT |
1929
|
|
|
|
|
|
|
EC_F_EC_GROUP_COPY EC_F_EC_GROUP_GET0_GENERATOR |
1930
|
|
|
|
|
|
|
EC_F_EC_GROUP_GET_COFACTOR EC_F_EC_GROUP_GET_CURVE_GF2M |
1931
|
|
|
|
|
|
|
EC_F_EC_GROUP_GET_CURVE_GFP EC_F_EC_GROUP_GET_DEGREE |
1932
|
|
|
|
|
|
|
EC_F_EC_GROUP_GET_ORDER EC_F_EC_GROUP_GET_PENTANOMIAL_BASIS |
1933
|
|
|
|
|
|
|
EC_F_EC_GROUP_GET_TRINOMIAL_BASIS EC_F_EC_GROUP_NEW |
1934
|
|
|
|
|
|
|
EC_F_EC_GROUP_NEW_BY_CURVE_NAME EC_F_EC_GROUP_NEW_FROM_DATA |
1935
|
|
|
|
|
|
|
EC_F_EC_GROUP_PRECOMPUTE_MULT EC_F_EC_GROUP_SET_CURVE_GF2M |
1936
|
|
|
|
|
|
|
EC_F_EC_GROUP_SET_CURVE_GFP EC_F_EC_GROUP_SET_EXTRA_DATA |
1937
|
|
|
|
|
|
|
EC_F_EC_GROUP_SET_GENERATOR EC_F_EC_KEY_CHECK_KEY |
1938
|
|
|
|
|
|
|
EC_F_EC_KEY_COPY EC_F_EC_KEY_GENERATE_KEY EC_F_EC_KEY_NEW |
1939
|
|
|
|
|
|
|
EC_F_EC_KEY_PRINT EC_F_EC_KEY_PRINT_FP |
1940
|
|
|
|
|
|
|
EC_F_EC_POINTS_MAKE_AFFINE EC_F_EC_POINT_ADD EC_F_EC_POINT_CMP |
1941
|
|
|
|
|
|
|
EC_F_EC_POINT_COPY EC_F_EC_POINT_DBL |
1942
|
|
|
|
|
|
|
EC_F_EC_POINT_GET_AFFINE_COORDINATES_GF2M |
1943
|
|
|
|
|
|
|
EC_F_EC_POINT_GET_AFFINE_COORDINATES_GFP |
1944
|
|
|
|
|
|
|
EC_F_EC_POINT_GET_JPROJECTIVE_COORDINATES_GFP |
1945
|
|
|
|
|
|
|
EC_F_EC_POINT_INVERT EC_F_EC_POINT_IS_AT_INFINITY |
1946
|
|
|
|
|
|
|
EC_F_EC_POINT_IS_ON_CURVE EC_F_EC_POINT_MAKE_AFFINE |
1947
|
|
|
|
|
|
|
EC_F_EC_POINT_MUL EC_F_EC_POINT_NEW EC_F_EC_POINT_OCT2POINT |
1948
|
|
|
|
|
|
|
EC_F_EC_POINT_POINT2OCT |
1949
|
|
|
|
|
|
|
EC_F_EC_POINT_SET_AFFINE_COORDINATES_GF2M |
1950
|
|
|
|
|
|
|
EC_F_EC_POINT_SET_AFFINE_COORDINATES_GFP |
1951
|
|
|
|
|
|
|
EC_F_EC_POINT_SET_COMPRESSED_COORDINATES_GF2M |
1952
|
|
|
|
|
|
|
EC_F_EC_POINT_SET_COMPRESSED_COORDINATES_GFP |
1953
|
|
|
|
|
|
|
EC_F_EC_POINT_SET_JPROJECTIVE_COORDINATES_GFP |
1954
|
|
|
|
|
|
|
EC_F_EC_POINT_SET_TO_INFINITY EC_F_EC_PRE_COMP_DUP |
1955
|
|
|
|
|
|
|
EC_F_EC_PRE_COMP_NEW EC_F_EC_WNAF_MUL |
1956
|
|
|
|
|
|
|
EC_F_EC_WNAF_PRECOMPUTE_MULT EC_F_I2D_ECPARAMETERS |
1957
|
|
|
|
|
|
|
EC_F_I2D_ECPKPARAMETERS EC_F_I2D_ECPRIVATEKEY |
1958
|
|
|
|
|
|
|
EC_F_I2O_ECPUBLICKEY EC_F_O2I_ECPUBLICKEY |
1959
|
|
|
|
|
|
|
EC_F_OLD_EC_PRIV_DECODE EC_F_PKEY_EC_CTRL EC_F_PKEY_EC_CTRL_STR |
1960
|
|
|
|
|
|
|
EC_F_PKEY_EC_DERIVE EC_F_PKEY_EC_KEYGEN EC_F_PKEY_EC_PARAMGEN |
1961
|
|
|
|
|
|
|
EC_F_PKEY_EC_SIGN EC_PKEY_NO_PARAMETERS EC_PKEY_NO_PUBKEY |
1962
|
|
|
|
|
|
|
EC_R_ASN1_ERROR EC_R_ASN1_UNKNOWN_FIELD EC_R_BUFFER_TOO_SMALL |
1963
|
|
|
|
|
|
|
EC_R_D2I_ECPKPARAMETERS_FAILURE EC_R_DECODE_ERROR |
1964
|
|
|
|
|
|
|
EC_R_DISCRIMINANT_IS_ZERO EC_R_EC_GROUP_NEW_BY_NAME_FAILURE |
1965
|
|
|
|
|
|
|
EC_R_FIELD_TOO_LARGE EC_R_GROUP2PKPARAMETERS_FAILURE |
1966
|
|
|
|
|
|
|
EC_R_I2D_ECPKPARAMETERS_FAILURE EC_R_INCOMPATIBLE_OBJECTS |
1967
|
|
|
|
|
|
|
EC_R_INVALID_ARGUMENT EC_R_INVALID_COMPRESSED_POINT |
1968
|
|
|
|
|
|
|
EC_R_INVALID_COMPRESSION_BIT EC_R_INVALID_CURVE |
1969
|
|
|
|
|
|
|
EC_R_INVALID_DIGEST_TYPE EC_R_INVALID_ENCODING |
1970
|
|
|
|
|
|
|
EC_R_INVALID_FIELD EC_R_INVALID_FORM EC_R_INVALID_GROUP_ORDER |
1971
|
|
|
|
|
|
|
EC_R_INVALID_PENTANOMIAL_BASIS EC_R_INVALID_PRIVATE_KEY |
1972
|
|
|
|
|
|
|
EC_R_INVALID_TRINOMIAL_BASIS EC_R_KEYS_NOT_SET |
1973
|
|
|
|
|
|
|
EC_R_MISSING_PARAMETERS EC_R_MISSING_PRIVATE_KEY |
1974
|
|
|
|
|
|
|
EC_R_NOT_A_NIST_PRIME EC_R_NOT_A_SUPPORTED_NIST_PRIME |
1975
|
|
|
|
|
|
|
EC_R_NOT_IMPLEMENTED EC_R_NOT_INITIALIZED EC_R_NO_FIELD_MOD |
1976
|
|
|
|
|
|
|
EC_R_NO_PARAMETERS_SET EC_R_PASSED_NULL_PARAMETER |
1977
|
|
|
|
|
|
|
EC_R_PKPARAMETERS2GROUP_FAILURE EC_R_POINT_AT_INFINITY |
1978
|
|
|
|
|
|
|
EC_R_POINT_IS_NOT_ON_CURVE EC_R_SLOT_FULL |
1979
|
|
|
|
|
|
|
EC_R_UNDEFINED_GENERATOR EC_R_UNDEFINED_ORDER EC_R_UNKNOWN_GROUP |
1980
|
|
|
|
|
|
|
EC_R_UNKNOWN_ORDER EC_R_UNSUPPORTED_FIELD EC_R_WRONG_ORDER |
1981
|
|
|
|
|
|
|
EVP_PKEY_CTRL_EC_PARAMGEN_CURVE_NID OPENSSL_ECC_MAX_FIELD_BITS |
1982
|
|
|
|
|
|
|
OPENSSL_EC_NAMED_CURVE), |
1983
|
|
|
|
|
|
|
{name=>"POINT_CONVERSION_COMPRESSED", type=>"IV", macro=>"1"}, |
1984
|
|
|
|
|
|
|
{name=>"POINT_CONVERSION_HYBRID", type=>"IV", macro=>"1"}, |
1985
|
|
|
|
|
|
|
{name=>"POINT_CONVERSION_UNCOMPRESSED", type=>"IV", macro=>"1"}); |
1986
|
|
|
|
|
|
|
|
1987
|
|
|
|
|
|
|
print constant_types(), "\n"; # macro defs |
1988
|
|
|
|
|
|
|
foreach (C_constant ("Crypt::OpenSSL::EC", 'constant', 'IV', $types, undef, 3, @names) ) { |
1989
|
|
|
|
|
|
|
print $_, "\n"; # C constant subs |
1990
|
|
|
|
|
|
|
} |
1991
|
|
|
|
|
|
|
print "\n#### XS Section:\n"; |
1992
|
|
|
|
|
|
|
print XS_constant ("Crypt::OpenSSL::EC", $types); |
1993
|
|
|
|
|
|
|
__END__ |