diff options
Diffstat (limited to 'src/lib/libcrypto/ec/ecp_smpl.c')
-rw-r--r-- | src/lib/libcrypto/ec/ecp_smpl.c | 26 |
1 files changed, 13 insertions, 13 deletions
diff --git a/src/lib/libcrypto/ec/ecp_smpl.c b/src/lib/libcrypto/ec/ecp_smpl.c index 402ee2294d..57e8345364 100644 --- a/src/lib/libcrypto/ec/ecp_smpl.c +++ b/src/lib/libcrypto/ec/ecp_smpl.c | |||
@@ -1,4 +1,4 @@ | |||
1 | /* $OpenBSD: ecp_smpl.c,v 1.18 2018/07/10 21:55:49 tb Exp $ */ | 1 | /* $OpenBSD: ecp_smpl.c,v 1.19 2018/07/10 22:06:14 tb Exp $ */ |
2 | /* Includes code written by Lenka Fibikova <fibikova@exp-math.uni-essen.de> | 2 | /* Includes code written by Lenka Fibikova <fibikova@exp-math.uni-essen.de> |
3 | * for the OpenSSL project. | 3 | * for the OpenSSL project. |
4 | * Includes code written by Bodo Moeller for the OpenSSL project. | 4 | * Includes code written by Bodo Moeller for the OpenSSL project. |
@@ -223,7 +223,7 @@ ec_GFp_simple_group_set_curve(EC_GROUP * group, | |||
223 | 223 | ||
224 | ret = 1; | 224 | ret = 1; |
225 | 225 | ||
226 | err: | 226 | err: |
227 | BN_CTX_end(ctx); | 227 | BN_CTX_end(ctx); |
228 | BN_CTX_free(new_ctx); | 228 | BN_CTX_free(new_ctx); |
229 | return ret; | 229 | return ret; |
@@ -268,7 +268,7 @@ ec_GFp_simple_group_get_curve(const EC_GROUP * group, BIGNUM * p, BIGNUM * a, BI | |||
268 | } | 268 | } |
269 | ret = 1; | 269 | ret = 1; |
270 | 270 | ||
271 | err: | 271 | err: |
272 | BN_CTX_free(new_ctx); | 272 | BN_CTX_free(new_ctx); |
273 | return ret; | 273 | return ret; |
274 | } | 274 | } |
@@ -349,7 +349,7 @@ ec_GFp_simple_group_check_discriminant(const EC_GROUP * group, BN_CTX * ctx) | |||
349 | } | 349 | } |
350 | ret = 1; | 350 | ret = 1; |
351 | 351 | ||
352 | err: | 352 | err: |
353 | if (ctx != NULL) | 353 | if (ctx != NULL) |
354 | BN_CTX_end(ctx); | 354 | BN_CTX_end(ctx); |
355 | BN_CTX_free(new_ctx); | 355 | BN_CTX_free(new_ctx); |
@@ -459,7 +459,7 @@ ec_GFp_simple_set_Jprojective_coordinates_GFp(const EC_GROUP * group, EC_POINT * | |||
459 | } | 459 | } |
460 | ret = 1; | 460 | ret = 1; |
461 | 461 | ||
462 | err: | 462 | err: |
463 | BN_CTX_free(new_ctx); | 463 | BN_CTX_free(new_ctx); |
464 | return ret; | 464 | return ret; |
465 | } | 465 | } |
@@ -507,7 +507,7 @@ ec_GFp_simple_get_Jprojective_coordinates_GFp(const EC_GROUP * group, const EC_P | |||
507 | 507 | ||
508 | ret = 1; | 508 | ret = 1; |
509 | 509 | ||
510 | err: | 510 | err: |
511 | BN_CTX_free(new_ctx); | 511 | BN_CTX_free(new_ctx); |
512 | return ret; | 512 | return ret; |
513 | } | 513 | } |
@@ -627,7 +627,7 @@ ec_GFp_simple_point_get_affine_coordinates(const EC_GROUP * group, const EC_POIN | |||
627 | 627 | ||
628 | ret = 1; | 628 | ret = 1; |
629 | 629 | ||
630 | err: | 630 | err: |
631 | BN_CTX_end(ctx); | 631 | BN_CTX_end(ctx); |
632 | BN_CTX_free(new_ctx); | 632 | BN_CTX_free(new_ctx); |
633 | return ret; | 633 | return ret; |
@@ -814,7 +814,7 @@ ec_GFp_simple_add(const EC_GROUP * group, EC_POINT * r, const EC_POINT * a, cons | |||
814 | 814 | ||
815 | ret = 1; | 815 | ret = 1; |
816 | 816 | ||
817 | end: | 817 | end: |
818 | if (ctx) /* otherwise we already called BN_CTX_end */ | 818 | if (ctx) /* otherwise we already called BN_CTX_end */ |
819 | BN_CTX_end(ctx); | 819 | BN_CTX_end(ctx); |
820 | BN_CTX_free(new_ctx); | 820 | BN_CTX_free(new_ctx); |
@@ -957,7 +957,7 @@ ec_GFp_simple_dbl(const EC_GROUP * group, EC_POINT * r, const EC_POINT * a, BN_C | |||
957 | 957 | ||
958 | ret = 1; | 958 | ret = 1; |
959 | 959 | ||
960 | err: | 960 | err: |
961 | BN_CTX_end(ctx); | 961 | BN_CTX_end(ctx); |
962 | BN_CTX_free(new_ctx); | 962 | BN_CTX_free(new_ctx); |
963 | return ret; | 963 | return ret; |
@@ -1078,7 +1078,7 @@ ec_GFp_simple_is_on_curve(const EC_GROUP * group, const EC_POINT * point, BN_CTX | |||
1078 | 1078 | ||
1079 | ret = (0 == BN_ucmp(tmp, rh)); | 1079 | ret = (0 == BN_ucmp(tmp, rh)); |
1080 | 1080 | ||
1081 | err: | 1081 | err: |
1082 | BN_CTX_end(ctx); | 1082 | BN_CTX_end(ctx); |
1083 | BN_CTX_free(new_ctx); | 1083 | BN_CTX_free(new_ctx); |
1084 | return ret; | 1084 | return ret; |
@@ -1180,7 +1180,7 @@ ec_GFp_simple_cmp(const EC_GROUP * group, const EC_POINT * a, const EC_POINT * b | |||
1180 | /* points are equal */ | 1180 | /* points are equal */ |
1181 | ret = 0; | 1181 | ret = 0; |
1182 | 1182 | ||
1183 | end: | 1183 | end: |
1184 | BN_CTX_end(ctx); | 1184 | BN_CTX_end(ctx); |
1185 | BN_CTX_free(new_ctx); | 1185 | BN_CTX_free(new_ctx); |
1186 | return ret; | 1186 | return ret; |
@@ -1218,7 +1218,7 @@ ec_GFp_simple_make_affine(const EC_GROUP * group, EC_POINT * point, BN_CTX * ctx | |||
1218 | } | 1218 | } |
1219 | ret = 1; | 1219 | ret = 1; |
1220 | 1220 | ||
1221 | err: | 1221 | err: |
1222 | BN_CTX_end(ctx); | 1222 | BN_CTX_end(ctx); |
1223 | BN_CTX_free(new_ctx); | 1223 | BN_CTX_free(new_ctx); |
1224 | return ret; | 1224 | return ret; |
@@ -1383,7 +1383,7 @@ ec_GFp_simple_points_make_affine(const EC_GROUP * group, size_t num, EC_POINT * | |||
1383 | 1383 | ||
1384 | ret = 1; | 1384 | ret = 1; |
1385 | 1385 | ||
1386 | err: | 1386 | err: |
1387 | BN_CTX_end(ctx); | 1387 | BN_CTX_end(ctx); |
1388 | BN_CTX_free(new_ctx); | 1388 | BN_CTX_free(new_ctx); |
1389 | if (heap != NULL) { | 1389 | if (heap != NULL) { |