OpenCoverage

ec_check.c

Absolute File Name:/home/opencoverage/opencoverage/guest-scripts/openssl/src/crypto/ec/ec_check.c
Switch to Source codePreprocessed file
LineSourceCount
1-
2int EC_GROUP_check(const EC_GROUP *group, BN_CTX *ctx)-
3{-
4 int ret = 0;-
5 const BIGNUM *order;-
6 BN_CTX *new_ctx = -
7 ((void *)0)-
8 ;-
9 EC_POINT *point = -
10 ((void *)0)-
11 ;-
12-
13-
14 if ((
(group->meth->...gs & 0x2) != 0Description
TRUEnever evaluated
FALSEevaluated 216 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
group->meth->flags & 0x2) != 0
(group->meth->...gs & 0x2) != 0Description
TRUEnever evaluated
FALSEevaluated 216 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
)
0-216
15 return
never executed: return 1;
1;
never executed: return 1;
0
16-
17 if (ctx ==
ctx == ((void *)0)Description
TRUEevaluated 216 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
FALSEnever evaluated
0-216
18 ((void *)0)
ctx == ((void *)0)Description
TRUEevaluated 216 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
FALSEnever evaluated
0-216
19 ) {-
20 ctx = new_ctx = BN_CTX_new();-
21 if (ctx ==
ctx == ((void *)0)Description
TRUEnever evaluated
FALSEevaluated 216 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
0-216
22 ((void *)0)
ctx == ((void *)0)Description
TRUEnever evaluated
FALSEevaluated 216 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
0-216
23 ) {-
24 ERR_put_error(16,(170),((1|64)),__FILE__,27);-
25 goto
never executed: goto err;
err;
never executed: goto err;
0
26 }-
27 }
executed 216 times by 1 test: end of block
Executed by:
  • libcrypto.so.1.1
216
28-
29-
30 if (!EC_GROUP_check_discriminant(group, ctx)
!EC_GROUP_chec...nt(group, ctx)Description
TRUEnever evaluated
FALSEevaluated 216 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
) {
0-216
31 ERR_put_error(16,(170),(118),__FILE__,34);-
32 goto
never executed: goto err;
err;
never executed: goto err;
0
33 }-
34-
35-
36 if (group->generator ==
group->generat...== ((void *)0)Description
TRUEnever evaluated
FALSEevaluated 216 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
0-216
37 ((void *)0)
group->generat...== ((void *)0)Description
TRUEnever evaluated
FALSEevaluated 216 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
0-216
38 ) {-
39 ERR_put_error(16,(170),(113),__FILE__,40);-
40 goto
never executed: goto err;
err;
never executed: goto err;
0
41 }-
42 if (EC_POINT_is_on_curve(group, group->generator, ctx) <= 0
EC_POINT_is_on...tor, ctx) <= 0Description
TRUEnever evaluated
FALSEevaluated 216 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
) {
0-216
43 ERR_put_error(16,(170),(107),__FILE__,44);-
44 goto
never executed: goto err;
err;
never executed: goto err;
0
45 }-
46-
47-
48 if ((
(point = EC_PO...== ((void *)0)Description
TRUEnever evaluated
FALSEevaluated 216 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
point = EC_POINT_new(group)) ==
(point = EC_PO...== ((void *)0)Description
TRUEnever evaluated
FALSEevaluated 216 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
0-216
49 ((void *)0)
(point = EC_PO...== ((void *)0)Description
TRUEnever evaluated
FALSEevaluated 216 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
0-216
50 )-
51 goto
never executed: goto err;
err;
never executed: goto err;
0
52 order = EC_GROUP_get0_order(group);-
53 if (order ==
order == ((void *)0)Description
TRUEnever evaluated
FALSEevaluated 216 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
0-216
54 ((void *)0)
order == ((void *)0)Description
TRUEnever evaluated
FALSEevaluated 216 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
0-216
55 )-
56 goto
never executed: goto err;
err;
never executed: goto err;
0
57 if (BN_is_zero(order)
BN_is_zero(order)Description
TRUEnever evaluated
FALSEevaluated 216 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
) {
0-216
58 ERR_put_error(16,(170),(128),__FILE__,55);-
59 goto
never executed: goto err;
err;
never executed: goto err;
0
60 }-
61-
62 if (!EC_POINT_mul(group, point, order,
!EC_POINT_mul(...id *)0) , ctx)Description
TRUEnever evaluated
FALSEevaluated 216 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
0-216
63 ((void *)0)
!EC_POINT_mul(...id *)0) , ctx)Description
TRUEnever evaluated
FALSEevaluated 216 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
0-216
64 ,
!EC_POINT_mul(...id *)0) , ctx)Description
TRUEnever evaluated
FALSEevaluated 216 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
0-216
65 ((void *)0)
!EC_POINT_mul(...id *)0) , ctx)Description
TRUEnever evaluated
FALSEevaluated 216 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
0-216
66 , ctx)
!EC_POINT_mul(...id *)0) , ctx)Description
TRUEnever evaluated
FALSEevaluated 216 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
)
0-216
67 goto
never executed: goto err;
err;
never executed: goto err;
0
68 if (!EC_POINT_is_at_infinity(group, point)
!EC_POINT_is_a...(group, point)Description
TRUEevaluated 1 time by 1 test
Evaluated by:
  • libcrypto.so.1.1
FALSEevaluated 215 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
) {
1-215
69 ERR_put_error(16,(170),(122),__FILE__,62);-
70 goto
executed 1 time by 1 test: goto err;
Executed by:
  • libcrypto.so.1.1
err;
executed 1 time by 1 test: goto err;
Executed by:
  • libcrypto.so.1.1
1
71 }-
72-
73 ret = 1;-
74-
75 err:
code before this statement executed 215 times by 1 test: err:
Executed by:
  • libcrypto.so.1.1
215
76 BN_CTX_free(new_ctx);-
77 EC_POINT_free(point);-
78 return
executed 216 times by 1 test: return ret;
Executed by:
  • libcrypto.so.1.1
ret;
executed 216 times by 1 test: return ret;
Executed by:
  • libcrypto.so.1.1
216
79}-
Switch to Source codePreprocessed file

Generated by Squish Coco 4.2.2