diff options
Diffstat (limited to 'src/lib/libcrypto/ec/ec_asn1.c')
-rw-r--r-- | src/lib/libcrypto/ec/ec_asn1.c | 18 |
1 files changed, 4 insertions, 14 deletions
diff --git a/src/lib/libcrypto/ec/ec_asn1.c b/src/lib/libcrypto/ec/ec_asn1.c index 65bb007cae..06320b6588 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.32 2021/04/20 17:04:13 tb Exp $ */ | 1 | /* $OpenBSD: ec_asn1.c,v 1.33 2021/04/20 17:12:43 tb Exp $ */ |
2 | /* | 2 | /* |
3 | * Written by Nils Larsch for the OpenSSL project. | 3 | * Written by Nils Larsch for the OpenSSL project. |
4 | */ | 4 | */ |
@@ -818,20 +818,10 @@ ec_asn1_group2curve(const EC_GROUP * group, X9_62_CURVE * curve) | |||
818 | nid = EC_METHOD_get_field_type(EC_GROUP_method_of(group)); | 818 | nid = EC_METHOD_get_field_type(EC_GROUP_method_of(group)); |
819 | 819 | ||
820 | /* get a and b */ | 820 | /* get a and b */ |
821 | if (nid == NID_X9_62_prime_field) { | 821 | if (!EC_GROUP_get_curve(group, NULL, tmp_1, tmp_2, NULL)) { |
822 | if (!EC_GROUP_get_curve(group, NULL, tmp_1, tmp_2, NULL)) { | 822 | ECerror(ERR_R_EC_LIB); |
823 | ECerror(ERR_R_EC_LIB); | 823 | goto err; |
824 | goto err; | ||
825 | } | ||
826 | } | ||
827 | #ifndef OPENSSL_NO_EC2M | ||
828 | else { /* nid == NID_X9_62_characteristic_two_field */ | ||
829 | if (!EC_GROUP_get_curve(group, NULL, tmp_1, tmp_2, NULL)) { | ||
830 | ECerror(ERR_R_EC_LIB); | ||
831 | goto err; | ||
832 | } | ||
833 | } | 824 | } |
834 | #endif | ||
835 | len_1 = (size_t) BN_num_bytes(tmp_1); | 825 | len_1 = (size_t) BN_num_bytes(tmp_1); |
836 | len_2 = (size_t) BN_num_bytes(tmp_2); | 826 | len_2 = (size_t) BN_num_bytes(tmp_2); |
837 | 827 | ||