summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/lib/libcrypto/ec/ec_curve.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/src/lib/libcrypto/ec/ec_curve.c b/src/lib/libcrypto/ec/ec_curve.c
index b345277117..9c9aeb5574 100644
--- a/src/lib/libcrypto/ec/ec_curve.c
+++ b/src/lib/libcrypto/ec/ec_curve.c
@@ -1,4 +1,4 @@
1/* $OpenBSD: ec_curve.c,v 1.37 2023/05/01 17:31:15 tb Exp $ */ 1/* $OpenBSD: ec_curve.c,v 1.38 2023/05/01 17:49:33 tb Exp $ */
2/* 2/*
3 * Written by Nils Larsch for the OpenSSL project. 3 * Written by Nils Larsch for the OpenSSL project.
4 */ 4 */
@@ -2995,7 +2995,7 @@ static const struct ec_list_element {
2995#endif 2995#endif
2996}; 2996};
2997 2997
2998#define curve_list_length (sizeof(curve_list) / sizeof(curve_list[0])) 2998#define CURVE_LIST_LENGTH (sizeof(curve_list) / sizeof(curve_list[0]))
2999 2999
3000static EC_GROUP * 3000static EC_GROUP *
3001ec_group_new_from_data(const struct ec_list_element *curve) 3001ec_group_new_from_data(const struct ec_list_element *curve)
@@ -3114,7 +3114,7 @@ EC_GROUP_new_by_curve_name(int nid)
3114 if (nid <= 0) 3114 if (nid <= 0)
3115 return NULL; 3115 return NULL;
3116 3116
3117 for (i = 0; i < curve_list_length; i++) 3117 for (i = 0; i < CURVE_LIST_LENGTH; i++)
3118 if (curve_list[i].nid == nid) { 3118 if (curve_list[i].nid == nid) {
3119 ret = ec_group_new_from_data(&curve_list[i]); 3119 ret = ec_group_new_from_data(&curve_list[i]);
3120 break; 3120 break;
@@ -3134,16 +3134,16 @@ EC_get_builtin_curves(EC_builtin_curve *r, size_t nitems)
3134 size_t i, min; 3134 size_t i, min;
3135 3135
3136 if (r == NULL || nitems == 0) 3136 if (r == NULL || nitems == 0)
3137 return curve_list_length; 3137 return CURVE_LIST_LENGTH;
3138 3138
3139 min = nitems < curve_list_length ? nitems : curve_list_length; 3139 min = nitems < CURVE_LIST_LENGTH ? nitems : CURVE_LIST_LENGTH;
3140 3140
3141 for (i = 0; i < min; i++) { 3141 for (i = 0; i < min; i++) {
3142 r[i].nid = curve_list[i].nid; 3142 r[i].nid = curve_list[i].nid;
3143 r[i].comment = curve_list[i].comment; 3143 r[i].comment = curve_list[i].comment;
3144 } 3144 }
3145 3145
3146 return curve_list_length; 3146 return CURVE_LIST_LENGTH;
3147} 3147}
3148 3148
3149static const struct { 3149static const struct {