X-Git-Url: https://git.openssl.org/gitweb/?p=openssl.git;a=blobdiff_plain;f=crypto%2Fec%2Fec_lib.c;h=798382ac293eaa542bc3752fb9842839da53cad6;hp=c14d1a114e0e101f66110650d50c40b93666e071;hb=ce1415ed2ce15305356cd028bcf7b9bc688d6d5c;hpb=a7f182b726956eb376a80d4a3e22c9465cf5e579 diff --git a/crypto/ec/ec_lib.c b/crypto/ec/ec_lib.c index c14d1a114e..798382ac29 100644 --- a/crypto/ec/ec_lib.c +++ b/crypto/ec/ec_lib.c @@ -364,6 +364,11 @@ int EC_GROUP_get_curve_name(const EC_GROUP *group) return group->curve_name; } +const BIGNUM *EC_GROUP_get0_field(const EC_GROUP *group) +{ + return group->field; +} + void EC_GROUP_set_asn1_flag(EC_GROUP *group, int flag) { group->asn1_flag = flag; @@ -1074,8 +1079,7 @@ static int ec_field_inverse_mod_ord(const EC_GROUP *group, BIGNUM *r, ret = 1; err: - if (ctx != NULL) - BN_CTX_end(ctx); + BN_CTX_end(ctx); BN_CTX_free(new_ctx); return ret; }