OpenCoverage

ec_oct.c

Absolute File Name:/home/opencoverage/opencoverage/guest-scripts/openssl/src/crypto/ec/ec_oct.c
Switch to Source codePreprocessed file
LineSourceCount
1-
2-
3-
4-
5int EC_POINT_set_compressed_coordinates(const EC_GROUP *group, EC_POINT *point,-
6 const BIGNUM *x, int y_bit, BN_CTX *ctx)-
7{-
8 if (group->meth->point_set_compressed_coordinates ==
group->meth->p...== ((void *)0)Description
TRUEevaluated 10571 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
FALSEnever evaluated
0-10571
9 ((void *)0)
group->meth->p...== ((void *)0)Description
TRUEevaluated 10571 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
FALSEnever evaluated
0-10571
10 -
11 && !(group->meth->flags & 0x1)
!(group->meth->flags & 0x1)Description
TRUEnever evaluated
FALSEevaluated 10571 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
) {
0-10571
12 ERR_put_error(16,(295),((2|64)),__FILE__,24)-
13 ;-
14 return
never executed: return 0;
0;
never executed: return 0;
0
15 }-
16 if (!ec_point_is_compat(point, group)
!ec_point_is_c...(point, group)Description
TRUEnever evaluated
FALSEevaluated 10571 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
) {
0-10571
17 ERR_put_error(16,(295),(101),__FILE__,29)-
18 ;-
19 return
never executed: return 0;
0;
never executed: return 0;
0
20 }-
21 if (group->meth->flags & 0x1
group->meth->flags & 0x1Description
TRUEevaluated 10571 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
FALSEnever evaluated
) {
0-10571
22 if (group->meth->field_type == 406
group->meth->field_type == 406Description
TRUEevaluated 4526 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
FALSEevaluated 6045 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
)
4526-6045
23 return
executed 4526 times by 1 test: return ec_GFp_simple_set_compressed_coordinates(group, point, x, y_bit, ctx);
Executed by:
  • libcrypto.so.1.1
ec_GFp_simple_set_compressed_coordinates(group, point, x,
executed 4526 times by 1 test: return ec_GFp_simple_set_compressed_coordinates(group, point, x, y_bit, ctx);
Executed by:
  • libcrypto.so.1.1
4526
24 y_bit, ctx);
executed 4526 times by 1 test: return ec_GFp_simple_set_compressed_coordinates(group, point, x, y_bit, ctx);
Executed by:
  • libcrypto.so.1.1
4526
25 else-
26-
27-
28-
29-
30-
31-
32-
33 return
executed 6045 times by 1 test: return ec_GF2m_simple_set_compressed_coordinates(group, point, x, y_bit, ctx);
Executed by:
  • libcrypto.so.1.1
ec_GF2m_simple_set_compressed_coordinates(group, point, x,
executed 6045 times by 1 test: return ec_GF2m_simple_set_compressed_coordinates(group, point, x, y_bit, ctx);
Executed by:
  • libcrypto.so.1.1
6045
34 y_bit, ctx);
executed 6045 times by 1 test: return ec_GF2m_simple_set_compressed_coordinates(group, point, x, y_bit, ctx);
Executed by:
  • libcrypto.so.1.1
6045
35-
36 }-
37 return
never executed: return group->meth->point_set_compressed_coordinates(group, point, x, y_bit, ctx);
group->meth->point_set_compressed_coordinates(group, point, x,
never executed: return group->meth->point_set_compressed_coordinates(group, point, x, y_bit, ctx);
0
38 y_bit, ctx);
never executed: return group->meth->point_set_compressed_coordinates(group, point, x, y_bit, ctx);
0
39}-
40-
41-
42int EC_POINT_set_compressed_coordinates_GFp(const EC_GROUP *group,-
43 EC_POINT *point, const BIGNUM *x,-
44 int y_bit, BN_CTX *ctx)-
45{-
46 return
never executed: return EC_POINT_set_compressed_coordinates(group, point, x, y_bit, ctx);
EC_POINT_set_compressed_coordinates(group, point, x, y_bit, ctx);
never executed: return EC_POINT_set_compressed_coordinates(group, point, x, y_bit, ctx);
0
47}-
48-
49-
50int EC_POINT_set_compressed_coordinates_GF2m(const EC_GROUP *group,-
51 EC_POINT *point, const BIGNUM *x,-
52 int y_bit, BN_CTX *ctx)-
53{-
54 return
never executed: return EC_POINT_set_compressed_coordinates(group, point, x, y_bit, ctx);
EC_POINT_set_compressed_coordinates(group, point, x, y_bit, ctx);
never executed: return EC_POINT_set_compressed_coordinates(group, point, x, y_bit, ctx);
0
55}-
56-
57-
58-
59size_t EC_POINT_point2oct(const EC_GROUP *group, const EC_POINT *point,-
60 point_conversion_form_t form, unsigned char *buf,-
61 size_t len, BN_CTX *ctx)-
62{-
63 if (group->meth->point2oct == 0
group->meth->point2oct == 0Description
TRUEevaluated 41855 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
FALSEnever evaluated
0-41855
64 && !(group->meth->flags & 0x1)
!(group->meth->flags & 0x1)Description
TRUEnever evaluated
FALSEevaluated 41855 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
) {
0-41855
65 ERR_put_error(16,(123),((2|64)),__FILE__,76);-
66 return
never executed: return 0;
0;
never executed: return 0;
0
67 }-
68 if (!ec_point_is_compat(point, group)
!ec_point_is_c...(point, group)Description
TRUEnever evaluated
FALSEevaluated 41855 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
) {
0-41855
69 ERR_put_error(16,(123),(101),__FILE__,80);-
70 return
never executed: return 0;
0;
never executed: return 0;
0
71 }-
72 if (group->meth->flags & 0x1
group->meth->flags & 0x1Description
TRUEevaluated 41855 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
FALSEnever evaluated
) {
0-41855
73 if (group->meth->field_type == 406
group->meth->field_type == 406Description
TRUEevaluated 41654 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
FALSEevaluated 201 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
)
201-41654
74 return
executed 41654 times by 1 test: return ec_GFp_simple_point2oct(group, point, form, buf, len, ctx);
Executed by:
  • libcrypto.so.1.1
ec_GFp_simple_point2oct(group, point, form, buf, len, ctx);
executed 41654 times by 1 test: return ec_GFp_simple_point2oct(group, point, form, buf, len, ctx);
Executed by:
  • libcrypto.so.1.1
41654
75 else-
76-
77-
78-
79-
80-
81-
82 return
executed 201 times by 1 test: return ec_GF2m_simple_point2oct(group, point, form, buf, len, ctx);
Executed by:
  • libcrypto.so.1.1
ec_GF2m_simple_point2oct(group, point,
executed 201 times by 1 test: return ec_GF2m_simple_point2oct(group, point, form, buf, len, ctx);
Executed by:
  • libcrypto.so.1.1
201
83 form, buf, len, ctx);
executed 201 times by 1 test: return ec_GF2m_simple_point2oct(group, point, form, buf, len, ctx);
Executed by:
  • libcrypto.so.1.1
201
84-
85 }-
86-
87 return
never executed: return group->meth->point2oct(group, point, form, buf, len, ctx);
group->meth->point2oct(group, point, form, buf, len, ctx);
never executed: return group->meth->point2oct(group, point, form, buf, len, ctx);
0
88}-
89-
90int EC_POINT_oct2point(const EC_GROUP *group, EC_POINT *point,-
91 const unsigned char *buf, size_t len, BN_CTX *ctx)-
92{-
93 if (group->meth->oct2point == 0
group->meth->oct2point == 0Description
TRUEevaluated 34424 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
FALSEnever evaluated
0-34424
94 && !(group->meth->flags & 0x1)
!(group->meth->flags & 0x1)Description
TRUEnever evaluated
FALSEevaluated 34424 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
) {
0-34424
95 ERR_put_error(16,(122),((2|64)),__FILE__,106);-
96 return
never executed: return 0;
0;
never executed: return 0;
0
97 }-
98 if (!ec_point_is_compat(point, group)
!ec_point_is_c...(point, group)Description
TRUEnever evaluated
FALSEevaluated 34424 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
) {
0-34424
99 ERR_put_error(16,(122),(101),__FILE__,110);-
100 return
never executed: return 0;
0;
never executed: return 0;
0
101 }-
102 if (group->meth->flags & 0x1
group->meth->flags & 0x1Description
TRUEevaluated 34424 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
FALSEnever evaluated
) {
0-34424
103 if (group->meth->field_type == 406
group->meth->field_type == 406Description
TRUEevaluated 25155 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
FALSEevaluated 9269 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
)
9269-25155
104 return
executed 25155 times by 1 test: return ec_GFp_simple_oct2point(group, point, buf, len, ctx);
Executed by:
  • libcrypto.so.1.1
ec_GFp_simple_oct2point(group, point, buf, len, ctx);
executed 25155 times by 1 test: return ec_GFp_simple_oct2point(group, point, buf, len, ctx);
Executed by:
  • libcrypto.so.1.1
25155
105 else-
106-
107-
108-
109-
110-
111-
112 return
executed 9269 times by 1 test: return ec_GF2m_simple_oct2point(group, point, buf, len, ctx);
Executed by:
  • libcrypto.so.1.1
ec_GF2m_simple_oct2point(group, point, buf, len, ctx);
executed 9269 times by 1 test: return ec_GF2m_simple_oct2point(group, point, buf, len, ctx);
Executed by:
  • libcrypto.so.1.1
9269
113-
114 }-
115 return
never executed: return group->meth->oct2point(group, point, buf, len, ctx);
group->meth->oct2point(group, point, buf, len, ctx);
never executed: return group->meth->oct2point(group, point, buf, len, ctx);
0
116}-
117-
118size_t EC_POINT_point2buf(const EC_GROUP *group, const EC_POINT *point,-
119 point_conversion_form_t form,-
120 unsigned char **pbuf, BN_CTX *ctx)-
121{-
122 size_t len;-
123 unsigned char *buf;-
124-
125 len = EC_POINT_point2oct(group, point, form, -
126 ((void *)0)-
127 , 0, -
128 ((void *)0)-
129 );-
130 if (len == 0
len == 0Description
TRUEevaluated 2 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
FALSEevaluated 1285 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
)
2-1285
131 return
executed 2 times by 1 test: return 0;
Executed by:
  • libcrypto.so.1.1
0;
executed 2 times by 1 test: return 0;
Executed by:
  • libcrypto.so.1.1
2
132 if ((
(buf = CRYPTO_...== ((void *)0)Description
TRUEnever evaluated
FALSEevaluated 1285 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
buf = CRYPTO_malloc(len, __FILE__, 139)) ==
(buf = CRYPTO_...== ((void *)0)Description
TRUEnever evaluated
FALSEevaluated 1285 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
0-1285
133 ((void *)0)
(buf = CRYPTO_...== ((void *)0)Description
TRUEnever evaluated
FALSEevaluated 1285 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
0-1285
134 ) {-
135 ERR_put_error(16,(281),((1|64)),__FILE__,140);-
136 return
never executed: return 0;
0;
never executed: return 0;
0
137 }-
138 len = EC_POINT_point2oct(group, point, form, buf, len, ctx);-
139 if (len == 0
len == 0Description
TRUEnever evaluated
FALSEevaluated 1285 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
) {
0-1285
140 CRYPTO_free(buf, __FILE__, 145);-
141 return
never executed: return 0;
0;
never executed: return 0;
0
142 }-
143 *pbuf = buf;-
144 return
executed 1285 times by 1 test: return len;
Executed by:
  • libcrypto.so.1.1
len;
executed 1285 times by 1 test: return len;
Executed by:
  • libcrypto.so.1.1
1285
145}-
Switch to Source codePreprocessed file

Generated by Squish Coco 4.2.2