OpenCoverage

ec_asn1.c

Absolute File Name:/home/opencoverage/opencoverage/guest-scripts/openssl/src/crypto/ec/ec_asn1.c
Switch to Source codePreprocessed file
LineSourceCount
1-
2int EC_GROUP_get_basis_type(const EC_GROUP *group)-
3{-
4 int i;-
5-
6 if (EC_METHOD_get_field_type(EC_GROUP_method_of(group)) !=
EC_METHOD_get_...group)) != 407Description
TRUEnever evaluated
FALSEnever evaluated
0
7 407
EC_METHOD_get_...group)) != 407Description
TRUEnever evaluated
FALSEnever evaluated
)
0
8-
9 return
never executed: return 0;
0;
never executed: return 0;
0
10-
11-
12 for (i = 0;-
13 i < (int)(sizeof(group->poly)/sizeof((group->poly)[0]))
i < (int)(size...up->poly)[0]))Description
TRUEnever evaluated
FALSEnever evaluated
&& group->poly[i] != 0
group->poly[i] != 0Description
TRUEnever evaluated
FALSEnever evaluated
;
0
14 i++)-
15 continue;
never executed: continue;
0
16-
17 if (i == 4
i == 4Description
TRUEnever evaluated
FALSEnever evaluated
)
0
18 return
never executed: return 683;
683;
never executed: return 683;
0
19 else if (i == 2
i == 2Description
TRUEnever evaluated
FALSEnever evaluated
)
0
20 return
never executed: return 682;
682;
never executed: return 682;
0
21 else-
22-
23 return
never executed: return 0;
0;
never executed: return 0;
0
24}-
25-
26-
27int EC_GROUP_get_trinomial_basis(const EC_GROUP *group, unsigned int *k)-
28{-
29 if (group ==
group == ((void *)0)Description
TRUEnever evaluated
FALSEnever evaluated
0
30 ((void *)0)
group == ((void *)0)Description
TRUEnever evaluated
FALSEnever evaluated
0
31 )-
32 return
never executed: return 0;
0;
never executed: return 0;
0
33-
34 if (EC_METHOD_get_field_type(EC_GROUP_method_of(group)) !=
EC_METHOD_get_...group)) != 407Description
TRUEnever evaluated
FALSEnever evaluated
0
35 407
EC_METHOD_get_...group)) != 407Description
TRUEnever evaluated
FALSEnever evaluated
0
36 || !((
(group->poly[0] != 0)Description
TRUEnever evaluated
FALSEnever evaluated
group->poly[0] != 0)
(group->poly[0] != 0)Description
TRUEnever evaluated
FALSEnever evaluated
&& (
(group->poly[1] != 0)Description
TRUEnever evaluated
FALSEnever evaluated
group->poly[1] != 0)
(group->poly[1] != 0)Description
TRUEnever evaluated
FALSEnever evaluated
0
37 && (
(group->poly[2] == 0)Description
TRUEnever evaluated
FALSEnever evaluated
group->poly[2] == 0)
(group->poly[2] == 0)Description
TRUEnever evaluated
FALSEnever evaluated
)) {
0
38 ERR_put_error(16,(194),((2|64)),__FILE__,52)-
39 ;-
40 return
never executed: return 0;
0;
never executed: return 0;
0
41 }-
42-
43 if (k
kDescription
TRUEnever evaluated
FALSEnever evaluated
)
0
44 *
never executed: *k = group->poly[1];
k = group->poly[1];
never executed: *k = group->poly[1];
0
45-
46 return
never executed: return 1;
1;
never executed: return 1;
0
47}-
48-
49int EC_GROUP_get_pentanomial_basis(const EC_GROUP *group, unsigned int *k1,-
50 unsigned int *k2, unsigned int *k3)-
51{-
52 if (group ==
group == ((void *)0)Description
TRUEnever evaluated
FALSEnever evaluated
0
53 ((void *)0)
group == ((void *)0)Description
TRUEnever evaluated
FALSEnever evaluated
0
54 )-
55 return
never executed: return 0;
0;
never executed: return 0;
0
56-
57 if (EC_METHOD_get_field_type(EC_GROUP_method_of(group)) !=
EC_METHOD_get_...group)) != 407Description
TRUEnever evaluated
FALSEnever evaluated
0
58 407
EC_METHOD_get_...group)) != 407Description
TRUEnever evaluated
FALSEnever evaluated
0
59 || !((
(group->poly[0] != 0)Description
TRUEnever evaluated
FALSEnever evaluated
group->poly[0] != 0)
(group->poly[0] != 0)Description
TRUEnever evaluated
FALSEnever evaluated
&& (
(group->poly[1] != 0)Description
TRUEnever evaluated
FALSEnever evaluated
group->poly[1] != 0)
(group->poly[1] != 0)Description
TRUEnever evaluated
FALSEnever evaluated
0
60 && (
(group->poly[2] != 0)Description
TRUEnever evaluated
FALSEnever evaluated
group->poly[2] != 0)
(group->poly[2] != 0)Description
TRUEnever evaluated
FALSEnever evaluated
&& (
(group->poly[3] != 0)Description
TRUEnever evaluated
FALSEnever evaluated
group->poly[3] != 0)
(group->poly[3] != 0)Description
TRUEnever evaluated
FALSEnever evaluated
0
61 && (
(group->poly[4] == 0)Description
TRUEnever evaluated
FALSEnever evaluated
group->poly[4] == 0)
(group->poly[4] == 0)Description
TRUEnever evaluated
FALSEnever evaluated
)) {
0
62 ERR_put_error(16,(193),((2|64)),__FILE__,74)-
63 ;-
64 return
never executed: return 0;
0;
never executed: return 0;
0
65 }-
66-
67 if (k1
k1Description
TRUEnever evaluated
FALSEnever evaluated
)
0
68 *
never executed: *k1 = group->poly[3];
k1 = group->poly[3];
never executed: *k1 = group->poly[3];
0
69 if (k2
k2Description
TRUEnever evaluated
FALSEnever evaluated
)
0
70 *
never executed: *k2 = group->poly[2];
k2 = group->poly[2];
never executed: *k2 = group->poly[2];
0
71 if (k3
k3Description
TRUEnever evaluated
FALSEnever evaluated
)
0
72 *
never executed: *k3 = group->poly[1];
k3 = group->poly[1];
never executed: *k3 = group->poly[1];
0
73-
74 return
never executed: return 1;
1;
never executed: return 1;
0
75}-
76-
77-
78-
79typedef struct x9_62_pentanomial_st {-
80 int32_t k1;-
81 int32_t k2;-
82 int32_t k3;-
83} X9_62_PENTANOMIAL;-
84-
85typedef struct x9_62_characteristic_two_st {-
86 int32_t m;-
87 ASN1_OBJECT *type;-
88 union {-
89 char *ptr;-
90-
91 ASN1_NULL *onBasis;-
92-
93 ASN1_INTEGER *tpBasis;-
94-
95 X9_62_PENTANOMIAL *ppBasis;-
96-
97 ASN1_TYPE *other;-
98 } p;-
99} X9_62_CHARACTERISTIC_TWO;-
100-
101typedef struct x9_62_fieldid_st {-
102 ASN1_OBJECT *fieldType;-
103 union {-
104 char *ptr;-
105-
106 ASN1_INTEGER *prime;-
107-
108 X9_62_CHARACTERISTIC_TWO *char_two;-
109-
110 ASN1_TYPE *other;-
111 } p;-
112} X9_62_FIELDID;-
113-
114typedef struct x9_62_curve_st {-
115 ASN1_OCTET_STRING *a;-
116 ASN1_OCTET_STRING *b;-
117 ASN1_BIT_STRING *seed;-
118} X9_62_CURVE;-
119-
120struct ec_parameters_st {-
121 int32_t version;-
122 X9_62_FIELDID *fieldID;-
123 X9_62_CURVE *curve;-
124 ASN1_OCTET_STRING *base;-
125 ASN1_INTEGER *order;-
126 ASN1_INTEGER *cofactor;-
127} ;-
128-
129struct ecpk_parameters_st {-
130 int type;-
131 union {-
132 ASN1_OBJECT *named_curve;-
133 ECPARAMETERS *parameters;-
134 ASN1_NULL *implicitlyCA;-
135 } value;-
136} ;-
137-
138-
139typedef struct ec_privatekey_st {-
140 int32_t version;-
141 ASN1_OCTET_STRING *privateKey;-
142 ECPKPARAMETERS *parameters;-
143 ASN1_BIT_STRING *publicKey;-
144} EC_PRIVATEKEY;-
145-
146-
147static const ASN1_TEMPLATE X9_62_PENTANOMIAL_seq_tt[] = {-
148 { ((0x1 << 12)), (0), -
149 __builtin_offsetof (-
150 X9_62_PENTANOMIAL-
151 , -
152 k1-
153 )-
154 , "k1", (&(INT32_it)) },-
155 { ((0x1 << 12)), (0), -
156 __builtin_offsetof (-
157 X9_62_PENTANOMIAL-
158 , -
159 k2-
160 )-
161 , "k2", (&(INT32_it)) },-
162 { ((0x1 << 12)), (0), -
163 __builtin_offsetof (-
164 X9_62_PENTANOMIAL-
165 , -
166 k3-
167 )-
168 , "k3", (&(INT32_it)) }-
169} ; static const ASN1_ITEM X9_62_PENTANOMIAL_it = { 0x1, 16, X9_62_PENTANOMIAL_seq_tt, sizeof(X9_62_PENTANOMIAL_seq_tt) / sizeof(ASN1_TEMPLATE), -
170 ((void *)0)-
171 , sizeof(X9_62_PENTANOMIAL), "X9_62_PENTANOMIAL" };-
172-
173X9_62_PENTANOMIAL *X9_62_PENTANOMIAL_new(void); void X9_62_PENTANOMIAL_free(X9_62_PENTANOMIAL *a);-
174X9_62_PENTANOMIAL *X9_62_PENTANOMIAL_new(void) { return
never executed: return (X9_62_PENTANOMIAL *)ASN1_item_new((&(X9_62_PENTANOMIAL_it)));
(X9_62_PENTANOMIAL *)ASN1_item_new((&(X9_62_PENTANOMIAL_it)));
never executed: return (X9_62_PENTANOMIAL *)ASN1_item_new((&(X9_62_PENTANOMIAL_it)));
} void X9_62_PENTANOMIAL_free(X9_62_PENTANOMIAL *a) { ASN1_item_free((ASN1_VALUE *)a, (&(X9_62_PENTANOMIAL_it))); }
never executed: end of block
0
175-
176static const ASN1_TEMPLATE char_two_def_tt = { (0), (0), -
177 __builtin_offsetof (-
178 X9_62_CHARACTERISTIC_TWO-
179 , -
180 p.other-
181 )-
182 , "p.other", (&(ASN1_ANY_it)) };-
183-
184static const ASN1_ADB_TABLE X9_62_CHARACTERISTIC_TWO_adbtbl[] = {-
185 {681, { (0), (0), -
186 __builtin_offsetof (-
187 X9_62_CHARACTERISTIC_TWO-
188 , -
189 p.onBasis-
190 )-
191 , "p.onBasis", (&(ASN1_NULL_it)) }},-
192 {682, { (0), (0), -
193 __builtin_offsetof (-
194 X9_62_CHARACTERISTIC_TWO-
195 , -
196 p.tpBasis-
197 )-
198 , "p.tpBasis", (&(ASN1_INTEGER_it)) }},-
199 {683, { (0), (0), -
200 __builtin_offsetof (-
201 X9_62_CHARACTERISTIC_TWO-
202 , -
203 p.ppBasis-
204 )-
205 , "p.ppBasis", (&(X9_62_PENTANOMIAL_it)) }}-
206} ; static const ASN1_ADB X9_62_CHARACTERISTIC_TWO_adb = { 0, -
207 __builtin_offsetof (-
208 X9_62_CHARACTERISTIC_TWO-
209 , -
210 type-
211 )-
212 , 0, X9_62_CHARACTERISTIC_TWO_adbtbl, sizeof(X9_62_CHARACTERISTIC_TWO_adbtbl) / sizeof(ASN1_ADB_TABLE), &char_two_def_tt, -
213 ((void *)0) -
214 };-
215-
216static const ASN1_TEMPLATE X9_62_CHARACTERISTIC_TWO_seq_tt[] = {-
217 { ((0x1 << 12)), (0), -
218 __builtin_offsetof (-
219 X9_62_CHARACTERISTIC_TWO-
220 , -
221 m-
222 )-
223 , "m", (&(INT32_it)) },-
224 { (0), (0), -
225 __builtin_offsetof (-
226 X9_62_CHARACTERISTIC_TWO-
227 , -
228 type-
229 )-
230 , "type", (&(ASN1_OBJECT_it)) },-
231 { (0x1<<8), -1, 0, "X9_62_CHARACTERISTIC_TWO", (const ASN1_ITEM *)&(X9_62_CHARACTERISTIC_TWO_adb) }-
232} ; static const ASN1_ITEM X9_62_CHARACTERISTIC_TWO_it = { 0x1, 16, X9_62_CHARACTERISTIC_TWO_seq_tt, sizeof(X9_62_CHARACTERISTIC_TWO_seq_tt) / sizeof(ASN1_TEMPLATE), -
233 ((void *)0)-
234 , sizeof(X9_62_CHARACTERISTIC_TWO), "X9_62_CHARACTERISTIC_TWO" };-
235-
236X9_62_CHARACTERISTIC_TWO *X9_62_CHARACTERISTIC_TWO_new(void); void X9_62_CHARACTERISTIC_TWO_free(X9_62_CHARACTERISTIC_TWO *a);-
237X9_62_CHARACTERISTIC_TWO *X9_62_CHARACTERISTIC_TWO_new(void) { return
never executed: return (X9_62_CHARACTERISTIC_TWO *)ASN1_item_new((&(X9_62_CHARACTERISTIC_TWO_it)));
(X9_62_CHARACTERISTIC_TWO *)ASN1_item_new((&(X9_62_CHARACTERISTIC_TWO_it)));
never executed: return (X9_62_CHARACTERISTIC_TWO *)ASN1_item_new((&(X9_62_CHARACTERISTIC_TWO_it)));
} void X9_62_CHARACTERISTIC_TWO_free(X9_62_CHARACTERISTIC_TWO *a) { ASN1_item_free((ASN1_VALUE *)a, (&(X9_62_CHARACTERISTIC_TWO_it))); }
never executed: end of block
0
238-
239static const ASN1_TEMPLATE fieldID_def_tt = { (0), (0), -
240 __builtin_offsetof (-
241 X9_62_FIELDID-
242 , -
243 p.other-
244 )-
245 , "p.other", (&(ASN1_ANY_it)) };-
246-
247static const ASN1_ADB_TABLE X9_62_FIELDID_adbtbl[] = {-
248 {406, { (0), (0), -
249 __builtin_offsetof (-
250 X9_62_FIELDID-
251 , -
252 p.prime-
253 )-
254 , "p.prime", (&(ASN1_INTEGER_it)) }},-
255 {407, { (0), (0), -
256 __builtin_offsetof (-
257 X9_62_FIELDID-
258 , -
259 p.char_two-
260 )-
261 , "p.char_two", (&(X9_62_CHARACTERISTIC_TWO_it)) }}-
262} ; static const ASN1_ADB X9_62_FIELDID_adb = { 0, -
263 __builtin_offsetof (-
264 X9_62_FIELDID-
265 , -
266 fieldType-
267 )-
268 , 0, X9_62_FIELDID_adbtbl, sizeof(X9_62_FIELDID_adbtbl) / sizeof(ASN1_ADB_TABLE), &fieldID_def_tt, -
269 ((void *)0) -
270 };-
271-
272static const ASN1_TEMPLATE X9_62_FIELDID_seq_tt[] = {-
273 { (0), (0), -
274 __builtin_offsetof (-
275 X9_62_FIELDID-
276 , -
277 fieldType-
278 )-
279 , "fieldType", (&(ASN1_OBJECT_it)) },-
280 { (0x1<<8), -1, 0, "X9_62_FIELDID", (const ASN1_ITEM *)&(X9_62_FIELDID_adb) }-
281} ; static const ASN1_ITEM X9_62_FIELDID_it = { 0x1, 16, X9_62_FIELDID_seq_tt, sizeof(X9_62_FIELDID_seq_tt) / sizeof(ASN1_TEMPLATE), -
282 ((void *)0)-
283 , sizeof(X9_62_FIELDID), "X9_62_FIELDID" };-
284-
285static const ASN1_TEMPLATE X9_62_CURVE_seq_tt[] = {-
286 { (0), (0), -
287 __builtin_offsetof (-
288 X9_62_CURVE-
289 , -
290 a-
291 )-
292 , "a", (&(ASN1_OCTET_STRING_it)) },-
293 { (0), (0), -
294 __builtin_offsetof (-
295 X9_62_CURVE-
296 , -
297 b-
298 )-
299 , "b", (&(ASN1_OCTET_STRING_it)) },-
300 { ((0x1)), (0), -
301 __builtin_offsetof (-
302 X9_62_CURVE-
303 , -
304 seed-
305 )-
306 , "seed", (&(ASN1_BIT_STRING_it)) }-
307} ; static const ASN1_ITEM X9_62_CURVE_it = { 0x1, 16, X9_62_CURVE_seq_tt, sizeof(X9_62_CURVE_seq_tt) / sizeof(ASN1_TEMPLATE), -
308 ((void *)0)-
309 , sizeof(X9_62_CURVE), "X9_62_CURVE" };-
310-
311static const ASN1_TEMPLATE ECPARAMETERS_seq_tt[] = {-
312 { ((0x1 << 12)), (0), -
313 __builtin_offsetof (-
314 ECPARAMETERS-
315 , -
316 version-
317 )-
318 , "version", (&(INT32_it)) },-
319 { (0), (0), -
320 __builtin_offsetof (-
321 ECPARAMETERS-
322 , -
323 fieldID-
324 )-
325 , "fieldID", (&(X9_62_FIELDID_it)) },-
326 { (0), (0), -
327 __builtin_offsetof (-
328 ECPARAMETERS-
329 , -
330 curve-
331 )-
332 , "curve", (&(X9_62_CURVE_it)) },-
333 { (0), (0), -
334 __builtin_offsetof (-
335 ECPARAMETERS-
336 , -
337 base-
338 )-
339 , "base", (&(ASN1_OCTET_STRING_it)) },-
340 { (0), (0), -
341 __builtin_offsetof (-
342 ECPARAMETERS-
343 , -
344 order-
345 )-
346 , "order", (&(ASN1_INTEGER_it)) },-
347 { ((0x1)), (0), -
348 __builtin_offsetof (-
349 ECPARAMETERS-
350 , -
351 cofactor-
352 )-
353 , "cofactor", (&(ASN1_INTEGER_it)) }-
354} ; const ASN1_ITEM ECPARAMETERS_it = { 0x1, 16, ECPARAMETERS_seq_tt, sizeof(ECPARAMETERS_seq_tt) / sizeof(ASN1_TEMPLATE), -
355 ((void *)0)-
356 , sizeof(ECPARAMETERS), "ECPARAMETERS" };-
357-
358ECPARAMETERS *ECPARAMETERS_new(void); void ECPARAMETERS_free(ECPARAMETERS *a);-
359ECPARAMETERS *ECPARAMETERS_new(void) { return
executed 47 times by 1 test: return (ECPARAMETERS *)ASN1_item_new((&(ECPARAMETERS_it)));
Executed by:
  • libcrypto.so.1.1
(ECPARAMETERS *)ASN1_item_new((&(ECPARAMETERS_it)));
executed 47 times by 1 test: return (ECPARAMETERS *)ASN1_item_new((&(ECPARAMETERS_it)));
Executed by:
  • libcrypto.so.1.1
} void ECPARAMETERS_free(ECPARAMETERS *a) { ASN1_item_free((ASN1_VALUE *)a, (&(ECPARAMETERS_it))); }
executed 1 time by 1 test: end of block
Executed by:
  • libcrypto.so.1.1
