diff options
Diffstat (limited to 'src')
| -rw-r--r-- | src/lib/libcrypto/ec/ec_convert.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/src/lib/libcrypto/ec/ec_convert.c b/src/lib/libcrypto/ec/ec_convert.c index 08cd922ec7..a4237cda95 100644 --- a/src/lib/libcrypto/ec/ec_convert.c +++ b/src/lib/libcrypto/ec/ec_convert.c | |||
| @@ -1,4 +1,4 @@ | |||
| 1 | /* $OpenBSD: ec_convert.c,v 1.10 2024/11/02 16:02:01 tb Exp $ */ | 1 | /* $OpenBSD: ec_convert.c,v 1.11 2024/11/08 02:24:37 tb Exp $ */ |
| 2 | /* | 2 | /* |
| 3 | * Originally written by Bodo Moeller for the OpenSSL project. | 3 | * Originally written by Bodo Moeller for the OpenSSL project. |
| 4 | */ | 4 | */ |
| @@ -82,7 +82,7 @@ | |||
| 82 | * ignore it except at the API boundary. | 82 | * ignore it except at the API boundary. |
| 83 | */ | 83 | */ |
| 84 | 84 | ||
| 85 | #define EC_YBIT 0x01 | 85 | #define EC_POINT_YBIT 0x01 |
| 86 | 86 | ||
| 87 | #define EC_POINT_AT_INFINITY 0x00 | 87 | #define EC_POINT_AT_INFINITY 0x00 |
| 88 | #define EC_POINT_COMPRESSED 0x02 | 88 | #define EC_POINT_COMPRESSED 0x02 |
| @@ -118,7 +118,7 @@ static int | |||
| 118 | ec_add_leading_octet_cbb(CBB *cbb, uint8_t form, int ybit) | 118 | ec_add_leading_octet_cbb(CBB *cbb, uint8_t form, int ybit) |
| 119 | { | 119 | { |
| 120 | if (ec_nonzero_ybit_allowed(form) && ybit != 0) | 120 | if (ec_nonzero_ybit_allowed(form) && ybit != 0) |
| 121 | form |= EC_YBIT; | 121 | form |= EC_POINT_YBIT; |
| 122 | 122 | ||
| 123 | return CBB_add_u8(cbb, form); | 123 | return CBB_add_u8(cbb, form); |
| 124 | } | 124 | } |
| @@ -133,8 +133,8 @@ ec_get_leading_octet_cbs(CBS *cbs, uint8_t *out_form, int *out_ybit) | |||
| 133 | return 0; | 133 | return 0; |
| 134 | } | 134 | } |
| 135 | 135 | ||
| 136 | *out_ybit = octet & EC_YBIT; | 136 | *out_ybit = octet & EC_POINT_YBIT; |
| 137 | *out_form = octet & ~EC_YBIT; | 137 | *out_form = octet & ~EC_POINT_YBIT; |
| 138 | 138 | ||
| 139 | if (!ec_conversion_form_is_valid(*out_form)) { | 139 | if (!ec_conversion_form_is_valid(*out_form)) { |
| 140 | ECerror(EC_R_INVALID_ENCODING); | 140 | ECerror(EC_R_INVALID_ENCODING); |
| @@ -404,7 +404,7 @@ ec_point_from_octets(const EC_GROUP *group, const unsigned char *buf, size_t buf | |||
| 404 | goto err; | 404 | goto err; |
| 405 | 405 | ||
| 406 | if (out_form != NULL) | 406 | if (out_form != NULL) |
| 407 | *out_form = buf[0] & ~EC_YBIT; | 407 | *out_form = buf[0] & ~EC_POINT_YBIT; |
| 408 | 408 | ||
| 409 | *out_point = point; | 409 | *out_point = point; |
| 410 | point = NULL; | 410 | point = NULL; |
