diff options
Diffstat (limited to 'src')
| -rw-r--r-- | src/lib/libcrypto/ec/ec_lib.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/src/lib/libcrypto/ec/ec_lib.c b/src/lib/libcrypto/ec/ec_lib.c index 5bfa16df3c..f906054603 100644 --- a/src/lib/libcrypto/ec/ec_lib.c +++ b/src/lib/libcrypto/ec/ec_lib.c | |||
| @@ -1,4 +1,4 @@ | |||
| 1 | /* $OpenBSD: ec_lib.c,v 1.111 2025/01/11 15:26:07 tb Exp $ */ | 1 | /* $OpenBSD: ec_lib.c,v 1.112 2025/01/21 17:01:25 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 | */ |
| @@ -667,6 +667,7 @@ EC_GROUP_check(const EC_GROUP *group, BN_CTX *ctx_in) | |||
| 667 | { | 667 | { |
| 668 | BN_CTX *ctx; | 668 | BN_CTX *ctx; |
| 669 | EC_POINT *point = NULL; | 669 | EC_POINT *point = NULL; |
| 670 | const EC_POINT *generator; | ||
| 670 | const BIGNUM *order; | 671 | const BIGNUM *order; |
| 671 | int ret = 0; | 672 | int ret = 0; |
| 672 | 673 | ||
| @@ -680,11 +681,11 @@ EC_GROUP_check(const EC_GROUP *group, BN_CTX *ctx_in) | |||
| 680 | goto err; | 681 | goto err; |
| 681 | } | 682 | } |
| 682 | 683 | ||
| 683 | if (group->generator == NULL) { | 684 | if ((generator = EC_GROUP_get0_generator(group)) == NULL) { |
| 684 | ECerror(EC_R_UNDEFINED_GENERATOR); | 685 | ECerror(EC_R_UNDEFINED_GENERATOR); |
| 685 | goto err; | 686 | goto err; |
| 686 | } | 687 | } |
| 687 | if (EC_POINT_is_on_curve(group, group->generator, ctx) <= 0) { | 688 | if (EC_POINT_is_on_curve(group, generator, ctx) <= 0) { |
| 688 | ECerror(EC_R_POINT_IS_NOT_ON_CURVE); | 689 | ECerror(EC_R_POINT_IS_NOT_ON_CURVE); |
| 689 | goto err; | 690 | goto err; |
| 690 | } | 691 | } |
