diff options
| author | tb <> | 2024-10-30 06:41:33 +0000 |
|---|---|---|
| committer | tb <> | 2024-10-30 06:41:33 +0000 |
| commit | 2816c430707b9220be8d2b816d976ba33dfafe27 (patch) | |
| tree | e175a3368d9f12800688c6c638e0f647fce6f7e6 /src/lib/libcrypto/ec | |
| parent | fa795e83338ea93972a7edc0ffd03869c04b0919 (diff) | |
| download | openbsd-2816c430707b9220be8d2b816d976ba33dfafe27.tar.gz openbsd-2816c430707b9220be8d2b816d976ba33dfafe27.tar.bz2 openbsd-2816c430707b9220be8d2b816d976ba33dfafe27.zip | |
ec_asn1_group2parameters: replace point with generator
Diffstat (limited to 'src/lib/libcrypto/ec')
| -rw-r--r-- | src/lib/libcrypto/ec/ec_asn1.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/lib/libcrypto/ec/ec_asn1.c b/src/lib/libcrypto/ec/ec_asn1.c index 7ec098963e..5da4d116c3 100644 --- a/src/lib/libcrypto/ec/ec_asn1.c +++ b/src/lib/libcrypto/ec/ec_asn1.c | |||
| @@ -1,4 +1,4 @@ | |||
| 1 | /* $OpenBSD: ec_asn1.c,v 1.97 2024/10/30 06:40:41 tb Exp $ */ | 1 | /* $OpenBSD: ec_asn1.c,v 1.98 2024/10/30 06:41: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 | */ |
| @@ -775,8 +775,8 @@ ec_asn1_group2parameters(const EC_GROUP *group) | |||
| 775 | { | 775 | { |
| 776 | int ok = 0; | 776 | int ok = 0; |
| 777 | ECPARAMETERS *parameters = NULL; | 777 | ECPARAMETERS *parameters = NULL; |
| 778 | const EC_POINT *generator = NULL; | ||
| 778 | const BIGNUM *order, *cofactor; | 779 | const BIGNUM *order, *cofactor; |
| 779 | const EC_POINT *point = NULL; | ||
| 780 | uint8_t form; | 780 | uint8_t form; |
| 781 | 781 | ||
| 782 | if ((parameters = ECPARAMETERS_new()) == NULL) { | 782 | if ((parameters = ECPARAMETERS_new()) == NULL) { |
| @@ -798,13 +798,13 @@ ec_asn1_group2parameters(const EC_GROUP *group) | |||
| 798 | goto err; | 798 | goto err; |
| 799 | } | 799 | } |
| 800 | /* set the base point */ | 800 | /* set the base point */ |
| 801 | if ((point = EC_GROUP_get0_generator(group)) == NULL) { | 801 | if ((generator = EC_GROUP_get0_generator(group)) == NULL) { |
| 802 | ECerror(EC_R_UNDEFINED_GENERATOR); | 802 | ECerror(EC_R_UNDEFINED_GENERATOR); |
| 803 | goto err; | 803 | goto err; |
| 804 | } | 804 | } |
| 805 | 805 | ||
| 806 | form = EC_GROUP_get_point_conversion_form(group); | 806 | form = EC_GROUP_get_point_conversion_form(group); |
| 807 | if (!ec_point_to_asn1_octet_string(group, point, form, ¶meters->base)) | 807 | if (!ec_point_to_asn1_octet_string(group, generator, form, ¶meters->base)) |
| 808 | goto err; | 808 | goto err; |
| 809 | 809 | ||
| 810 | if ((order = EC_GROUP_get0_order(group)) == NULL) { | 810 | if ((order = EC_GROUP_get0_order(group)) == NULL) { |
