summaryrefslogtreecommitdiff
path: root/src/lib
diff options
context:
space:
mode:
authortb <>2023-05-02 13:01:57 +0000
committertb <>2023-05-02 13:01:57 +0000
commit767e7c0cf78d5a2edeb67e7286305ff60696c096 (patch)
treecf7a2176eabe273e9ba273772cab21dd519a7532 /src/lib
parentab93cff1165b3f9a337cbdc8a42cf28eff0bedbd (diff)
downloadopenbsd-767e7c0cf78d5a2edeb67e7286305ff60696c096.tar.gz
openbsd-767e7c0cf78d5a2edeb67e7286305ff60696c096.tar.bz2
openbsd-767e7c0cf78d5a2edeb67e7286305ff60696c096.zip
Rename P into generator
ok jsing
Diffstat (limited to 'src/lib')
-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 e5c3d87644..a8a1e4d522 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.40 2023/05/02 10:44:20 tb Exp $ */ 1/* $OpenBSD: ec_curve.c,v 1.41 2023/05/02 13:01:57 tb Exp $ */
2/* 2/*
3 * Written by Nils Larsch for the OpenSSL project. 3 * Written by Nils Larsch for the OpenSSL project.
4 */ 4 */
@@ -3001,7 +3001,7 @@ static EC_GROUP *
3001ec_group_new_from_data(const struct ec_list_element *curve) 3001ec_group_new_from_data(const struct ec_list_element *curve)
3002{ 3002{
3003 EC_GROUP *group = NULL, *ret = NULL; 3003 EC_GROUP *group = NULL, *ret = NULL;
3004 EC_POINT *P = NULL; 3004 EC_POINT *generator = NULL;
3005 BN_CTX *ctx = NULL; 3005 BN_CTX *ctx = NULL;
3006 BIGNUM *p, *a, *b, *x, *y, *order, *cofactor; 3006 BIGNUM *p, *a, *b, *x, *y, *order, *cofactor;
3007 3007
@@ -3058,7 +3058,7 @@ ec_group_new_from_data(const struct ec_list_element *curve)
3058 } 3058 }
3059 EC_GROUP_set_curve_name(group, curve->nid); 3059 EC_GROUP_set_curve_name(group, curve->nid);
3060 3060
3061 if ((P = EC_POINT_new(group)) == NULL) { 3061 if ((generator = EC_POINT_new(group)) == NULL) {
3062 ECerror(ERR_R_EC_LIB); 3062 ECerror(ERR_R_EC_LIB);
3063 goto err; 3063 goto err;
3064 } 3064 }
@@ -3070,7 +3070,7 @@ ec_group_new_from_data(const struct ec_list_element *curve)
3070 ECerror(ERR_R_BN_LIB); 3070 ECerror(ERR_R_BN_LIB);
3071 goto err; 3071 goto err;
3072 } 3072 }
3073 if (!EC_POINT_set_affine_coordinates(group, P, x, y, ctx)) { 3073 if (!EC_POINT_set_affine_coordinates(group, generator, x, y, ctx)) {
3074 ECerror(ERR_R_EC_LIB); 3074 ECerror(ERR_R_EC_LIB);
3075 goto err; 3075 goto err;
3076 } 3076 }
@@ -3082,7 +3082,7 @@ ec_group_new_from_data(const struct ec_list_element *curve)
3082 ECerror(ERR_R_BN_LIB); 3082 ECerror(ERR_R_BN_LIB);
3083 goto err; 3083 goto err;
3084 } 3084 }
3085 if (!EC_GROUP_set_generator(group, P, order, cofactor)) { 3085 if (!EC_GROUP_set_generator(group, generator, order, cofactor)) {
3086 ECerror(ERR_R_EC_LIB); 3086 ECerror(ERR_R_EC_LIB);
3087 goto err; 3087 goto err;
3088 } 3088 }
@@ -3099,7 +3099,7 @@ ec_group_new_from_data(const struct ec_list_element *curve)
3099 3099
3100 err: 3100 err:
3101 EC_GROUP_free(group); 3101 EC_GROUP_free(group);
3102 EC_POINT_free(P); 3102 EC_POINT_free(generator);
3103 BN_CTX_end(ctx); 3103 BN_CTX_end(ctx);
3104 BN_CTX_free(ctx); 3104 BN_CTX_free(ctx);
3105 3105