1-47
360-
361static const ASN1_TEMPLATE ECPKPARAMETERS_ch_tt[] = {-
362 { (0), (0), -
363 __builtin_offsetof (-
364 ECPKPARAMETERS-
365 , -
366 value.named_curve-
367 )-
368 , "value.named_curve", (&(ASN1_OBJECT_it)) },-
369 { (0), (0), -
370 __builtin_offsetof (-
371 ECPKPARAMETERS-
372 , -
373 value.parameters-
374 )-
375 , "value.parameters", (&(ECPARAMETERS_it)) },-
376 { (0), (0), -
377 __builtin_offsetof (-
378 ECPKPARAMETERS-
379 , -
380 value.implicitlyCA-
381 )-
382 , "value.implicitlyCA", (&(ASN1_NULL_it)) }-
383} ; const ASN1_ITEM ECPKPARAMETERS_it = { 0x2, -
384 __builtin_offsetof (-
385 ECPKPARAMETERS-
386 , -
387 type-
388 ) -
389 , ECPKPARAMETERS_ch_tt, sizeof(ECPKPARAMETERS_ch_tt) / sizeof(ASN1_TEMPLATE), -
390 ((void *)0)-
391 , sizeof(ECPKPARAMETERS), "ECPKPARAMETERS" };-
392-
393ECPKPARAMETERS *ECPKPARAMETERS_new(void); void ECPKPARAMETERS_free(ECPKPARAMETERS *a); ECPKPARAMETERS *d2i_ECPKPARAMETERS(ECPKPARAMETERS **a, const unsigned char **in, long len); int i2d_ECPKPARAMETERS(const ECPKPARAMETERS *a, unsigned char **out); extern const ASN1_ITEM ECPKPARAMETERS_it;-
394ECPKPARAMETERS *d2i_ECPKPARAMETERS(ECPKPARAMETERS **a, const unsigned char **in, long len); int i2d_ECPKPARAMETERS(const ECPKPARAMETERS *a, unsigned char **out); extern const ASN1_ITEM ECPKPARAMETERS_it;-
395ECPKPARAMETERS *d2i_ECPKPARAMETERS(ECPKPARAMETERS **a, const unsigned char **in, long len) { return
executed 8699 times by 1 test: return (ECPKPARAMETERS *)ASN1_item_d2i((ASN1_VALUE **)a, in, len, (&(ECPKPARAMETERS_it)));
Executed by:
  • libcrypto.so.1.1
(ECPKPARAMETERS *)ASN1_item_d2i((ASN1_VALUE **)a, in, len, (&(ECPKPARAMETERS_it)));
executed 8699 times by 1 test: return (ECPKPARAMETERS *)ASN1_item_d2i((ASN1_VALUE **)a, in, len, (&(ECPKPARAMETERS_it)));
Executed by:
  • libcrypto.so.1.1
} int i2d_ECPKPARAMETERS(const ECPKPARAMETERS *a, unsigned char **out) { return
executed 48 times by 1 test: return ASN1_item_i2d((ASN1_VALUE *)a, out, (&(ECPKPARAMETERS_it)));
Executed by:
  • libcrypto.so.1.1
ASN1_item_i2d((ASN1_VALUE *)a, out, (&(ECPKPARAMETERS_it)));
executed 48 times by 1 test: return ASN1_item_i2d((ASN1_VALUE *)a, out, (&(ECPKPARAMETERS_it)));
Executed by:
  • libcrypto.so.1.1
} ECPKPARAMETERS *ECPKPARAMETERS_new(void) { return
executed 254 times by 1 test: return (ECPKPARAMETERS *)ASN1_item_new((&(ECPKPARAMETERS_it)));
Executed by:
  • libcrypto.so.1.1
(ECPKPARAMETERS *)ASN1_item_new((&(ECPKPARAMETERS_it)));
executed 254 times by 1 test: return (ECPKPARAMETERS *)ASN1_item_new((&(ECPKPARAMETERS_it)));
Executed by:
  • libcrypto.so.1.1
} void ECPKPARAMETERS_free(ECPKPARAMETERS *a) { ASN1_item_free((ASN1_VALUE *)a, (&(ECPKPARAMETERS_it))); }
executed 8747 times by 1 test: end of block
Executed by:
  • libcrypto.so.1.1
48-8747
396-
397static const ASN1_TEMPLATE EC_PRIVATEKEY_seq_tt[] = {-
398 { ((0x1 << 12)), (0), -
399 __builtin_offsetof (-
400 EC_PRIVATEKEY-
401 , -
402 version-
403 )-
404 , "version", (&(INT32_it)) },-
405 { (0), (0), -
406 __builtin_offsetof (-
407 EC_PRIVATEKEY-
408 , -
409 privateKey-
410 )-
411 , "privateKey", (&(ASN1_OCTET_STRING_it)) },-
412 { (((0x2 << 3)|(0x2<<6)) | ((0x1))), (0), -
413 __builtin_offsetof (-
414 EC_PRIVATEKEY-
415 , -
416 parameters-
417 )-
418 , "parameters", (&(ECPKPARAMETERS_it)) },-
419 { (((0x2 << 3)|(0x2<<6)) | ((0x1))), (1), -
420 __builtin_offsetof (-
421 EC_PRIVATEKEY-
422 , -
423 publicKey-
424 )-
425 , "publicKey", (&(ASN1_BIT_STRING_it)) }-
426} ; static const ASN1_ITEM EC_PRIVATEKEY_it = { 0x1, 16, EC_PRIVATEKEY_seq_tt, sizeof(EC_PRIVATEKEY_seq_tt) / sizeof(ASN1_TEMPLATE), -
427 ((void *)0)-
428 , sizeof(EC_PRIVATEKEY), "EC_PRIVATEKEY" };-
429-
430EC_PRIVATEKEY *EC_PRIVATEKEY_new(void); void EC_PRIVATEKEY_free(EC_PRIVATEKEY *a); EC_PRIVATEKEY *d2i_EC_PRIVATEKEY(EC_PRIVATEKEY **a, const unsigned char **in, long len); int i2d_EC_PRIVATEKEY(const EC_PRIVATEKEY *a, unsigned char **out); extern const ASN1_ITEM EC_PRIVATEKEY_it;-
431EC_PRIVATEKEY *d2i_EC_PRIVATEKEY(EC_PRIVATEKEY **a, const unsigned char **in, long len); int i2d_EC_PRIVATEKEY(const EC_PRIVATEKEY *a, unsigned char **out); extern const ASN1_ITEM EC_PRIVATEKEY_it;-
432EC_PRIVATEKEY *d2i_EC_PRIVATEKEY(EC_PRIVATEKEY **a, const unsigned char **in, long len) { return
executed 6352 times by 1 test: return (EC_PRIVATEKEY *)ASN1_item_d2i((ASN1_VALUE **)a, in, len, (&(EC_PRIVATEKEY_it)));
Executed by:
  • libcrypto.so.1.1
(EC_PRIVATEKEY *)ASN1_item_d2i((ASN1_VALUE **)a, in, len, (&(EC_PRIVATEKEY_it)));
executed 6352 times by 1 test: return (EC_PRIVATEKEY *)ASN1_item_d2i((ASN1_VALUE **)a, in, len, (&(EC_PRIVATEKEY_it)));
Executed by:
  • libcrypto.so.1.1
} int i2d_EC_PRIVATEKEY(const EC_PRIVATEKEY *a, unsigned char **out) { return
executed 216 times by 1 test: return ASN1_item_i2d((ASN1_VALUE *)a, out, (&(EC_PRIVATEKEY_it)));
Executed by:
  • libcrypto.so.1.1
ASN1_item_i2d((ASN1_VALUE *)a, out, (&(EC_PRIVATEKEY_it)));
executed 216 times by 1 test: return ASN1_item_i2d((ASN1_VALUE *)a, out, (&(EC_PRIVATEKEY_it)));
Executed by:
  • libcrypto.so.1.1
} EC_PRIVATEKEY *EC_PRIVATEKEY_new(void) { return
executed 255 times by 1 test: return (EC_PRIVATEKEY *)ASN1_item_new((&(EC_PRIVATEKEY_it)));
Executed by:
  • libcrypto.so.1.1
(EC_PRIVATEKEY *)ASN1_item_new((&(EC_PRIVATEKEY_it)));
executed 255 times by 1 test: return (EC_PRIVATEKEY *)ASN1_item_new((&(EC_PRIVATEKEY_it)));
Executed by:
  • libcrypto.so.1.1
} void EC_PRIVATEKEY_free(EC_PRIVATEKEY *a) { ASN1_item_free((ASN1_VALUE *)a, (&(EC_PRIVATEKEY_it))); }
executed 3315 times by 1 test: end of block
Executed by:
  • libcrypto.so.1.1
