| Absolute File Name: | /home/opencoverage/opencoverage/guest-scripts/libressl/src/crypto/ec/ec_oct.c |
| Switch to Source code | Preprocessed file |
| Line | Source | Count | ||||||
|---|---|---|---|---|---|---|---|---|
| 1 | - | |||||||
| 2 | - | |||||||
| 3 | - | |||||||
| 4 | - | |||||||
| 5 | - | |||||||
| 6 | int | - | ||||||
| 7 | EC_POINT_set_compressed_coordinates_GFp(const EC_GROUP * group, EC_POINT * point, | - | ||||||
| 8 | const BIGNUM * x, int y_bit, BN_CTX * ctx) | - | ||||||
| 9 | { | - | ||||||
| 10 | if (group->meth->point_set_compressed_coordinates == 0
| 0-7 | ||||||
| 11 | && !(group->meth->flags & 0x1)
| 0-7 | ||||||
| 12 | ERR_put_error(16,(0xfff),((2|64)),__FILE__,79); | - | ||||||
| 13 | return never executed: 0;return 0;never executed: return 0; | 0 | ||||||
| 14 | } | - | ||||||
| 15 | if (group->meth != point->meth
| 0-7 | ||||||
| 16 | ERR_put_error(16,(0xfff),(101),__FILE__,83); | - | ||||||
| 17 | return never executed: 0;return 0;never executed: return 0; | 0 | ||||||
| 18 | } | - | ||||||
| 19 | if (group->meth->flags & 0x1
| 0-7 | ||||||
| 20 | if (group->meth->field_type == 406
| 0-7 | ||||||
| 21 | return executed 7 times by 1 test: ec_GFp_simple_set_compressed_coordinates(return ec_GFp_simple_set_compressed_coordinates( group, point, x, y_bit, ctx);Executed by:
executed 7 times by 1 test: return ec_GFp_simple_set_compressed_coordinates( group, point, x, y_bit, ctx);Executed by:
| 7 | ||||||
| 22 | group, point, x, y_bit, ctx); executed 7 times by 1 test: return ec_GFp_simple_set_compressed_coordinates( group, point, x, y_bit, ctx);Executed by:
| 7 | ||||||
| 23 | else | - | ||||||
| 24 | - | |||||||
| 25 | - | |||||||
| 26 | - | |||||||
| 27 | - | |||||||
| 28 | - | |||||||
| 29 | - | |||||||
| 30 | return never executed: ec_GF2m_simple_set_compressed_coordinates(return ec_GF2m_simple_set_compressed_coordinates( group, point, x, y_bit, ctx);never executed: return ec_GF2m_simple_set_compressed_coordinates( group, point, x, y_bit, ctx); | 0 | ||||||
| 31 | group, point, x, y_bit, ctx); never executed: return ec_GF2m_simple_set_compressed_coordinates( group, point, x, y_bit, ctx); | 0 | ||||||
| 32 | - | |||||||
| 33 | } | - | ||||||
| 34 | return never executed: group->meth->point_set_compressed_coordinates(group, point, x, y_bit, ctx);return group->meth->point_set_compressed_coordinates(group, point, x, y_bit, ctx);never executed: return group->meth->point_set_compressed_coordinates(group, point, x, y_bit, ctx); | 0 | ||||||
| 35 | } | - | ||||||
| 36 | - | |||||||
| 37 | - | |||||||
| 38 | int | - | ||||||
| 39 | EC_POINT_set_compressed_coordinates_GF2m(const EC_GROUP * group, EC_POINT * point, | - | ||||||
| 40 | const BIGNUM * x, int y_bit, BN_CTX * ctx) | - | ||||||
| 41 | { | - | ||||||
| 42 | if (group->meth->point_set_compressed_coordinates == 0
| 0 | ||||||
| 43 | && !(group->meth->flags & 0x1)
| 0 | ||||||
| 44 | ERR_put_error(16,(0xfff),((2|64)),__FILE__,111); | - | ||||||
| 45 | return never executed: 0;return 0;never executed: return 0; | 0 | ||||||
| 46 | } | - | ||||||
| 47 | if (group->meth != point->meth
| 0 | ||||||
| 48 | ERR_put_error(16,(0xfff),(101),__FILE__,115); | - | ||||||
| 49 | return never executed: 0;return 0;never executed: return 0; | 0 | ||||||
| 50 | } | - | ||||||
| 51 | if (group->meth->flags & 0x1
| 0 | ||||||
| 52 | if (group->meth->field_type == 406
| 0 | ||||||
| 53 | return never executed: ec_GFp_simple_set_compressed_coordinates(return ec_GFp_simple_set_compressed_coordinates( group, point, x, y_bit, ctx);never executed: return ec_GFp_simple_set_compressed_coordinates( group, point, x, y_bit, ctx); | 0 | ||||||
| 54 | group, point, x, y_bit, ctx); never executed: return ec_GFp_simple_set_compressed_coordinates( group, point, x, y_bit, ctx); | 0 | ||||||
| 55 | else | - | ||||||
| 56 | return never executed: ec_GF2m_simple_set_compressed_coordinates(return ec_GF2m_simple_set_compressed_coordinates( group, point, x, y_bit, ctx);never executed: return ec_GF2m_simple_set_compressed_coordinates( group, point, x, y_bit, ctx); | 0 | ||||||
| 57 | group, point, x, y_bit, ctx); never executed: return ec_GF2m_simple_set_compressed_coordinates( group, point, x, y_bit, ctx); | 0 | ||||||
| 58 | } | - | ||||||
| 59 | return never executed: group->meth->point_set_compressed_coordinates(group, point, x, y_bit, ctx);return group->meth->point_set_compressed_coordinates(group, point, x, y_bit, ctx);never executed: return group->meth->point_set_compressed_coordinates(group, point, x, y_bit, ctx); | 0 | ||||||
| 60 | } | - | ||||||
| 61 | - | |||||||
| 62 | - | |||||||
| 63 | size_t | - | ||||||
| 64 | EC_POINT_point2oct(const EC_GROUP *group, const EC_POINT *point, | - | ||||||
| 65 | point_conversion_form_t form, | - | ||||||
| 66 | unsigned char *buf, size_t len, BN_CTX *ctx) | - | ||||||
| 67 | { | - | ||||||
| 68 | if (group->meth->point2oct == 0
| 0-96 | ||||||
| 69 | && !(group->meth->flags & 0x1)
| 0-96 | ||||||
| 70 | ERR_put_error(16,(0xfff),((2|64)),__FILE__,137); | - | ||||||
| 71 | return never executed: 0;return 0;never executed: return 0; | 0 | ||||||
| 72 | } | - | ||||||
| 73 | if (group->meth != point->meth
| 0-96 | ||||||
| 74 | ERR_put_error(16,(0xfff),(101),__FILE__,141); | - | ||||||
| 75 | return never executed: 0;return 0;never executed: return 0; | 0 | ||||||
| 76 | } | - | ||||||
| 77 | if (group->meth->flags & 0x1
| 0-96 | ||||||
| 78 | if (group->meth->field_type == 406
| 1-95 | ||||||
| 79 | return executed 95 times by 2 tests: ec_GFp_simple_point2oct(group, point,return ec_GFp_simple_point2oct(group, point, form, buf, len, ctx);Executed by:
executed 95 times by 2 tests: return ec_GFp_simple_point2oct(group, point, form, buf, len, ctx);Executed by:
| 95 | ||||||
| 80 | form, buf, len, ctx); executed 95 times by 2 tests: return ec_GFp_simple_point2oct(group, point, form, buf, len, ctx);Executed by:
| 95 | ||||||
| 81 | else | - | ||||||
| 82 | - | |||||||
| 83 | - | |||||||
| 84 | - | |||||||
| 85 | - | |||||||
| 86 | - | |||||||
| 87 | - | |||||||
| 88 | return executed 1 time by 1 test: ec_GF2m_simple_point2oct(group, point,return ec_GF2m_simple_point2oct(group, point, form, buf, len, ctx);Executed by:
executed 1 time by 1 test: return ec_GF2m_simple_point2oct(group, point, form, buf, len, ctx);Executed by:
| 1 | ||||||
| 89 | form, buf, len, ctx); executed 1 time by 1 test: return ec_GF2m_simple_point2oct(group, point, form, buf, len, ctx);Executed by:
| 1 | ||||||
| 90 | - | |||||||
| 91 | } | - | ||||||
| 92 | return never executed: group->meth->point2oct(group, point, form, buf, len, ctx);return group->meth->point2oct(group, point, form, buf, len, ctx);never executed: return group->meth->point2oct(group, point, form, buf, len, ctx); | 0 | ||||||
| 93 | } | - | ||||||
| 94 | - | |||||||
| 95 | - | |||||||
| 96 | int | - | ||||||
| 97 | EC_POINT_oct2point(const EC_GROUP *group, EC_POINT *point, | - | ||||||
| 98 | const unsigned char *buf, size_t len, BN_CTX *ctx) | - | ||||||
| 99 | { | - | ||||||
| 100 | if (group->meth->oct2point == 0
| 0-52 | ||||||
| 101 | !(group->meth->flags & 0x1)
| 0-52 | ||||||
| 102 | ERR_put_error(16,(0xfff),((2|64)),__FILE__,169); | - | ||||||
| 103 | return never executed: 0;return 0;never executed: return 0; | 0 | ||||||
| 104 | } | - | ||||||
| 105 | if (group->meth != point->meth
| 0-52 | ||||||
| 106 | ERR_put_error(16,(0xfff),(101),__FILE__,173); | - | ||||||
| 107 | return never executed: 0;return 0;never executed: return 0; | 0 | ||||||
| 108 | } | - | ||||||
| 109 | if (group->meth->flags & 0x1
| 0-52 | ||||||
| 110 | if (group->meth->field_type == 406
| 2-50 | ||||||
| 111 | return executed 50 times by 2 tests: ec_GFp_simple_oct2point(group, point,return ec_GFp_simple_oct2point(group, point, buf, len, ctx);Executed by:
executed 50 times by 2 tests: return ec_GFp_simple_oct2point(group, point, buf, len, ctx);Executed by:
| 50 | ||||||
| 112 | buf, len, ctx); executed 50 times by 2 tests: return ec_GFp_simple_oct2point(group, point, buf, len, ctx);Executed by:
| 50 | ||||||
| 113 | else | - | ||||||
| 114 | - | |||||||
| 115 | - | |||||||
| 116 | - | |||||||
| 117 | - | |||||||
| 118 | - | |||||||
| 119 | - | |||||||
| 120 | return executed 2 times by 1 test: ec_GF2m_simple_oct2point(group, point,return ec_GF2m_simple_oct2point(group, point, buf, len, ctx);Executed by:
executed 2 times by 1 test: return ec_GF2m_simple_oct2point(group, point, buf, len, ctx);Executed by:
| 2 | ||||||
| 121 | buf, len, ctx); executed 2 times by 1 test: return ec_GF2m_simple_oct2point(group, point, buf, len, ctx);Executed by:
| 2 | ||||||
| 122 | - | |||||||
| 123 | } | - | ||||||
| 124 | return never executed: group->meth->oct2point(group, point, buf, len, ctx);return group->meth->oct2point(group, point, buf, len, ctx);never executed: return group->meth->oct2point(group, point, buf, len, ctx); | 0 | ||||||
| 125 | } | - | ||||||
| Switch to Source code | Preprocessed file |