216-6352
433-
434-
435-
436-
437static int ec_asn1_group2fieldid(const EC_GROUP *, X9_62_FIELDID *);-
438-
439static int ec_asn1_group2curve(const EC_GROUP *, X9_62_CURVE *);-
440-
441-
442-
443static int ec_asn1_group2fieldid(const EC_GROUP *group, X9_62_FIELDID *field)-
444{-
445 int ok = 0, nid;-
446 BIGNUM *tmp = -
447 ((void *)0)-
448 ;-
449-
450 if (group ==
group == ((void *)0)Description
TRUEnever evaluated
FALSEevaluated 47 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
0-47
451 ((void *)0)
group == ((void *)0)Description
TRUEnever evaluated
FALSEevaluated 47 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
0-47
452 || field ==
field == ((void *)0)Description
TRUEnever evaluated
FALSEevaluated 47 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
0-47
453 ((void *)0)
field == ((void *)0)Description
TRUEnever evaluated
FALSEevaluated 47 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
0-47
454 )-
455 return
never executed: return 0;
0;
never executed: return 0;
0
456-
457-
458 ASN1_OBJECT_free(field->fieldType);-
459 ASN1_TYPE_free(field->p.other);-
460-
461 nid = EC_METHOD_get_field_type(EC_GROUP_method_of(group));-
462-
463 if ((
(field->fieldT...== ((void *)0)Description
TRUEnever evaluated
FALSEevaluated 47 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
field->fieldType = OBJ_nid2obj(nid)) ==
(field->fieldT...== ((void *)0)Description
TRUEnever evaluated
FALSEevaluated 47 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
0-47
464 ((void *)0)
(field->fieldT...== ((void *)0)Description
TRUEnever evaluated
FALSEevaluated 47 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
0-47
465 ) {-
466 ERR_put_error(16,(154),(8),__FILE__,259);-
467 goto
never executed: goto err;
err;
never executed: goto err;
0
468 }-
469-
470 if (nid == 406
nid == 406Description
TRUEevaluated 47 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
FALSEnever evaluated
) {
0-47
471 if ((
(tmp = BN_new(...== ((void *)0)Description
TRUEnever evaluated
FALSEevaluated 47 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
tmp = BN_new()) ==
(tmp = BN_new(...== ((void *)0)Description
TRUEnever evaluated
FALSEevaluated 47 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
0-47
472 ((void *)0)
(tmp = BN_new(...== ((void *)0)Description
TRUEnever evaluated
FALSEevaluated 47 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
0-47
473 ) {-
474 ERR_put_error(16,(154),((1|64)),__FILE__,265);-
475 goto
never executed: goto err;
err;
never executed: goto err;
0
476 }-
477-
478 if (!EC_GROUP_get_curve(group, tmp,
!EC_GROUP_get_... ((void *)0) )Description
TRUEnever evaluated
FALSEevaluated 47 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
0-47
479 ((void *)0)
!EC_GROUP_get_... ((void *)0) )Description
TRUEnever evaluated
FALSEevaluated 47 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
0-47
480 ,
!EC_GROUP_get_... ((void *)0) )Description
TRUEnever evaluated
FALSEevaluated 47 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
0-47
481 ((void *)0)
!EC_GROUP_get_... ((void *)0) )Description
TRUEnever evaluated
FALSEevaluated 47 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
0-47
482 ,
!EC_GROUP_get_... ((void *)0) )Description
TRUEnever evaluated
FALSEevaluated 47 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
0-47
483 ((void *)0)
!EC_GROUP_get_... ((void *)0) )Description
TRUEnever evaluated
FALSEevaluated 47 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
0-47
484 )
!EC_GROUP_get_... ((void *)0) )Description
TRUEnever evaluated
FALSEevaluated 47 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
) {
0-47
485 ERR_put_error(16,(154),(16),__FILE__,270);-
486 goto
never executed: goto err;
err;
never executed: goto err;
0
487 }-
488-
489 field->p.prime = BN_to_ASN1_INTEGER(tmp, -
490 ((void *)0)-
491 );-
492 if (field->p.prime ==
field->p.prime == ((void *)0)Description
TRUEnever evaluated
FALSEevaluated 47 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
0-47
493 ((void *)0)
field->p.prime == ((void *)0)Description
TRUEnever evaluated
FALSEevaluated 47 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
0-47
494 ) {-
495 ERR_put_error(16,(154),(13),__FILE__,276);-
496 goto
never executed: goto err;
err;
never executed: goto err;
0
497 }-
498 }
executed 47 times by 1 test: end of block
Executed by:
  • libcrypto.so.1.1
else if (nid == 407
nid == 407Description
TRUEnever evaluated
FALSEnever evaluated
)
0-47
499-
500-
501-
502-
503-
504-
505 {-
506 int field_type;-
507 X9_62_CHARACTERISTIC_TWO *char_two;-
508-
509 field->p.char_two = X9_62_CHARACTERISTIC_TWO_new();-
510 char_two = field->p.char_two;-
511-
512 if (char_two ==
char_two == ((void *)0)Description
TRUEnever evaluated
FALSEnever evaluated
0
513 ((void *)0)
char_two == ((void *)0)Description
TRUEnever evaluated
FALSEnever evaluated
0
514 ) {-
515 ERR_put_error(16,(154),((1|64)),__FILE__,294);-
516 goto
never executed: goto err;
err;
never executed: goto err;
0
517 }-
518-
519 char_two->m = (long)EC_GROUP_get_degree(group);-
520-
521 field_type = EC_GROUP_get_basis_type(group);-
522-
523 if (field_type == 0
field_type == 0Description
TRUEnever evaluated
FALSEnever evaluated
) {
0
524 ERR_put_error(16,(154),(16),__FILE__,303);-
525 goto
never executed: goto err;
err;
never executed: goto err;
0
526 }-
527-
528 if ((
(char_two->typ...== ((void *)0)Description
TRUEnever evaluated
FALSEnever evaluated
char_two->type = OBJ_nid2obj(field_type)) ==
(char_two->typ...== ((void *)0)Description
TRUEnever evaluated
FALSEnever evaluated
0
529 ((void *)0)
(char_two->typ...== ((void *)0)Description
TRUEnever evaluated
FALSEnever evaluated
0
530 ) {-
531 ERR_put_error(16,(154),(8),__FILE__,308);-
532 goto
never executed: goto err;
err;
never executed: goto err;
0
533 }-
534-
535 if (field_type == 682
field_type == 682Description
TRUEnever evaluated
FALSEnever evaluated
) {
0
536 unsigned int k;-
537-
538 if (!EC_GROUP_get_trinomial_basis(group, &k)
!EC_GROUP_get_...sis(group, &k)Description
TRUEnever evaluated
FALSEnever evaluated
)
0
539 goto
never executed: goto err;
err;
never executed: goto err;
0
540-
541 char_two->p.tpBasis = ASN1_INTEGER_new();-
542 if (char_two->p.tpBasis ==
char_two->p.tp...== ((void *)0)Description
TRUEnever evaluated
FALSEnever evaluated
0
543 ((void *)0)
char_two->p.tp...== ((void *)0)Description
TRUEnever evaluated
FALSEnever evaluated
0
544 ) {-
545 ERR_put_error(16,(154),((1|64)),__FILE__,320);-
546 goto
never executed: goto err;
err;
never executed: goto err;
0
547 }-
548 if (!ASN1_INTEGER_set(char_two->p.tpBasis, (long)k)
!ASN1_INTEGER_...asis, (long)k)Description
TRUEnever evaluated
FALSEnever evaluated
) {
0
549 ERR_put_error(16,(154),(13),__FILE__,324);-
550 goto
never executed: goto err;
err;
never executed: goto err;
0
551 }-
552 }
never executed: end of block
else if (field_type == 683
field_type == 683Description
TRUEnever evaluated
FALSEnever evaluated
) {
0
553 unsigned int k1, k2, k3;-
554-
555 if (!EC_GROUP_get_pentanomial_basis(group, &k1, &k2, &k3)
!EC_GROUP_get_...&k1, &k2, &k3)Description
TRUEnever evaluated
FALSEnever evaluated
)
0
556 goto
never executed: goto err;
err;
never executed: goto err;
0
557-
558 char_two->p.ppBasis = X9_62_PENTANOMIAL_new();-
559 if (char_two->p.ppBasis ==
char_two->p.pp...== ((void *)0)Description
TRUEnever evaluated
FALSEnever evaluated
0
560 ((void *)0)
char_two->p.pp...== ((void *)0)Description
TRUEnever evaluated
FALSEnever evaluated
0
561 ) {-
562 ERR_put_error(16,(154),((1|64)),__FILE__,335);-
563 goto
never executed: goto err;
err;
never executed: goto err;
0
564 }-
565-
566-
567 char_two->p.ppBasis->k1 = (long)k1;-
568 char_two->p.ppBasis->k2 = (long)k2;-
569 char_two->p.ppBasis->k3 = (long)k3;-
570 }
never executed: end of block
else {
0
571-
572-
573 char_two->p.onBasis = ASN1_NULL_new();-
574 if (char_two->p.onBasis ==
char_two->p.on...== ((void *)0)Description
TRUEnever evaluated
FALSEnever evaluated
0
575 ((void *)0)
char_two->p.on...== ((void *)0)Description
TRUEnever evaluated
FALSEnever evaluated
0
576 ) {-
577 ERR_put_error(16,(154),((1|64)),__FILE__,348);-
578 goto
never executed: goto err;
err;
never executed: goto err;
0
579 }-
580 }
never executed: end of block
0
581 }-
582-
583 else {-
584 ERR_put_error(16,(154),(131),__FILE__,355);-
585 goto
never executed: goto err;
err;
never executed: goto err;
0
586 }-
587-
588 ok = 1;-
589-
590 err:
code before this statement executed 47 times by 1 test: err:
Executed by:
  • libcrypto.so.1.1
47
591 BN_free(tmp);-
592 return
executed 47 times by 1 test: return ok;
Executed by:
  • libcrypto.so.1.1
ok;
executed 47 times by 1 test: return ok;
Executed by:
  • libcrypto.so.1.1
47
593}-
594-
595static int ec_asn1_group2curve(const EC_GROUP *group, X9_62_CURVE *curve)-
596{-
597 int ok = 0;-
598 BIGNUM *tmp_1 = -
599 ((void *)0)-
600 , *tmp_2 = -
601 ((void *)0)-
602 ;-
603 unsigned char *a_buf = -
604 ((void *)0)-
605 , *b_buf = -
606 ((void *)0)-
607 ;-
608 size_t len;-
609-
610 if (!group
!groupDescription
TRUEnever evaluated
FALSEevaluated 47 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
|| !curve
!curveDescription
TRUEnever evaluated
FALSEevaluated 47 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
|| !curve->a
!curve->aDescription
TRUEnever evaluated
FALSEevaluated 47 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
|| !curve->b
!curve->bDescription
TRUEnever evaluated
FALSEevaluated 47 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
)
0-47
611 return
never executed: return 0;
0;
never executed: return 0;
0
612-
613 if ((
(tmp_1 = BN_ne...== ((void *)0)Description
TRUEnever evaluated
FALSEevaluated 47 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
tmp_1 = BN_new()) ==
(tmp_1 = BN_ne...== ((void *)0)Description
TRUEnever evaluated
FALSEevaluated 47 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
0-47
614 ((void *)0)
(tmp_1 = BN_ne...== ((void *)0)Description
TRUEnever evaluated
FALSEevaluated 47 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
0-47
615 || (
(tmp_2 = BN_ne...== ((void *)0)Description
TRUEnever evaluated
FALSEevaluated 47 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
tmp_2 = BN_new()) ==
(tmp_2 = BN_ne...== ((void *)0)Description
TRUEnever evaluated
FALSEevaluated 47 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
0-47
616 ((void *)0)
(tmp_2 = BN_ne...== ((void *)0)Description
TRUEnever evaluated
FALSEevaluated 47 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
0-47
617 ) {-
618 ERR_put_error(16,(153),((1|64)),__FILE__,377);-
619 goto
never executed: goto err;
err;
never executed: goto err;
0
620 }-
621-
622-
623 if (!EC_GROUP_get_curve(group,
!EC_GROUP_get_... ((void *)0) )Description
TRUEnever evaluated
FALSEevaluated 47 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
0-47
624 ((void *)0)
!EC_GROUP_get_... ((void *)0) )Description
TRUEnever evaluated
FALSEevaluated 47 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
0-47
625 , tmp_1, tmp_2,
!EC_GROUP_get_... ((void *)0) )Description
TRUEnever evaluated
FALSEevaluated 47 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
0-47
626 ((void *)0)
!EC_GROUP_get_... ((void *)0) )Description
TRUEnever evaluated
FALSEevaluated 47 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
0-47
627 )
!EC_GROUP_get_... ((void *)0) )Description
TRUEnever evaluated
FALSEevaluated 47 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
) {
0-47
628 ERR_put_error(16,(153),(16),__FILE__,383);-
629 goto
never executed: goto err;
err;
never executed: goto err;
0
630 }-
631-
632-
633-
634-
635-
636-
637 len = ((size_t)EC_GROUP_get_degree(group) + 7) / 8;-
638 if ((
(a_buf = CRYPT...== ((void *)0)Description
TRUEnever evaluated
FALSEevaluated 47 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
a_buf = CRYPTO_malloc(len, __FILE__, 393)) ==
(a_buf = CRYPT...== ((void *)0)Description
TRUEnever evaluated
FALSEevaluated 47 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
0-47
639 ((void *)0)
(a_buf = CRYPT...== ((void *)0)Description
TRUEnever evaluated
FALSEevaluated 47 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
0-47
640 -
641 || (
(b_buf = CRYPT...== ((void *)0)Description
TRUEnever evaluated
FALSEevaluated 47 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
b_buf = CRYPTO_malloc(len, __FILE__, 394)) ==
(b_buf = CRYPT...== ((void *)0)Description
TRUEnever evaluated
FALSEevaluated 47 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
0-47
642 ((void *)0)
(b_buf = CRYPT...== ((void *)0)Description
TRUEnever evaluated
FALSEevaluated 47 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
0-47
643 ) {-
644 ERR_put_error(16,(153),((1|64)),__FILE__,395);-
645 goto
never executed: goto err;
err;
never executed: goto err;
0
646 }-
647 if (BN_bn2binpad(tmp_1, a_buf, len) < 0
BN_bn2binpad(t..._buf, len) < 0Description
TRUEnever evaluated
FALSEevaluated 47 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
0-47
648 || BN_bn2binpad(tmp_2, b_buf, len) < 0
BN_bn2binpad(t..._buf, len) < 0Description
TRUEnever evaluated
FALSEevaluated 47 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
) {
0-47
649 ERR_put_error(16,(153),(3),__FILE__,400);-
650 goto
never executed: goto err;
err;
never executed: goto err;
0
651 }-
652-
653-
654 if (!ASN1_OCTET_STRING_set(curve->a, a_buf, len)
!ASN1_OCTET_ST...a, a_buf, len)Description
TRUEnever evaluated
FALSEevaluated 47 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
0-47
655 || !ASN1_OCTET_STRING_set(curve->b, b_buf, len)
!ASN1_OCTET_ST...b, b_buf, len)Description
TRUEnever evaluated
FALSEevaluated 47 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
) {
0-47
656 ERR_put_error(16,(153),(13),__FILE__,407);-
657 goto
never executed: goto err;
err;
never executed: goto err;
0
658 }-
659-
660-
661 if (group->seed
group->seedDescription
TRUEevaluated 19 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
FALSEevaluated 28 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
) {
19-28
662 if (!curve->seed
!curve->seedDescription
TRUEevaluated 19 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
FALSEnever evaluated
)
0-19
663 if ((
(curve->seed =...== ((void *)0)Description
TRUEnever evaluated
FALSEevaluated 19 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
curve->seed = ASN1_BIT_STRING_new()) ==
(curve->seed =...== ((void *)0)Description
TRUEnever evaluated
FALSEevaluated 19 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
0-19
664 ((void *)0)
(curve->seed =...== ((void *)0)Description
TRUEnever evaluated
FALSEevaluated 19 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
0-19
665 ) {-
666 ERR_put_error(16,(153),((1|64)),__FILE__,415);-
667 goto
never executed: goto err;
err;
never executed: goto err;
0
668 }-
669 curve->seed->flags &= ~(0x08 | 0x07);-
670 curve->seed->flags |= 0x08;-
671 if (!ASN1_BIT_STRING_set(curve->seed, group->seed,
!ASN1_BIT_STRI...oup->seed_len)Description
TRUEnever evaluated
FALSEevaluated 19 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
0-19
672 (int)group->seed_len)
!ASN1_BIT_STRI...oup->seed_len)Description
TRUEnever evaluated
FALSEevaluated 19 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
) {
0-19
673 ERR_put_error(16,(153),(13),__FILE__,422);-
674 goto
never executed: goto err;
err;
never executed: goto err;
0
675 }-
676 }
executed 19 times by 1 test: end of block
Executed by:
  • libcrypto.so.1.1
else {
19
677 ASN1_BIT_STRING_free(curve->seed);-
678 curve->seed = -
679 ((void *)0)-
680 ;-
681 }
executed 28 times by 1 test: end of block
Executed by:
  • libcrypto.so.1.1
28
682-
683 ok = 1;-
684-
685 err:
code before this statement executed 47 times by 1 test: err:
Executed by:
  • libcrypto.so.1.1
47
686 CRYPTO_free(a_buf, __FILE__, 433);-
687 CRYPTO_free(b_buf, __FILE__, 434);-
688 BN_free(tmp_1);-
689 BN_free(tmp_2);-
690 return
executed 47 times by 1 test: return ok;
Executed by:
  • libcrypto.so.1.1
ok;
executed 47 times by 1 test: return ok;
Executed by:
  • libcrypto.so.1.1
47
691}-
692-
693ECPARAMETERS *EC_GROUP_get_ecparameters(const EC_GROUP *group,-
694 ECPARAMETERS *params)-
695{-
696 size_t len = 0;-
697 ECPARAMETERS *ret = -
698 ((void *)0)-
699 ;-
700 const BIGNUM *tmp;-
701 unsigned char *buffer = -
702 ((void *)0)-
703 ;-
704 const EC_POINT *point = -
705 ((void *)0)-
706 ;-
707 point_conversion_form_t form;-
708-
709 if (params ==
params == ((void *)0)Description
TRUEevaluated 47 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
FALSEnever evaluated
0-47
710 ((void *)0)
params == ((void *)0)Description
TRUEevaluated 47 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
FALSEnever evaluated
0-47
711 ) {-
712 if ((
(ret = ECPARAM...== ((void *)0)Description
TRUEnever evaluated
FALSEevaluated 47 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
ret = ECPARAMETERS_new()) ==
(ret = ECPARAM...== ((void *)0)Description
TRUEnever evaluated
FALSEevaluated 47 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
0-47
713 ((void *)0)
(ret = ECPARAM...== ((void *)0)Description
TRUEnever evaluated
FALSEevaluated 47 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
0-47
714 ) {-
715 ERR_put_error(16,(261),((1|64)),__FILE__,452);-
716 goto
never executed: goto err;
err;
never executed: goto err;
0
717 }-
718 }
executed 47 times by 1 test: end of block
Executed by:
  • libcrypto.so.1.1
else
47
719 ret = params;
never executed: ret = params;
0
720-
721-
722 ret->version = (long)0x1;-
723-
724-
725 if (!ec_asn1_group2fieldid(group, ret->fieldID)
!ec_asn1_group... ret->fieldID)Description
TRUEnever evaluated
FALSEevaluated 47 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
) {
0-47
726 ERR_put_error(16,(261),(16),__FILE__,463);-
727 goto
never executed: goto err;
err;
never executed: goto err;
0
728 }-
729-
730-
731 if (!ec_asn1_group2curve(group, ret->curve)
!ec_asn1_group...p, ret->curve)Description
TRUEnever evaluated
FALSEevaluated 47 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
) {
0-47
732 ERR_put_error(16,(261),(16),__FILE__,469);-
733 goto
never executed: goto err;
err;
never executed: goto err;
0
734 }-
735-
736-
737 if ((
(point = EC_GR...== ((void *)0)Description
TRUEnever evaluated
FALSEevaluated 47 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
point = EC_GROUP_get0_generator(group)) ==
(point = EC_GR...== ((void *)0)Description
TRUEnever evaluated
FALSEevaluated 47 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
0-47
738 ((void *)0)
(point = EC_GR...== ((void *)0)Description
TRUEnever evaluated
FALSEevaluated 47 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
0-47
739 ) {-
740 ERR_put_error(16,(261),(113),__FILE__,475);-
741 goto
never executed: goto err;
err;
never executed: goto err;
0
742 }-
743-
744 form = EC_GROUP_get_point_conversion_form(group);-
745-
746 len = EC_POINT_point2buf(group, point, form, &buffer, -
747 ((void *)0)-
748 );-
749 if (len == 0
len == 0Description
TRUEnever evaluated
FALSEevaluated 47 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
) {
0-47
750 ERR_put_error(16,(261),(16),__FILE__,483);-
751 goto
never executed: goto err;
err;
never executed: goto err;
0
752 }-
753 if (ret->base ==
ret->base == ((void *)0)Description
TRUEnever evaluated
FALSEevaluated 47 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
0-47
754 ((void *)0)
ret->base == ((void *)0)Description
TRUEnever evaluated
FALSEevaluated 47 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
0-47
755 && (
(ret->base = A...== ((void *)0)Description
TRUEnever evaluated
FALSEnever evaluated
ret->base = ASN1_OCTET_STRING_new()) ==
(ret->base = A...== ((void *)0)Description
TRUEnever evaluated
FALSEnever evaluated
0
756 ((void *)0)
(ret->base = A...== ((void *)0)Description
TRUEnever evaluated
FALSEnever evaluated
0
757 ) {-
758 CRYPTO_free(buffer, __FILE__, 487);-
759 ERR_put_error(16,(261),((1|64)),__FILE__,488);-
760 goto
never executed: goto err;
err;
never executed: goto err;
0
761 }-
762 ASN1_STRING_set0(ret->base, buffer, len);-
763-
764-
765 tmp = EC_GROUP_get0_order(group);-
766 if (tmp ==
tmp == ((void *)0)Description
TRUEnever evaluated
FALSEevaluated 47 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
0-47
767 ((void *)0)
tmp == ((void *)0)Description
TRUEnever evaluated
FALSEevaluated 47 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
0-47
768 ) {-
769 ERR_put_error(16,(261),(16),__FILE__,496);-
770 goto
never executed: goto err;
err;
never executed: goto err;
0
771 }-
772 ret->order = BN_to_ASN1_INTEGER(tmp, ret->order);-
773 if (ret->order ==
ret->order == ((void *)0)Description
TRUEnever evaluated
FALSEevaluated 47 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
0-47
774 ((void *)0)
ret->order == ((void *)0)Description
TRUEnever evaluated
FALSEevaluated 47 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
0-47
775 ) {-
776 ERR_put_error(16,(261),(13),__FILE__,501);-
777 goto
never executed: goto err;
err;
never executed: goto err;
0
778 }-
779-
780-
781 tmp = EC_GROUP_get0_cofactor(group);-
782 if (tmp !=
tmp != ((void *)0)Description
TRUEevaluated 47 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
FALSEnever evaluated
0-47
783 ((void *)0)
tmp != ((void *)0)Description
TRUEevaluated 47 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
FALSEnever evaluated
0-47
784 ) {-
785 ret->cofactor = BN_to_ASN1_INTEGER(tmp, ret->cofactor);-
786 if (ret->cofactor ==
ret->cofactor == ((void *)0)Description
TRUEnever evaluated
FALSEevaluated 47 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
0-47
787 ((void *)0)
ret->cofactor == ((void *)0)Description
TRUEnever evaluated
FALSEevaluated 47 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
0-47
788 ) {-
789 ERR_put_error(16,(261),(13),__FILE__,510);-
790 goto
never executed: goto err;
err;
never executed: goto err;
0
791 }-
792 }
executed 47 times by 1 test: end of block
Executed by:
  • libcrypto.so.1.1
47
793-
794 return
executed 47 times by 1 test: return ret;
Executed by:
  • libcrypto.so.1.1
ret;
executed 47 times by 1 test: return ret;
Executed by:
  • libcrypto.so.1.1
47
795-
796 err:-
797 if (params ==
params == ((void *)0)Description
TRUEnever evaluated
FALSEnever evaluated
0
798 ((void *)0)
params == ((void *)0)Description
TRUEnever evaluated
FALSEnever evaluated
0
799 )-
800 ECPARAMETERS_free(ret);
never executed: ECPARAMETERS_free(ret);
0
801 return
never executed: return ((void *)0) ;
never executed: return ((void *)0) ;
0
802 ((void *)0)
never executed: return ((void *)0) ;
0
803 ;
never executed: return ((void *)0) ;
0
804}-
805-
806ECPKPARAMETERS *EC_GROUP_get_ecpkparameters(const EC_GROUP *group,-
807 ECPKPARAMETERS *params)-
808{-
809 int ok = 1, tmp;-
810 ECPKPARAMETERS *ret = params;-
811-
812 if (ret ==
ret == ((void *)0)Description
TRUEevaluated 254 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
FALSEnever evaluated
0-254
813 ((void *)0)
ret == ((void *)0)Description
TRUEevaluated 254 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
FALSEnever evaluated
0-254
814 ) {-
815 if ((
(ret = ECPKPAR...== ((void *)0)Description
TRUEnever evaluated
FALSEevaluated 254 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
ret = ECPKPARAMETERS_new()) ==
(ret = ECPKPAR...== ((void *)0)Description
TRUEnever evaluated
FALSEevaluated 254 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
0-254
816 ((void *)0)
(ret = ECPKPAR...== ((void *)0)Description
TRUEnever evaluated
FALSEevaluated 254 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
0-254
817 ) {-
818 ERR_put_error(16,(262),((1|64)),__FILE__,531);-
819 return
never executed: return ((void *)0) ;
never executed: return ((void *)0) ;
0
820 ((void *)0)
never executed: return ((void *)0) ;
0
821 ;
never executed: return ((void *)0) ;
0
822 }-
823 }
executed 254 times by 1 test: end of block
Executed by:
  • libcrypto.so.1.1
else {
254
824 if (ret->type == 0
ret->type == 0Description
TRUEnever evaluated
FALSEnever evaluated
)
0
825 ASN1_OBJECT_free(ret->value.named_curve);
never executed: ASN1_OBJECT_free(ret->value.named_curve);
0
826 else if (ret->type == 1
ret->type == 1Description
TRUEnever evaluated
FALSEnever evaluated
&& ret->value.parameters
ret->value.parametersDescription
TRUEnever evaluated
FALSEnever evaluated
)
0
827 ECPARAMETERS_free(ret->value.parameters);
never executed: ECPARAMETERS_free(ret->value.parameters);
0
828 }
never executed: end of block
0
829-
830 if (EC_GROUP_get_asn1_flag(group)
EC_GROUP_get_asn1_flag(group)Description
TRUEevaluated 208 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
FALSEevaluated 46 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
) {
46-208
831-
832-
833-
834 tmp = EC_GROUP_get_curve_name(group);-
835 if (tmp
tmpDescription
TRUEevaluated 208 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
FALSEnever evaluated
) {
0-208
836 ret->type = 0;-
837 if ((
(ret->value.na...== ((void *)0)Description
TRUEnever evaluated
FALSEevaluated 208 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
ret->value.named_curve = OBJ_nid2obj(tmp)) ==
(ret->value.na...== ((void *)0)Description
TRUEnever evaluated
FALSEevaluated 208 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
0-208
838 ((void *)0)
(ret->value.na...== ((void *)0)Description
TRUEnever evaluated
FALSEevaluated 208 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
0-208
839 )-
840 ok = 0;
never executed: ok = 0;
0
841 }
executed 208 times by 1 test: end of block
Executed by:
  • libcrypto.so.1.1
else
208
842-
843 ok = 0;
never executed: ok = 0;
0
844 } else {-
845-
846 ret->type = 1;-
847 if ((
(ret->value.pa...== ((void *)0)Description
TRUEnever evaluated
FALSEevaluated 46 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
ret->value.parameters =
(ret->value.pa...== ((void *)0)Description
TRUEnever evaluated
FALSEevaluated 46 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
0-46
848 EC_GROUP_get_ecparameters(group,
(ret->value.pa...== ((void *)0)Description
TRUEnever evaluated
FALSEevaluated 46 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
0-46
849 ((void *)0)
(ret->value.pa...== ((void *)0)Description
TRUEnever evaluated
FALSEevaluated 46 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
0-46
850 )) ==
(ret->value.pa...== ((void *)0)Description
TRUEnever evaluated
FALSEevaluated 46 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
0-46
851 ((void *)0)
(ret->value.pa...== ((void *)0)Description
TRUEnever evaluated
FALSEevaluated 46 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
0-46
852 )-
853 ok = 0;
never executed: ok = 0;
0
854 }
executed 46 times by 1 test: end of block
Executed by:
  • libcrypto.so.1.1
46
855-
856 if (!ok
!okDescription
TRUEnever evaluated
FALSEevaluated 254 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
) {
0-254
857 ECPKPARAMETERS_free(ret);-
858 return
never executed: return ((void *)0) ;
never executed: return ((void *)0) ;
0
859 ((void *)0)
never executed: return ((void *)0) ;
0
860 ;
never executed: return ((void *)0) ;
0
861 }-
862 return
executed 254 times by 1 test: return ret;
Executed by:
  • libcrypto.so.1.1
ret;
executed 254 times by 1 test: return ret;
Executed by:
  • libcrypto.so.1.1
254
863}-
864-
865EC_GROUP *EC_GROUP_new_from_ecparameters(const ECPARAMETERS *params)-
866{-
867 int ok = 0, tmp;-
868 EC_GROUP *ret = -
869 ((void *)0)-
870 ;-
871 BIGNUM *p = -
872 ((void *)0)-
873 , *a = -
874 ((void *)0)-
875 , *b = -
876 ((void *)0)-
877 ;-
878 EC_POINT *point = -
879 ((void *)0)-
880 ;-
881 long field_bits;-
882-
883 if (!params->fieldID
!params->fieldIDDescription
TRUEnever evaluated
FALSEevaluated 1046 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
|| !params->fieldID->fieldType
!params->fieldID->fieldTypeDescription
TRUEnever evaluated
FALSEevaluated 1046 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
||
0-1046
884 !params->fieldID->p.ptr
!params->fieldID->p.ptrDescription
TRUEnever evaluated
FALSEevaluated 1046 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
) {
0-1046
885 ERR_put_error(16,(263),(115),__FILE__,578);-
886 goto
never executed: goto err;
err;
never executed: goto err;
0
887 }-
888-
889-
890-
891-
892-
893-
894-
895 if (!params->curve
!params->curveDescription
TRUEnever evaluated
FALSEevaluated 1046 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
|| !params->curve->a
!params->curve->aDescription
TRUEnever evaluated
FALSEevaluated 1046 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
||
0-1046
896 !params->curve->a->data
!params->curve->a->dataDescription
TRUEnever evaluated
FALSEevaluated 1046 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
|| !params->curve->b
!params->curve->bDescription
TRUEnever evaluated
FALSEevaluated 1046 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
||
0-1046
897 !params->curve->b->data
!params->curve->b->dataDescription
TRUEnever evaluated
FALSEevaluated 1046 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
) {
0-1046
898 ERR_put_error(16,(263),(115),__FILE__,591);-
899 goto
never executed: goto err;
err;
never executed: goto err;
0
900 }-
901 a = BN_bin2bn(params->curve->a->data, params->curve->a->length, -
902 ((void *)0)-
903 );-
904 if (a ==
a == ((void *)0)Description
TRUEnever evaluated
FALSEevaluated 1046 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
0-1046
905 ((void *)0)
a == ((void *)0)Description
TRUEnever evaluated
FALSEevaluated 1046 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
0-1046
906 ) {-
907 ERR_put_error(16,(263),(3),__FILE__,596);-
908 goto
never executed: goto err;
err;
never executed: goto err;
0
909 }-
910 b = BN_bin2bn(params->curve->b->data, params->curve->b->length, -
911 ((void *)0)-
912 );-
913 if (b ==
b == ((void *)0)Description
TRUEnever evaluated
FALSEevaluated 1046 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
0-1046
914 ((void *)0)
b == ((void *)0)Description
TRUEnever evaluated
FALSEevaluated 1046 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
0-1046
915 ) {-
916 ERR_put_error(16,(263),(3),__FILE__,601);-
917 goto
never executed: goto err;
err;
never executed: goto err;
0
918 }-
919-
920-
921 tmp = OBJ_obj2nid(params->fieldID->fieldType);-
922 if (tmp == 407
tmp == 407Description
TRUEevaluated 41 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
FALSEevaluated 1005 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
)
41-1005
923-
924-
925-
926-
927-
928-
929 {-
930 X9_62_CHARACTERISTIC_TWO *char_two;-
931-
932 char_two = params->fieldID->p.char_two;-
933-
934 field_bits = char_two->m;-
935 if (field_bits > 661
field_bits > 661Description
TRUEnever evaluated
FALSEevaluated 41 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
) {
0-41
936 ERR_put_error(16,(263),(143),__FILE__,621);-
937 goto
never executed: goto err;
err;
never executed: goto err;
0
938 }-
939-
940 if ((
(p = BN_new()) == ((void *)0)Description
TRUEnever evaluated
FALSEevaluated 41 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
p = BN_new()) ==
(p = BN_new()) == ((void *)0)Description
TRUEnever evaluated
FALSEevaluated 41 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
0-41
941 ((void *)0)
(p = BN_new()) == ((void *)0)Description
TRUEnever evaluated
FALSEevaluated 41 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
0-41
942 ) {-
943 ERR_put_error(16,(263),((1|64)),__FILE__,626);-
944 goto
never executed: goto err;
err;
never executed: goto err;
0
945 }-
946-
947-
948 tmp = OBJ_obj2nid(char_two->type);-
949-
950 if (tmp == 682
tmp == 682Description
TRUEevaluated 21 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
FALSEevaluated 20 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
) {
20-21
951 long tmp_long;-
952-
953 if (!char_two->p.tpBasis
!char_two->p.tpBasisDescription
TRUEnever evaluated
FALSEevaluated 21 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
) {
0-21
954 ERR_put_error(16,(263),(115),__FILE__,637);-
955 goto
never executed: goto err;
err;
never executed: goto err;
0
956 }-
957-
958 tmp_long = ASN1_INTEGER_get(char_two->p.tpBasis);-
959-
960 if (!(char_two->m > tmp_long
char_two->m > tmp_longDescription
TRUEevaluated 21 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
FALSEnever evaluated
&& tmp_long > 0
tmp_long > 0Description
TRUEevaluated 21 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
FALSEnever evaluated
)) {
0-21
961 ERR_put_error(16,(263),(137),__FILE__,645)-
962 ;-
963 goto
never executed: goto err;
err;
never executed: goto err;
0
964 }-
965-
966-
967 if (!BN_set_bit(p, (int)char_two->m)
!BN_set_bit(p,...t)char_two->m)Description
TRUEnever evaluated
FALSEevaluated 21 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
)
0-21
968 goto
never executed: goto err;
err;
never executed: goto err;
0
969 if (!BN_set_bit(p, (int)tmp_long)
!BN_set_bit(p, (int)tmp_long)Description
TRUEnever evaluated
FALSEevaluated 21 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
)
0-21
970 goto
never executed: goto err;
err;
never executed: goto err;
0
971 if (!BN_set_bit(p, 0)
!BN_set_bit(p, 0)Description
TRUEnever evaluated
FALSEevaluated 21 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
)
0-21
972 goto
never executed: goto err;
err;
never executed: goto err;
0
973 }
executed 21 times by 1 test: end of block
Executed by:
  • libcrypto.so.1.1
else if (tmp == 683
tmp == 683Description
TRUEevaluated 20 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
FALSEnever evaluated
) {
0-21
974 X9_62_PENTANOMIAL *penta;-
975-
976 penta = char_two->p.ppBasis;-
977 if (!penta
!pentaDescription
TRUEnever evaluated
FALSEevaluated 20 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
) {
0-20
978 ERR_put_error(16,(263),(115),__FILE__,661);-
979 goto
never executed: goto err;
err;
never executed: goto err;
0
980 }-
981-
982 if (!-
983 (char_two->m > penta->k3
char_two->m > penta->k3Description
TRUEevaluated 20 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
FALSEnever evaluated
&& penta->k3 > penta->k2
penta->k3 > penta->k2Description
TRUEevaluated 20 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
FALSEnever evaluated
0-20
984 && penta->k2 > penta->k1
penta->k2 > penta->k1Description
TRUEevaluated 20 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
FALSEnever evaluated
&& penta->k1 > 0
penta->k1 > 0Description
TRUEevaluated 20 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
FALSEnever evaluated
)) {
0-20
985 ERR_put_error(16,(263),(132),__FILE__,669)-
986 ;-
987 goto
never executed: goto err;
err;
never executed: goto err;
0
988 }-
989-
990-
991 if (!BN_set_bit(p, (int)char_two->m)
!BN_set_bit(p,...t)char_two->m)Description
TRUEnever evaluated
FALSEevaluated 20 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
)
0-20
992 goto
never executed: goto err;
err;
never executed: goto err;
0
993 if (!BN_set_bit(p, (int)penta->k1)
!BN_set_bit(p, (int)penta->k1)Description
TRUEnever evaluated
FALSEevaluated 20 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
)
0-20
994 goto
never executed: goto err;
err;
never executed: goto err;
0
995 if (!BN_set_bit(p, (int)penta->k2)
!BN_set_bit(p, (int)penta->k2)Description
TRUEnever evaluated
FALSEevaluated 20 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
)
0-20
996 goto
never executed: goto err;
err;
never executed: goto err;
0
997 if (!BN_set_bit(p, (int)penta->k3)
!BN_set_bit(p, (int)penta->k3)Description
TRUEnever evaluated
FALSEevaluated 20 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
)
0-20
998 goto
never executed: goto err;
err;
never executed: goto err;
0
999 if (!BN_set_bit(p, 0)
!BN_set_bit(p, 0)Description
TRUEnever evaluated
FALSEevaluated 20 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
)
0-20
1000 goto
never executed: goto err;
err;
never executed: goto err;
0
1001 }
executed 20 times by 1 test: end of block
Executed by:
  • libcrypto.so.1.1
else if (tmp == 681
tmp == 681Description
TRUEnever evaluated
FALSEnever evaluated
) {
0-20
1002 ERR_put_error(16,(263),(126),__FILE__,685);-
1003 goto
never executed: goto err;
err;
never executed: goto err;
0
1004 } else {-
1005-
1006 ERR_put_error(16,(263),(115),__FILE__,689);-
1007 goto
never executed: goto err;
err;
never executed: goto err;
0
1008 }-
1009-
1010-
1011 ret = EC_GROUP_new_curve_GF2m(p, a, b, -
1012 ((void *)0)-
1013 );-
1014 }
executed 41 times by 1 test: end of block
Executed by:
  • libcrypto.so.1.1
41
1015-
1016 else if (tmp == 406
tmp == 406Description
TRUEevaluated 968 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
FALSEevaluated 37 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
) {
37-968
1017-
1018-
1019 if (!params->fieldID->p.prime
!params->fieldID->p.primeDescription
TRUEnever evaluated
FALSEevaluated 968 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
) {
0-968
1020 ERR_put_error(16,(263),(115),__FILE__,701);-
1021 goto
never executed: goto err;
err;
never executed: goto err;
0
1022 }-
1023 p = ASN1_INTEGER_to_BN(params->fieldID->p.prime, -
1024 ((void *)0)-
1025 );-
1026 if (p ==
p == ((void *)0)Description
TRUEnever evaluated
FALSEevaluated 968 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
0-968
1027 ((void *)0)
p == ((void *)0)Description
TRUEnever evaluated
FALSEevaluated 968 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
0-968
1028 ) {-
1029 ERR_put_error(16,(263),(13),__FILE__,706);-
1030 goto
never executed: goto err;
err;
never executed: goto err;
0
1031 }-
1032-
1033 if (BN_is_negative(p)
BN_is_negative(p)Description
TRUEevaluated 69 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
FALSEevaluated 899 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
|| BN_is_zero(p)
BN_is_zero(p)Description
TRUEnever evaluated
FALSEevaluated 899 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
) {
0-899
1034 ERR_put_error(16,(263),(103),__FILE__,711);-
1035 goto
executed 69 times by 1 test: goto err;
Executed by:
  • libcrypto.so.1.1
err;
executed 69 times by 1 test: goto err;
Executed by:
  • libcrypto.so.1.1
69
1036 }-
1037-
1038 field_bits = BN_num_bits(p);-
1039 if (field_bits > 661
field_bits > 661Description
TRUEnever evaluated
FALSEevaluated 899 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
) {
0-899
1040 ERR_put_error(16,(263),(143),__FILE__,717);-
1041 goto
never executed: goto err;
err;
never executed: goto err;
0
1042 }-
1043-
1044-
1045 ret = EC_GROUP_new_curve_GFp(p, a, b, -
1046 ((void *)0)-
1047 );-
1048 }
executed 899 times by 1 test: end of block
Executed by:
  • libcrypto.so.1.1
else {
899
1049 ERR_put_error(16,(263),(103),__FILE__,724);-
1050 goto
executed 37 times by 1 test: goto err;
Executed by:
  • libcrypto.so.1.1
err;
executed 37 times by 1 test: goto err;
Executed by:
  • libcrypto.so.1.1
37
1051 }-
1052-
1053 if (ret ==
ret == ((void *)0)Description
TRUEevaluated 422 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
FALSEevaluated 518 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
422-518
1054 ((void *)0)
ret == ((void *)0)Description
TRUEevaluated 422 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
FALSEevaluated 518 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
422-518
1055 ) {-
1056 ERR_put_error(16,(263),(16),__FILE__,729);-
1057 goto
executed 422 times by 1 test: goto err;
Executed by:
  • libcrypto.so.1.1
err;
executed 422 times by 1 test: goto err;
Executed by:
  • libcrypto.so.1.1
422
1058 }-
1059-
1060-
1061 if (params->curve->seed !=
params->curve-...!= ((void *)0)Description
TRUEevaluated 425 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
FALSEevaluated 93 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
93-425
1062 ((void *)0)
params->curve-...!= ((void *)0)Description
TRUEevaluated 425 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
FALSEevaluated 93 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
93-425
1063 ) {-
1064 CRYPTO_free(ret->seed, __FILE__, 735);-
1065 if ((
(ret->seed = C...== ((void *)0)Description
TRUEevaluated 6 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
FALSEevaluated 419 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
ret->seed = CRYPTO_malloc(params->curve->seed->length, __FILE__, 736)) ==
(ret->seed = C...== ((void *)0)Description
TRUEevaluated 6 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
FALSEevaluated 419 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
6-419
1066 ((void *)0)
(ret->seed = C...== ((void *)0)Description
TRUEevaluated 6 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
FALSEevaluated 419 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
6-419
1067 ) {-
1068 ERR_put_error(16,(263),((1|64)),__FILE__,737);-
1069 goto
executed 6 times by 1 test: goto err;
Executed by:
  • libcrypto.so.1.1
err;
executed 6 times by 1 test: goto err;
Executed by:
  • libcrypto.so.1.1
6
1070 }-
1071 memcpy(ret->seed, params->curve->seed->data,-
1072 params->curve->seed->length);-
1073 ret->seed_len = params->curve->seed->length;-
1074 }
executed 419 times by 1 test: end of block
Executed by:
  • libcrypto.so.1.1
419
1075-
1076 if (!params->order
!params->orderDescription
TRUEnever evaluated
FALSEevaluated 512 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
|| !params->base
!params->baseDescription
TRUEnever evaluated
FALSEevaluated 512 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
|| !params->base->data
!params->base->dataDescription
TRUEnever evaluated
FALSEevaluated 512 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
) {
0-512
1077 ERR_put_error(16,(263),(115),__FILE__,746);-
1078 goto
never executed: goto err;
err;
never executed: goto err;
0
1079 }-
1080-
1081 if ((
(point = EC_PO...== ((void *)0)Description
TRUEnever evaluated
FALSEevaluated 512 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
point = EC_POINT_new(ret)) ==
(point = EC_PO...== ((void *)0)Description
TRUEnever evaluated
FALSEevaluated 512 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
0-512
1082 ((void *)0)
(point = EC_PO...== ((void *)0)Description
TRUEnever evaluated
FALSEevaluated 512 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
0-512
1083 )-
1084 goto
never executed: goto err;
err;
never executed: goto err;
0
1085-
1086-
1087 EC_GROUP_set_point_conversion_form(ret, (point_conversion_form_t)-
1088 (params->base->data[0] & ~0x01));-
1089-
1090-
1091 if (!EC_POINT_oct2point(ret, point, params->base->data,
!EC_POINT_oct2... ((void *)0) )Description
TRUEevaluated 190 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
FALSEevaluated 322 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
190-322
1092 params->base->length,
!EC_POINT_oct2... ((void *)0) )Description
TRUEevaluated 190 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
FALSEevaluated 322 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
190-322
1093 ((void *)0)
!EC_POINT_oct2... ((void *)0) )Description
TRUEevaluated 190 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
FALSEevaluated 322 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
190-322
1094 )
!EC_POINT_oct2... ((void *)0) )Description
TRUEevaluated 190 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
FALSEevaluated 322 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
) {
190-322
1095 ERR_put_error(16,(263),(16),__FILE__,760);-
1096 goto
executed 190 times by 1 test: goto err;
Executed by:
  • libcrypto.so.1.1
err;
executed 190 times by 1 test: goto err;
Executed by:
  • libcrypto.so.1.1
190
1097 }-
1098-
1099-
1100 if ((
(a = ASN1_INTE...== ((void *)0)Description
TRUEnever evaluated
FALSEevaluated 322 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
a = ASN1_INTEGER_to_BN(params->order, a)) ==
(a = ASN1_INTE...== ((void *)0)Description
TRUEnever evaluated
FALSEevaluated 322 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
0-322
1101 ((void *)0)
(a = ASN1_INTE...== ((void *)0)Description
TRUEnever evaluated
FALSEevaluated 322 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
0-322
1102 ) {-
1103 ERR_put_error(16,(263),(13),__FILE__,766);-
1104 goto
never executed: goto err;
err;
never executed: goto err;
0
1105 }-
1106 if (BN_is_negative(a)
BN_is_negative(a)Description
TRUEevaluated 37 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
FALSEevaluated 285 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
|| BN_is_zero(a)
BN_is_zero(a)Description
TRUEevaluated 14 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
FALSEevaluated 271 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
) {
14-285
1107 ERR_put_error(16,(263),(122),__FILE__,770);-
1108 goto
executed 51 times by 1 test: goto err;
Executed by:
  • libcrypto.so.1.1
err;
executed 51 times by 1 test: goto err;
Executed by:
  • libcrypto.so.1.1
51
1109 }-
1110 if (BN_num_bits(a) > (int)field_bits + 1
BN_num_bits(a)...field_bits + 1Description
TRUEevaluated 37 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
FALSEevaluated 234 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
) {
37-234
1111 ERR_put_error(16,(263),(122),__FILE__,774);-
1112 goto
executed 37 times by 1 test: goto err;
Executed by:
  • libcrypto.so.1.1
err;
executed 37 times by 1 test: goto err;
Executed by:
  • libcrypto.so.1.1
37
1113 }-
1114-
1115-
1116 if (params->cofactor ==
params->cofact...== ((void *)0)Description
TRUEevaluated 40 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
FALSEevaluated 194 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
40-194
1117 ((void *)0)
params->cofact...== ((void *)0)Description
TRUEevaluated 40 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
FALSEevaluated 194 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
40-194
1118 ) {-
1119 BN_free(b);-
1120 b = -
1121 ((void *)0)-
1122 ;-
1123 }
executed 40 times by 1 test: end of block
Executed by:
  • libcrypto.so.1.1
else if ((
(b = ASN1_INTE...== ((void *)0)Description
TRUEnever evaluated
FALSEevaluated 194 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
b = ASN1_INTEGER_to_BN(params->cofactor, b)) ==
(b = ASN1_INTE...== ((void *)0)Description
TRUEnever evaluated
FALSEevaluated 194 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
0-194
1124 ((void *)0)
(b = ASN1_INTE...== ((void *)0)Description
TRUEnever evaluated
FALSEevaluated 194 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
0-194
1125 ) {-
1126 ERR_put_error(16,(263),(13),__FILE__,783);-
1127 goto
never executed: goto err;
err;
never executed: goto err;
0
1128 }-
1129-
1130 if (!EC_GROUP_set_generator(ret, point, a, b)
!EC_GROUP_set_..., point, a, b)Description
TRUEnever evaluated
FALSEevaluated 234 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
) {
0-234
1131 ERR_put_error(16,(263),(16),__FILE__,788);-
1132 goto
never executed: goto err;
err;
never executed: goto err;
0
1133 }-
1134-
1135 ok = 1;-
1136-
1137 err:
code before this statement executed 234 times by 1 test: err:
Executed by:
  • libcrypto.so.1.1
234
1138 if (!ok
!okDescription
TRUEevaluated 812 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
FALSEevaluated 234 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
) {
234-812
1139 EC_GROUP_clear_free(ret);-
1140 ret = -
1141 ((void *)0)-
1142 ;-
1143 }
executed 812 times by 1 test: end of block
Executed by:
  • libcrypto.so.1.1
812
1144-
1145 BN_free(p);-
1146 BN_free(a);-
1147 BN_free(b);-
1148 EC_POINT_free(point);-
1149 return
executed 1046 times by 1 test: return ret;
Executed by:
  • libcrypto.so.1.1
ret;
executed 1046 times by 1 test: return ret;
Executed by:
  • libcrypto.so.1.1
1046
1150}-
1151-
1152EC_GROUP *EC_GROUP_new_from_ecpkparameters(const ECPKPARAMETERS *params)-
1153{-
1154 EC_GROUP *ret = -
1155 ((void *)0)-
1156 ;-
1157 int tmp = 0;-
1158-
1159 if (params ==
params == ((void *)0)Description
TRUEnever evaluated
FALSEevaluated 3165 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
0-3165
1160 ((void *)0)
params == ((void *)0)Description
TRUEnever evaluated
FALSEevaluated 3165 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
0-3165
1161 ) {-
1162 ERR_put_error(16,(264),(124),__FILE__,813);-
1163 return
never executed: return ((void *)0) ;
never executed: return ((void *)0) ;
0
1164 ((void *)0)
never executed: return ((void *)0) ;
0
1165 ;
never executed: return ((void *)0) ;
0
1166 }-
1167-
1168 if (params->type == 0
params->type == 0Description
TRUEevaluated 2117 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
FALSEevaluated 1048 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
) {
1048-2117
1169 tmp = OBJ_obj2nid(params->value.named_curve);-
1170 if ((
(ret = EC_GROU...== ((void *)0)Description
TRUEevaluated 17 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
FALSEevaluated 2100 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
ret = EC_GROUP_new_by_curve_name(tmp)) ==
(ret = EC_GROU...== ((void *)0)Description
TRUEevaluated 17 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
FALSEevaluated 2100 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
17-2100
1171 ((void *)0)
(ret = EC_GROU...== ((void *)0)Description
TRUEevaluated 17 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
FALSEevaluated 2100 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
17-2100
1172 ) {-
1173 ERR_put_error(16,(264),(119),__FILE__,821)-
1174 ;-
1175 return
executed 17 times by 1 test: return ((void *)0) ;
Executed by:
  • libcrypto.so.1.1
executed 17 times by 1 test: return ((void *)0) ;
Executed by:
  • libcrypto.so.1.1
17
1176 ((void *)0)
executed 17 times by 1 test: return ((void *)0) ;
Executed by:
  • libcrypto.so.1.1
17
1177 ;
executed 17 times by 1 test: return ((void *)0) ;
Executed by:
  • libcrypto.so.1.1
17
1178 }-
1179 EC_GROUP_set_asn1_flag(ret, 0x001);-
1180 }
executed 2100 times by 1 test: end of block
Executed by:
  • libcrypto.so.1.1
else if (params->type == 1
params->type == 1Description
TRUEevaluated 1045 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
FALSEevaluated 3 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
) {
3-2100
1181-
1182 ret = EC_GROUP_new_from_ecparameters(params->value.parameters);-
1183 if (!ret
!retDescription
TRUEevaluated 812 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
FALSEevaluated 233 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
) {
233-812
1184 ERR_put_error(16,(264),(16),__FILE__,829);-
1185 return
executed 812 times by 1 test: return ((void *)0) ;
Executed by:
  • libcrypto.so.1.1
executed 812 times by 1 test: return ((void *)0) ;
Executed by:
  • libcrypto.so.1.1
812
1186 ((void *)0)
executed 812 times by 1 test: return ((void *)0) ;
Executed by:
  • libcrypto.so.1.1
812
1187 ;
executed 812 times by 1 test: return ((void *)0) ;
Executed by:
  • libcrypto.so.1.1
812
1188 }-
1189 EC_GROUP_set_asn1_flag(ret, 0x000);-
1190 }
executed 233 times by 1 test: end of block
Executed by:
  • libcrypto.so.1.1
else if (params->type == 2
params->type == 2Description
TRUEevaluated 3 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
FALSEnever evaluated
) {
0-233
1191 return
executed 3 times by 1 test: return ((void *)0) ;
Executed by:
  • libcrypto.so.1.1
executed 3 times by 1 test: return ((void *)0) ;
Executed by:
  • libcrypto.so.1.1
3
1192 ((void *)0)
executed 3 times by 1 test: return ((void *)0) ;
Executed by:
  • libcrypto.so.1.1
3
1193 ;
executed 3 times by 1 test: return ((void *)0) ;
Executed by:
  • libcrypto.so.1.1
3
1194 } else {-
1195 ERR_put_error(16,(264),(115),__FILE__,836);-
1196 return
never executed: return ((void *)0) ;
never executed: return ((void *)0) ;
0
1197 ((void *)0)
never executed: return ((void *)0) ;
0
1198 ;
never executed: return ((void *)0) ;
0
1199 }-
1200-
1201 return
executed 2333 times by 1 test: return ret;
Executed by:
  • libcrypto.so.1.1
ret;
executed 2333 times by 1 test: return ret;
Executed by:
  • libcrypto.so.1.1
2333
1202}-
1203-
1204-
1205-
1206EC_GROUP *d2i_ECPKParameters(EC_GROUP **a, const unsigned char **in, long len)-
1207{-
1208 EC_GROUP *group = -
1209 ((void *)0)-
1210 ;-
1211 ECPKPARAMETERS *params = -
1212 ((void *)0)-
1213 ;-
1214 const unsigned char *p = *in;-
1215-
1216 if ((
(params = d2i_...== ((void *)0)Description
TRUEevaluated 7624 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
FALSEevaluated 1075 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
params = d2i_ECPKPARAMETERS(
(params = d2i_...== ((void *)0)Description
TRUEevaluated 7624 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
FALSEevaluated 1075 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
1075-7624
1217 ((void *)0)
(params = d2i_...== ((void *)0)Description
TRUEevaluated 7624 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
FALSEevaluated 1075 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
1075-7624
1218 , &p, len)) ==
(params = d2i_...== ((void *)0)Description
TRUEevaluated 7624 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
FALSEevaluated 1075 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
1075-7624
1219 ((void *)0)
(params = d2i_...== ((void *)0)Description
TRUEevaluated 7624 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
FALSEevaluated 1075 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
1075-7624
1220 ) {-
1221 ERR_put_error(16,(145),(117),__FILE__,852);-
1222 ECPKPARAMETERS_free(params);-
1223 return
executed 7624 times by 1 test: return ((void *)0) ;
Executed by:
  • libcrypto.so.1.1
executed 7624 times by 1 test: return ((void *)0) ;
Executed by:
  • libcrypto.so.1.1
7624
1224 ((void *)0)
executed 7624 times by 1 test: return ((void *)0) ;
Executed by:
  • libcrypto.so.1.1
7624
1225 ;
executed 7624 times by 1 test: return ((void *)0) ;
Executed by:
  • libcrypto.so.1.1
7624
1226 }-
1227-
1228 if ((
(group = EC_GR...== ((void *)0)Description
TRUEevaluated 789 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
FALSEevaluated 286 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
group = EC_GROUP_new_from_ecpkparameters(params)) ==
(group = EC_GR...== ((void *)0)Description
TRUEevaluated 789 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
FALSEevaluated 286 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
286-789
1229 ((void *)0)
(group = EC_GR...== ((void *)0)Description
TRUEevaluated 789 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
FALSEevaluated 286 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
286-789
1230 ) {-
1231 ERR_put_error(16,(145),(127),__FILE__,858);-
1232 ECPKPARAMETERS_free(params);-
1233 return
executed 789 times by 1 test: return ((void *)0) ;
Executed by:
  • libcrypto.so.1.1
executed 789 times by 1 test: return ((void *)0) ;
Executed by:
  • libcrypto.so.1.1
789
1234 ((void *)0)
executed 789 times by 1 test: return ((void *)0) ;
Executed by:
  • libcrypto.so.1.1
789
1235 ;
executed 789 times by 1 test: return ((void *)0) ;
Executed by:
  • libcrypto.so.1.1
789
1236 }-
1237-
1238 if (a
aDescription
TRUEevaluated 133 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
FALSEevaluated 153 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
) {
133-153
1239 EC_GROUP_clear_free(*a);-
1240 *a = group;-
1241 }
executed 133 times by 1 test: end of block
Executed by:
  • libcrypto.so.1.1
133
1242-
1243 ECPKPARAMETERS_free(params);-
1244 *in = p;-
1245 return
executed 286 times by 1 test: return group;
Executed by:
  • libcrypto.so.1.1
group;
executed 286 times by 1 test: return group;
Executed by:
  • libcrypto.so.1.1
286
1246}-
1247-
1248int i2d_ECPKParameters(const EC_GROUP *a, unsigned char **out)-
1249{-
1250 int ret = 0;-
1251 ECPKPARAMETERS *tmp = EC_GROUP_get_ecpkparameters(a, -
1252 ((void *)0)-
1253 );-
1254 if (tmp ==
tmp == ((void *)0)Description
TRUEnever evaluated
FALSEevaluated 48 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
0-48
1255 ((void *)0)
tmp == ((void *)0)Description
TRUEnever evaluated
FALSEevaluated 48 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
0-48
1256 ) {-
1257 ERR_put_error(16,(191),(120),__FILE__,878);-
1258 return
never executed: return 0;
0;
never executed: return 0;
0
1259 }-
1260 if ((
(ret = i2d_ECP...mp, out)) == 0Description
TRUEnever evaluated
FALSEevaluated 48 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
ret = i2d_ECPKPARAMETERS(tmp, out)) == 0
(ret = i2d_ECP...mp, out)) == 0Description
TRUEnever evaluated
FALSEevaluated 48 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
) {
0-48
1261 ERR_put_error(16,(191),(121),__FILE__,882);-
1262 ECPKPARAMETERS_free(tmp);-
1263 return
never executed: return 0;
0;
never executed: return 0;
0
1264 }-
1265 ECPKPARAMETERS_free(tmp);-
1266 return
executed 48 times by 1 test: return ret;
Executed by:
  • libcrypto.so.1.1
ret;
executed 48 times by 1 test: return ret;
Executed by:
  • libcrypto.so.1.1
48
1267}-
1268-
1269-
1270-
1271EC_KEY *d2i_ECPrivateKey(EC_KEY **a, const unsigned char **in, long len)-
1272{-
1273 EC_KEY *ret = -
1274 ((void *)0)-
1275 ;-
1276 EC_PRIVATEKEY *priv_key = -
1277 ((void *)0)-
1278 ;-
1279 const unsigned char *p = *in;-
1280-
1281 if ((
(priv_key = d2...== ((void *)0)Description
TRUEevaluated 3292 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
FALSEevaluated 3060 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
priv_key = d2i_EC_PRIVATEKEY(
(priv_key = d2...== ((void *)0)Description
TRUEevaluated 3292 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
FALSEevaluated 3060 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
3060-3292
1282 ((void *)0)
(priv_key = d2...== ((void *)0)Description
TRUEevaluated 3292 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
FALSEevaluated 3060 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
3060-3292
1283 , &p, len)) ==
(priv_key = d2...== ((void *)0)Description
TRUEevaluated 3292 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
FALSEevaluated 3060 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
3060-3292
1284 ((void *)0)
(priv_key = d2...== ((void *)0)Description
TRUEevaluated 3292 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
FALSEevaluated 3060 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
3060-3292
1285 ) {-
1286 ERR_put_error(16,(146),(16),__FILE__,899);-
1287 return
executed 3292 times by 1 test: return ((void *)0) ;
Executed by:
  • libcrypto.so.1.1
executed 3292 times by 1 test: return ((void *)0) ;
Executed by:
  • libcrypto.so.1.1
3292
1288 ((void *)0)
executed 3292 times by 1 test: return ((void *)0) ;
Executed by:
  • libcrypto.so.1.1
3292
1289 ;
executed 3292 times by 1 test: return ((void *)0) ;
Executed by:
  • libcrypto.so.1.1
3292
1290 }-
1291-
1292 if (a ==
a == ((void *)0)Description
TRUEevaluated 2091 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
FALSEevaluated 969 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
969-2091
1293 ((void *)0)
a == ((void *)0)Description
TRUEevaluated 2091 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
FALSEevaluated 969 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
969-2091
1294 || *
*a == ((void *)0)Description
TRUEnever evaluated
FALSEevaluated 969 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
a ==
*a == ((void *)0)Description
TRUEnever evaluated
FALSEevaluated 969 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
0-969
1295 ((void *)0)
*a == ((void *)0)Description
TRUEnever evaluated
FALSEevaluated 969 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
0-969
1296 ) {-
1297 if ((
(ret = EC_KEY_...== ((void *)0)Description
TRUEnever evaluated
FALSEevaluated 2091 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
ret = EC_KEY_new()) ==
(ret = EC_KEY_...== ((void *)0)Description
TRUEnever evaluated
FALSEevaluated 2091 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
0-2091
1298 ((void *)0)
(ret = EC_KEY_...== ((void *)0)Description
TRUEnever evaluated
FALSEevaluated 2091 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
0-2091
1299 ) {-
1300 ERR_put_error(16,(146),((1|64)),__FILE__,905);-
1301 goto
never executed: goto err;
err;
never executed: goto err;
0
1302 }-
1303 }
executed 2091 times by 1 test: end of block
Executed by:
  • libcrypto.so.1.1
else
2091
1304 ret = *a;
executed 969 times by 1 test: ret = *a;
Executed by:
  • libcrypto.so.1.1
969
1305-
1306 if (priv_key->parameters
priv_key->parametersDescription
TRUEevaluated 2090 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
FALSEevaluated 970 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
) {
970-2090
1307 EC_GROUP_clear_free(ret->group);-
1308 ret->group = EC_GROUP_new_from_ecpkparameters(priv_key->parameters);-
1309 }
executed 2090 times by 1 test: end of block
Executed by:
  • libcrypto.so.1.1
2090
1310-
1311 if (ret->group ==
ret->group == ((void *)0)Description
TRUEevaluated 44 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
FALSEevaluated 3016 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
44-3016
1312 ((void *)0)
ret->group == ((void *)0)Description
TRUEevaluated 44 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
FALSEevaluated 3016 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
44-3016
1313 ) {-
1314 ERR_put_error(16,(146),(16),__FILE__,917);-
1315 goto
executed 44 times by 1 test: goto err;
Executed by:
  • libcrypto.so.1.1
err;
executed 44 times by 1 test: goto err;
Executed by:
  • libcrypto.so.1.1
44
1316 }-
1317-
1318 ret->version = priv_key->version;-
1319-
1320 if (priv_key->privateKey
priv_key->privateKeyDescription
TRUEevaluated 3016 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
FALSEnever evaluated
) {
0-3016
1321 ASN1_OCTET_STRING *pkey = priv_key->privateKey;-
1322 if (EC_KEY_oct2priv(ret, ASN1_STRING_get0_data(pkey),
EC_KEY_oct2pri...th(pkey)) == 0Description
TRUEnever evaluated
FALSEevaluated 3016 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
0-3016
1323 ASN1_STRING_length(pkey)) == 0
EC_KEY_oct2pri...th(pkey)) == 0Description
TRUEnever evaluated
FALSEevaluated 3016 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
)
0-3016
1324 goto
never executed: goto err;
err;
never executed: goto err;
0
1325 }
executed 3016 times by 1 test: end of block
Executed by:
  • libcrypto.so.1.1
else {
3016
1326 ERR_put_error(16,(146),(125),__FILE__,929);-
1327 goto
never executed: goto err;
err;
never executed: goto err;
0
1328 }-
1329-
1330 EC_POINT_clear_free(ret->pub_key);-
1331 ret->pub_key = EC_POINT_new(ret->group);-
1332 if (ret->pub_key ==
ret->pub_key == ((void *)0)Description
TRUEnever evaluated
FALSEevaluated 3016 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
0-3016
1333 ((void *)0)
ret->pub_key == ((void *)0)Description
TRUEnever evaluated
FALSEevaluated 3016 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
0-3016
1334 ) {-
1335 ERR_put_error(16,(146),(16),__FILE__,936);-
1336 goto
never executed: goto err;
err;
never executed: goto err;
0
1337 }-
1338-
1339 if (priv_key->publicKey
priv_key->publicKeyDescription
TRUEevaluated 2617 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
FALSEevaluated 399 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
) {
399-2617
1340 const unsigned char *pub_oct;-
1341 int pub_oct_len;-
1342-
1343 pub_oct = ASN1_STRING_get0_data(priv_key->publicKey);-
1344 pub_oct_len = ASN1_STRING_length(priv_key->publicKey);-
1345 if (!EC_KEY_oct2key(ret, pub_oct, pub_oct_len,
!EC_KEY_oct2ke... ((void *)0) )Description
TRUEevaluated 7 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
FALSEevaluated 2610 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
7-2610
1346 ((void *)0)
!EC_KEY_oct2ke... ((void *)0) )Description
TRUEevaluated 7 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
FALSEevaluated 2610 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
7-2610
1347 )
!EC_KEY_oct2ke... ((void *)0) )Description
TRUEevaluated 7 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
FALSEevaluated 2610 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
) {
7-2610
1348 ERR_put_error(16,(146),(16),__FILE__,947);-
1349 goto
executed 7 times by 1 test: goto err;
Executed by:
  • libcrypto.so.1.1
err;
executed 7 times by 1 test: goto err;
Executed by:
  • libcrypto.so.1.1
7
1350 }-
1351 }
executed 2610 times by 1 test: end of block
Executed by:
  • libcrypto.so.1.1
else {
2610
1352 if (ret->group->meth->keygenpub ==
ret->group->me...== ((void *)0)Description
TRUEnever evaluated
FALSEevaluated 399 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
0-399
1353 ((void *)0)
ret->group->me...== ((void *)0)Description
TRUEnever evaluated
FALSEevaluated 399 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
0-399
1354 -
1355 || ret->group->meth->keygenpub(ret) == 0
ret->group->me...npub(ret) == 0Description
TRUEnever evaluated
FALSEevaluated 399 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
)
0-399
1356 goto
never executed: goto err;
err;
never executed: goto err;
0
1357-
1358 ret->enc_flag |= 0x002;-
1359 }
executed 399 times by 1 test: end of block
Executed by:
  • libcrypto.so.1.1
399
1360-
1361 if (a
aDescription
TRUEevaluated 968 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
FALSEevaluated 2041 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
)
968-2041
1362 *
executed 968 times by 1 test: *a = ret;
Executed by:
  • libcrypto.so.1.1
a = ret;
executed 968 times by 1 test: *a = ret;
Executed by:
  • libcrypto.so.1.1
968
1363 EC_PRIVATEKEY_free(priv_key);-
1364 *in = p;-
1365 return
executed 3009 times by 1 test: return ret;
Executed by:
  • libcrypto.so.1.1
ret;
executed 3009 times by 1 test: return ret;
Executed by:
  • libcrypto.so.1.1
3009
1366-
1367 err:-
1368 if (a ==
a == ((void *)0)Description
TRUEevaluated 50 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
FALSEevaluated 1 time by 1 test
Evaluated by:
  • libcrypto.so.1.1
1-50
1369 ((void *)0)
a == ((void *)0)Description
TRUEevaluated 50 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
FALSEevaluated 1 time by 1 test
Evaluated by:
  • libcrypto.so.1.1
1-50
1370 || *
*a != retDescription
TRUEnever evaluated
FALSEevaluated 1 time by 1 test
Evaluated by:
  • libcrypto.so.1.1
a != ret
*a != retDescription
TRUEnever evaluated
FALSEevaluated 1 time by 1 test
Evaluated by:
  • libcrypto.so.1.1
)
0-1
1371 EC_KEY_free(ret);
executed 50 times by 1 test: EC_KEY_free(ret);
Executed by:
  • libcrypto.so.1.1
50
1372 EC_PRIVATEKEY_free(priv_key);-
1373 return
executed 51 times by 1 test: return ((void *)0) ;
Executed by:
  • libcrypto.so.1.1
executed 51 times by 1 test: return ((void *)0) ;
Executed by:
  • libcrypto.so.1.1
51
1374 ((void *)0)
executed 51 times by 1 test: return ((void *)0) ;
Executed by:
  • libcrypto.so.1.1
51
1375 ;
executed 51 times by 1 test: return ((void *)0) ;
Executed by:
  • libcrypto.so.1.1
51
1376}-
1377-
1378int i2d_ECPrivateKey(EC_KEY *a, unsigned char **out)-
1379{-
1380 int ret = 0, ok = 0;-
1381 unsigned char *priv= -
1382 ((void *)0)-
1383 , *pub= -
1384 ((void *)0)-
1385 ;-
1386 size_t privlen = 0, publen = 0;-
1387-
1388 EC_PRIVATEKEY *priv_key = -
1389 ((void *)0)-
1390 ;-
1391-
1392 if (a ==
a == ((void *)0)Description
TRUEnever evaluated
FALSEevaluated 255 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
0-255
1393 ((void *)0)
a == ((void *)0)Description
TRUEnever evaluated
FALSEevaluated 255 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
0-255
1394 || a->group ==
a->group == ((void *)0)Description
TRUEnever evaluated
FALSEevaluated 255 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
0-255
1395 ((void *)0)
a->group == ((void *)0)Description
TRUEnever evaluated
FALSEevaluated 255 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
0-255
1396 ||-
1397 (!(a->enc_flag & 0x002)
!(a->enc_flag & 0x002)Description
TRUEevaluated 28 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
FALSEevaluated 227 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
&& a->pub_key ==
a->pub_key == ((void *)0)Description
TRUEnever evaluated
FALSEevaluated 28 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
0-227
1398 ((void *)0)
a->pub_key == ((void *)0)Description
TRUEnever evaluated
FALSEevaluated 28 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
0-28
1399 )) {-
1400 ERR_put_error(16,(192),((3|64)),__FILE__,981);-
1401 goto
never executed: goto err;
err;
never executed: goto err;
0
1402 }-
1403-
1404 if ((
(priv_key = EC...== ((void *)0)Description
TRUEnever evaluated
FALSEevaluated 255 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
priv_key = EC_PRIVATEKEY_new()) ==
(priv_key = EC...== ((void *)0)Description
TRUEnever evaluated
FALSEevaluated 255 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
0-255
1405 ((void *)0)
(priv_key = EC...== ((void *)0)Description
TRUEnever evaluated
FALSEevaluated 255 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
0-255
1406 ) {-
1407 ERR_put_error(16,(192),((1|64)),__FILE__,986);-
1408 goto
never executed: goto err;
err;
never executed: goto err;
0
1409 }-
1410-
1411 priv_key->version = a->version;-
1412-
1413 privlen = EC_KEY_priv2buf(a, &priv);-
1414-
1415 if (privlen == 0
privlen == 0Description
TRUEevaluated 39 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
FALSEevaluated 216 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
) {
39-216
1416 ERR_put_error(16,(192),(16),__FILE__,995);-
1417 goto
executed 39 times by 1 test: goto err;
Executed by:
  • libcrypto.so.1.1
err;
executed 39 times by 1 test: goto err;
Executed by:
  • libcrypto.so.1.1
39
1418 }-
1419-
1420 ASN1_STRING_set0(priv_key->privateKey, priv, privlen);-
1421 priv = -
1422 ((void *)0)-
1423 ;-
1424-
1425 if (!(a->enc_flag & 0x001)
!(a->enc_flag & 0x001)Description
TRUEevaluated 206 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
FALSEevaluated 10 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
) {
10-206
1426 if ((
(priv_key->par...== ((void *)0)Description
TRUEnever evaluated
FALSEevaluated 206 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
priv_key->parameters =
(priv_key->par...== ((void *)0)Description
TRUEnever evaluated
FALSEevaluated 206 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
0-206
1427 EC_GROUP_get_ecpkparameters(a->group,
(priv_key->par...== ((void *)0)Description
TRUEnever evaluated
FALSEevaluated 206 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
0-206
1428 priv_key->parameters)) ==
(priv_key->par...== ((void *)0)Description
TRUEnever evaluated
FALSEevaluated 206 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
0-206
1429 ((void *)0)
(priv_key->par...== ((void *)0)Description
TRUEnever evaluated
FALSEevaluated 206 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
0-206
1430 ) {-
1431 ERR_put_error(16,(192),(16),__FILE__,1006);-
1432 goto
never executed: goto err;
err;
never executed: goto err;
0
1433 }-
1434 }
executed 206 times by 1 test: end of block
Executed by:
  • libcrypto.so.1.1
206
1435-
1436 if (!(a->enc_flag & 0x002)
!(a->enc_flag & 0x002)Description
TRUEevaluated 28 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
FALSEevaluated 188 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
) {
28-188
1437 priv_key->publicKey = ASN1_BIT_STRING_new();-
1438 if (priv_key->publicKey ==
priv_key->publ...== ((void *)0)Description
TRUEnever evaluated
FALSEevaluated 28 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
0-28
1439 ((void *)0)
priv_key->publ...== ((void *)0)Description
TRUEnever evaluated
FALSEevaluated 28 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
0-28
1440 ) {-
1441 ERR_put_error(16,(192),((1|64)),__FILE__,1014);-
1442 goto
never executed: goto err;
err;
never executed: goto err;
0
1443 }-
1444-
1445 publen = EC_KEY_key2buf(a, a->conv_form, &pub, -
1446 ((void *)0)-
1447 );-
1448-
1449 if (publen == 0
publen == 0Description
TRUEnever evaluated
FALSEevaluated 28 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
) {
0-28
1450 ERR_put_error(16,(192),(16),__FILE__,1021);-
1451 goto
never executed: goto err;
err;
never executed: goto err;
0
1452 }-
1453-
1454 priv_key->publicKey->flags &= ~(0x08 | 0x07);-
1455 priv_key->publicKey->flags |= 0x08;-
1456 ASN1_STRING_set0(priv_key->publicKey, pub, publen);-
1457 pub = -
1458 ((void *)0)-
1459 ;-
1460 }
executed 28 times by 1 test: end of block
Executed by:
  • libcrypto.so.1.1
28
1461-
1462 if ((
(ret = i2d_EC_...ey, out)) == 0Description
TRUEnever evaluated
FALSEevaluated 216 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
ret = i2d_EC_PRIVATEKEY(priv_key, out)) == 0
(ret = i2d_EC_...ey, out)) == 0Description
TRUEnever evaluated
FALSEevaluated 216 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
) {
0-216
1463 ERR_put_error(16,(192),(16),__FILE__,1032);-
1464 goto
never executed: goto err;
err;
never executed: goto err;
0
1465 }-
1466 ok = 1;-
1467 err:
code before this statement executed 216 times by 1 test: err:
Executed by:
  • libcrypto.so.1.1
216
1468 CRYPTO_clear_free(priv, privlen, __FILE__, 1037);-
1469 CRYPTO_free(pub, __FILE__, 1038);-
1470 EC_PRIVATEKEY_free(priv_key);-
1471 return
executed 255 times by 1 test: return (ok ? ret : 0);
Executed by:
  • libcrypto.so.1.1
(ok
okDescription
TRUEevaluated 216 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
FALSEevaluated 39 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
? ret : 0);
executed 255 times by 1 test: return (ok ? ret : 0);
Executed by:
  • libcrypto.so.1.1
39-255
1472}-
1473-
1474int i2d_ECParameters(EC_KEY *a, unsigned char **out)-
1475{-
1476 if (a ==
a == ((void *)0)Description
TRUEnever evaluated
FALSEevaluated 22 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
0-22
1477 ((void *)0)
a == ((void *)0)Description
TRUEnever evaluated
FALSEevaluated 22 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
0-22
1478 ) {-
1479 ERR_put_error(16,(190),((3|64)),__FILE__,1046);-
1480 return
never executed: return 0;
0;
never executed: return 0;
0
1481 }-
1482 return
executed 22 times by 1 test: return i2d_ECPKParameters(a->group, out);
Executed by:
  • libcrypto.so.1.1
i2d_ECPKParameters(a->group, out);
executed 22 times by 1 test: return i2d_ECPKParameters(a->group, out);
Executed by:
  • libcrypto.so.1.1
22
1483}-
1484-
1485EC_KEY *d2i_ECParameters(EC_KEY **a, const unsigned char **in, long len)-
1486{-
1487 EC_KEY *ret;-
1488-
1489 if (in ==
in == ((void *)0)Description
TRUEnever evaluated
FALSEevaluated 5242 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
0-5242
1490 ((void *)0)
in == ((void *)0)Description
TRUEnever evaluated
FALSEevaluated 5242 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
0-5242
1491 || *
*in == ((void *)0)Description
TRUEnever evaluated
FALSEevaluated 5242 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
in ==
*in == ((void *)0)Description
TRUEnever evaluated
FALSEevaluated 5242 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
0-5242
1492 ((void *)0)
*in == ((void *)0)Description
TRUEnever evaluated
FALSEevaluated 5242 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
0-5242
1493 ) {-
1494 ERR_put_error(16,(144),((3|64)),__FILE__,1057);-
1495 return
never executed: return ((void *)0) ;
never executed: return ((void *)0) ;
0
1496 ((void *)0)
never executed: return ((void *)0) ;
0
1497 ;
never executed: return ((void *)0) ;
0
1498 }-
1499-
1500 if (a ==
a == ((void *)0)Description
TRUEevaluated 5242 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
FALSEnever evaluated
0-5242
1501 ((void *)0)
a == ((void *)0)Description
TRUEevaluated 5242 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
FALSEnever evaluated
0-5242
1502 || *
*a == ((void *)0)Description
TRUEnever evaluated
FALSEnever evaluated
a ==
*a == ((void *)0)Description
TRUEnever evaluated
FALSEnever evaluated
0
1503 ((void *)0)
*a == ((void *)0)Description
TRUEnever evaluated
FALSEnever evaluated
0
1504 ) {-
1505 if ((
(ret = EC_KEY_...== ((void *)0)Description
TRUEnever evaluated
FALSEevaluated 5242 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
ret = EC_KEY_new()) ==
(ret = EC_KEY_...== ((void *)0)Description
TRUEnever evaluated
FALSEevaluated 5242 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
0-5242
1506 ((void *)0)
(ret = EC_KEY_...== ((void *)0)Description
TRUEnever evaluated
FALSEevaluated 5242 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
0-5242
1507 ) {-
1508 ERR_put_error(16,(144),((1|64)),__FILE__,1063);-
1509 return
never executed: return ((void *)0) ;
never executed: return ((void *)0) ;
0
1510 ((void *)0)
never executed: return ((void *)0) ;
0
1511 ;
never executed: return ((void *)0) ;
0
1512 }-
1513 }
executed 5242 times by 1 test: end of block
Executed by:
  • libcrypto.so.1.1
else
5242
1514 ret = *a;
never executed: ret = *a;
0
1515-
1516 if (!d2i_ECPKParameters(&ret->group, in, len)
!d2i_ECPKParam...roup, in, len)Description
TRUEevaluated 5109 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
FALSEevaluated 133 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
) {
133-5109
1517 ERR_put_error(16,(144),(16),__FILE__,1070);-
1518 if (a ==
a == ((void *)0)Description
TRUEevaluated 5109 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
FALSEnever evaluated
0-5109
1519 ((void *)0)
a == ((void *)0)Description
TRUEevaluated 5109 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
FALSEnever evaluated
0-5109
1520 || *
*a != retDescription
TRUEnever evaluated
FALSEnever evaluated
a != ret
*a != retDescription
TRUEnever evaluated
FALSEnever evaluated
)
0
1521 EC_KEY_free(ret);
executed 5109 times by 1 test: EC_KEY_free(ret);
Executed by:
  • libcrypto.so.1.1
5109
1522 return
executed 5109 times by 1 test: return ((void *)0) ;
Executed by:
  • libcrypto.so.1.1
executed 5109 times by 1 test: return ((void *)0) ;
Executed by:
  • libcrypto.so.1.1
5109
1523 ((void *)0)
executed 5109 times by 1 test: return ((void *)0) ;
Executed by:
  • libcrypto.so.1.1
5109
1524 ;
executed 5109 times by 1 test: return ((void *)0) ;
Executed by:
  • libcrypto.so.1.1
5109
1525 }-
1526-
1527 if (a
aDescription
TRUEnever evaluated
FALSEevaluated 133 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
)
0-133
1528 *
never executed: *a = ret;
a = ret;
never executed: *a = ret;
0
1529-
1530 return
executed 133 times by 1 test: return ret;
Executed by:
  • libcrypto.so.1.1
ret;
executed 133 times by 1 test: return ret;
Executed by:
  • libcrypto.so.1.1
133
1531}-
1532-
1533EC_KEY *o2i_ECPublicKey(EC_KEY **a, const unsigned char **in, long len)-
1534{-
1535 EC_KEY *ret = -
1536 ((void *)0)-
1537 ;-
1538-
1539 if (a ==
a == ((void *)0)Description
TRUEnever evaluated
FALSEevaluated 30886 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
0-30886
1540 ((void *)0)
a == ((void *)0)Description
TRUEnever evaluated
FALSEevaluated 30886 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
0-30886
1541 || (*
(*a) == ((void *)0)Description
TRUEnever evaluated
FALSEevaluated 30886 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
a) ==
(*a) == ((void *)0)Description
TRUEnever evaluated
FALSEevaluated 30886 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
0-30886
1542 ((void *)0)
(*a) == ((void *)0)Description
TRUEnever evaluated
FALSEevaluated 30886 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
0-30886
1543 || (*
(*a)->group == ((void *)0)Description
TRUEnever evaluated
FALSEevaluated 30886 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
a)->group ==
(*a)->group == ((void *)0)Description
TRUEnever evaluated
FALSEevaluated 30886 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
0-30886
1544 ((void *)0)
(*a)->group == ((void *)0)Description
TRUEnever evaluated
FALSEevaluated 30886 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
0-30886
1545 ) {-
1546-
1547-
1548-
1549 ERR_put_error(16,(152),((3|64)),__FILE__,1090);-
1550 return
never executed: return 0;
0;
never executed: return 0;
0
1551 }-
1552 ret = *a;-
1553 if (!EC_KEY_oct2key(ret, *in, len,
!EC_KEY_oct2ke... ((void *)0) )Description
TRUEevaluated 7011 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
FALSEevaluated 23875 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
7011-23875
1554 ((void *)0)
!EC_KEY_oct2ke... ((void *)0) )Description
TRUEevaluated 7011 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
FALSEevaluated 23875 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
7011-23875
1555 )
!EC_KEY_oct2ke... ((void *)0) )Description
TRUEevaluated 7011 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
FALSEevaluated 23875 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
) {
7011-23875
1556 ERR_put_error(16,(152),(16),__FILE__,1095);-
1557 return
executed 7011 times by 1 test: return 0;
Executed by:
  • libcrypto.so.1.1
0;
executed 7011 times by 1 test: return 0;
Executed by:
  • libcrypto.so.1.1
7011
1558 }-
1559 *in += len;-
1560 return
executed 23875 times by 1 test: return ret;
Executed by:
  • libcrypto.so.1.1
ret;
executed 23875 times by 1 test: return ret;
Executed by:
  • libcrypto.so.1.1
23875
1561}-
1562-
1563int i2o_ECPublicKey(const EC_KEY *a, unsigned char **out)-
1564{-
1565 size_t buf_len = 0;-
1566 int new_buffer = 0;-
1567-
1568 if (a ==
a == ((void *)0)Description
TRUEnever evaluated
FALSEevaluated 26186 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
0-26186
1569 ((void *)0)
a == ((void *)0)Description
TRUEnever evaluated
FALSEevaluated 26186 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
0-26186
1570 ) {-
1571 ERR_put_error(16,(151),((3|64)),__FILE__,1108);-
1572 return
never executed: return 0;
0;
never executed: return 0;
0
1573 }-
1574-
1575 buf_len = EC_POINT_point2oct(a->group, a->pub_key,-
1576 a->conv_form, -
1577 ((void *)0)-
1578 , 0, -
1579 ((void *)0)-
1580 );-
1581-
1582 if (out ==
out == ((void *)0)Description
TRUEevaluated 13093 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
FALSEevaluated 13093 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
13093
1583 ((void *)0)
out == ((void *)0)Description
TRUEevaluated 13093 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
FALSEevaluated 13093 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
13093
1584 || buf_len == 0
buf_len == 0Description
TRUEnever evaluated
FALSEevaluated 13093 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
)
0-13093
1585-
1586 return
executed 13093 times by 1 test: return buf_len;
Executed by:
  • libcrypto.so.1.1
buf_len;
executed 13093 times by 1 test: return buf_len;
Executed by:
  • libcrypto.so.1.1
13093
1587-
1588 if (*
*out == ((void *)0)Description
TRUEnever evaluated
FALSEevaluated 13093 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
out ==
*out == ((void *)0)Description
TRUEnever evaluated
FALSEevaluated 13093 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
0-13093
1589 ((void *)0)
*out == ((void *)0)Description
TRUEnever evaluated
FALSEevaluated 13093 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
0-13093
1590 ) {-
1591 if ((*
(*out = CRYPTO...== ((void *)0)Description
TRUEnever evaluated
FALSEnever evaluated
out = CRYPTO_malloc(buf_len, __FILE__, 1120)) ==
(*out = CRYPTO...== ((void *)0)Description
TRUEnever evaluated
FALSEnever evaluated
0
1592 ((void *)0)
(*out = CRYPTO...== ((void *)0)Description
TRUEnever evaluated
FALSEnever evaluated
0
1593 ) {-
1594 ERR_put_error(16,(151),((1|64)),__FILE__,1121);-
1595 return
never executed: return 0;
0;
never executed: return 0;
0
1596 }-
1597 new_buffer = 1;-
1598 }
never executed: end of block
0
1599 if (!EC_POINT_point2oct(a->group, a->pub_key, a->conv_form,
!EC_POINT_poin... ((void *)0) )Description
TRUEnever evaluated
FALSEevaluated 13093 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
0-13093
1600 *out, buf_len,
!EC_POINT_poin... ((void *)0) )Description
TRUEnever evaluated
FALSEevaluated 13093 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
0-13093
1601 ((void *)0)
!EC_POINT_poin... ((void *)0) )Description
TRUEnever evaluated
FALSEevaluated 13093 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
0-13093
1602 )
!EC_POINT_poin... ((void *)0) )Description
TRUEnever evaluated
FALSEevaluated 13093 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
) {
0-13093
1603 ERR_put_error(16,(151),(16),__FILE__,1128);-
1604 if (new_buffer
new_bufferDescription
TRUEnever evaluated
FALSEnever evaluated
) {
0
1605 CRYPTO_free(*out, __FILE__, 1130);-
1606 *out = -
1607 ((void *)0)-
1608 ;-
1609 }
never executed: end of block
0
1610 return
never executed: return 0;
0;
never executed: return 0;
0
1611 }-
1612 if (!new_buffer
!new_bufferDescription
TRUEevaluated 13093 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
FALSEnever evaluated
)
0-13093
1613 *
executed 13093 times by 1 test: *out += buf_len;
Executed by:
  • libcrypto.so.1.1
out += buf_len;
executed 13093 times by 1 test: *out += buf_len;
Executed by:
  • libcrypto.so.1.1
13093
1614 return
executed 13093 times by 1 test: return buf_len;
Executed by:
  • libcrypto.so.1.1
buf_len;
executed 13093 times by 1 test: return buf_len;
Executed by:
  • libcrypto.so.1.1
13093
1615}-
1616-
1617static const ASN1_TEMPLATE ECDSA_SIG_seq_tt[] = {-
1618 { (0), (0), -
1619 __builtin_offsetof (-
1620 ECDSA_SIG-
1621 , -
1622 r-
1623 )-
1624 , "r", (&(CBIGNUM_it)) },-
1625 { (0), (0), -
1626 __builtin_offsetof (-
1627 ECDSA_SIG-
1628 , -
1629 s-
1630 )-
1631 , "s", (&(CBIGNUM_it)) }-
1632} ; static const ASN1_ITEM ECDSA_SIG_it = { 0x1, 16, ECDSA_SIG_seq_tt, sizeof(ECDSA_SIG_seq_tt) / sizeof(ASN1_TEMPLATE), -
1633 ((void *)0)-
1634 , sizeof(ECDSA_SIG), "ECDSA_SIG" };-
1635-
1636ECDSA_SIG *ECDSA_SIG_new(void); void ECDSA_SIG_free(ECDSA_SIG *a); ECDSA_SIG *d2i_ECDSA_SIG(ECDSA_SIG **a, const unsigned char **in, long len); int i2d_ECDSA_SIG(const ECDSA_SIG *a, unsigned char **out); extern const ASN1_ITEM ECDSA_SIG_it;-
1637ECDSA_SIG *d2i_ECDSA_SIG(ECDSA_SIG **a, const unsigned char **in, long len); int i2d_ECDSA_SIG(const ECDSA_SIG *a, unsigned char **out); extern const ASN1_ITEM ECDSA_SIG_it;-
1638ECDSA_SIG *d2i_ECDSA_SIG(ECDSA_SIG **a, const unsigned char **in, long len) { return
executed 4060 times by 1 test: return (ECDSA_SIG *)ASN1_item_d2i((ASN1_VALUE **)a, in, len, (&(ECDSA_SIG_it)));
Executed by:
  • libcrypto.so.1.1
(ECDSA_SIG *)ASN1_item_d2i((ASN1_VALUE **)a, in, len, (&(ECDSA_SIG_it)));
executed 4060 times by 1 test: return (ECDSA_SIG *)ASN1_item_d2i((ASN1_VALUE **)a, in, len, (&(ECDSA_SIG_it)));
Executed by:
  • libcrypto.so.1.1
} int i2d_ECDSA_SIG(const ECDSA_SIG *a, unsigned char **out) { return
executed 1106 times by 1 test: return ASN1_item_i2d((ASN1_VALUE *)a, out, (&(ECDSA_SIG_it)));
Executed by:
  • libcrypto.so.1.1
ASN1_item_i2d((ASN1_VALUE *)a, out, (&(ECDSA_SIG_it)));
executed 1106 times by 1 test: return ASN1_item_i2d((ASN1_VALUE *)a, out, (&(ECDSA_SIG_it)));
Executed by:
  • libcrypto.so.1.1
}
1106-4060
1639-
1640ECDSA_SIG *ECDSA_SIG_new(void)-
1641{-
1642 ECDSA_SIG *sig = CRYPTO_zalloc(sizeof(*sig), __FILE__, 1151);-
1643 if (sig ==
sig == ((void *)0)Description
TRUEnever evaluated
FALSEevaluated 1107 times by 2 tests
Evaluated by:
  • libcrypto.so.1.1
  • sm2_internal_test
0-1107
1644 ((void *)0)
sig == ((void *)0)Description
TRUEnever evaluated
FALSEevaluated 1107 times by 2 tests
Evaluated by:
  • libcrypto.so.1.1
  • sm2_internal_test
0-1107
1645 )-
1646 ERR_put_error(16,(265),((1|64)),__FILE__,1153);
never executed: ERR_put_error(16,(265),((1|64)),__FILE__,1153);
0
1647 return
executed 1107 times by 2 tests: return sig;
Executed by:
  • libcrypto.so.1.1
  • sm2_internal_test
sig;
executed 1107 times by 2 tests: return sig;
Executed by:
  • libcrypto.so.1.1
  • sm2_internal_test
1107
1648}-
1649-
1650void ECDSA_SIG_free(ECDSA_SIG *sig)-
1651{-
1652 if (sig ==
sig == ((void *)0)Description
TRUEevaluated 76 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
FALSEevaluated 1111 times by 2 tests
Evaluated by:
  • libcrypto.so.1.1
  • sm2_internal_test
76-1111
1653 ((void *)0)
sig == ((void *)0)Description
TRUEevaluated 76 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
FALSEevaluated 1111 times by 2 tests
Evaluated by:
  • libcrypto.so.1.1
  • sm2_internal_test
76-1111
1654 )-
1655 return;
executed 76 times by 1 test: return;
Executed by:
  • libcrypto.so.1.1
76
1656 BN_clear_free(sig->r);-
1657 BN_clear_free(sig->s);-
1658 CRYPTO_free(sig, __FILE__, 1163);-
1659}
executed 1111 times by 2 tests: end of block
Executed by:
  • libcrypto.so.1.1
  • sm2_internal_test
1111
1660-
1661void ECDSA_SIG_get0(const ECDSA_SIG *sig, const BIGNUM **pr, const BIGNUM **ps)-
1662{-
1663 if (pr !=
pr != ((void *)0)Description
TRUEevaluated 79 times by 2 tests
Evaluated by:
  • libcrypto.so.1.1
  • sm2_internal_test
FALSEnever evaluated
0-79
1664 ((void *)0)
pr != ((void *)0)Description
TRUEevaluated 79 times by 2 tests
Evaluated by:
  • libcrypto.so.1.1
  • sm2_internal_test
FALSEnever evaluated
0-79
1665 )-
1666 *
executed 79 times by 2 tests: *pr = sig->r;
Executed by:
  • libcrypto.so.1.1
  • sm2_internal_test
pr = sig->r;
executed 79 times by 2 tests: *pr = sig->r;
Executed by:
  • libcrypto.so.1.1
  • sm2_internal_test
79
1667 if (ps !=
ps != ((void *)0)Description
TRUEevaluated 79 times by 2 tests
Evaluated by:
  • libcrypto.so.1.1
  • sm2_internal_test
FALSEnever evaluated
0-79
1668 ((void *)0)
ps != ((void *)0)Description
TRUEevaluated 79 times by 2 tests
Evaluated by:
  • libcrypto.so.1.1
  • sm2_internal_test
FALSEnever evaluated
0-79
1669 )-
1670 *
executed 79 times by 2 tests: *ps = sig->s;
Executed by:
  • libcrypto.so.1.1
  • sm2_internal_test
ps = sig->s;
executed 79 times by 2 tests: *ps = sig->s;
Executed by:
  • libcrypto.so.1.1
  • sm2_internal_test
79
1671}
executed 79 times by 2 tests: end of block
Executed by:
  • libcrypto.so.1.1
  • sm2_internal_test
79
1672-
1673const BIGNUM *ECDSA_SIG_get0_r(const ECDSA_SIG *sig)-
1674{-
1675 return
never executed: return sig->r;
sig->r;
never executed: return sig->r;
0
1676}-
1677-
1678const BIGNUM *ECDSA_SIG_get0_s(const ECDSA_SIG *sig)-
1679{-
1680 return
never executed: return sig->s;
sig->s;
never executed: return sig->s;
0
1681}-
1682-
1683int ECDSA_SIG_set0(ECDSA_SIG *sig, BIGNUM *r, BIGNUM *s)-
1684{-
1685 if (r ==
r == ((void *)0)Description
TRUEnever evaluated
FALSEevaluated 139 times by 2 tests
Evaluated by:
  • libcrypto.so.1.1
  • sm2_internal_test
0-139
1686 ((void *)0)
r == ((void *)0)Description
TRUEnever evaluated
FALSEevaluated 139 times by 2 tests
Evaluated by:
  • libcrypto.so.1.1
  • sm2_internal_test
0-139
1687 || s ==
s == ((void *)0)Description
TRUEnever evaluated
FALSEevaluated 139 times by 2 tests
Evaluated by:
  • libcrypto.so.1.1
  • sm2_internal_test
0-139
1688 ((void *)0)
s == ((void *)0)Description
TRUEnever evaluated
FALSEevaluated 139 times by 2 tests
Evaluated by:
  • libcrypto.so.1.1
  • sm2_internal_test
0-139
1689 )-
1690 return
never executed: return 0;
0;
never executed: return 0;
0
1691 BN_clear_free(sig->r);-
1692 BN_clear_free(sig->s);-
1693 sig->r = r;-
1694 sig->s = s;-
1695 return
executed 139 times by 2 tests: return 1;
Executed by:
  • libcrypto.so.1.1
  • sm2_internal_test
1;
executed 139 times by 2 tests: return 1;
Executed by:
  • libcrypto.so.1.1
  • sm2_internal_test
139
1696}-
1697-
1698int ECDSA_size(const EC_KEY *r)-
1699{-
1700 int ret, i;-
1701 ASN1_INTEGER bs;-
1702 unsigned char buf[4];-
1703 const EC_GROUP *group;-
1704-
1705 if (r ==
r == ((void *)0)Description
TRUEnever evaluated
FALSEevaluated 849 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
0-849
1706 ((void *)0)
r == ((void *)0)Description
TRUEnever evaluated
FALSEevaluated 849 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
0-849
1707 )-
1708 return
never executed: return 0;
0;
never executed: return 0;
0
1709 group = EC_KEY_get0_group(r);-
1710 if (group ==
group == ((void *)0)Description
TRUEnever evaluated
FALSEevaluated 849 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
0-849
1711 ((void *)0)
group == ((void *)0)Description
TRUEnever evaluated
FALSEevaluated 849 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
0-849
1712 )-
1713 return
never executed: return 0;
0;
never executed: return 0;
0
1714-
1715 i = EC_GROUP_order_bits(group);-
1716 if (i == 0
i == 0Description
TRUEnever evaluated
FALSEevaluated 849 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
)
0-849
1717 return
never executed: return 0;
0;
never executed: return 0;
0
1718 bs.length = (i + 7) / 8;-
1719 bs.data = buf;-
1720 bs.type = 2;-
1721-
1722 buf[0] = 0xff;-
1723-
1724 i = i2d_ASN1_INTEGER(&bs, -
1725 ((void *)0)-
1726 );-
1727 i += i;-
1728 ret = ASN1_object_size(1, i, 16);-
1729 return
executed 849 times by 1 test: return ret;
Executed by:
  • libcrypto.so.1.1
ret;
executed 849 times by 1 test: return ret;
Executed by:
  • libcrypto.so.1.1
849
1730}-
Switch to Source codePreprocessed file

Generated by Squish Coco 4.2.2