X-Git-Url: https://git.librecmc.org/?a=blobdiff_plain;f=crypto%2Fec%2Fecp_nistp521.c;h=04c3f08cc2e4da641cf7e4133ca7956ce8a0ad7b;hb=d6755bb6ac6676cf0f219cd4caf352ac48907206;hp=516101c1867883d2fc10be1efa7a98414e4dc619;hpb=126d686400b832a712fbcee2308b317e35e759bb;p=oweals%2Fopenssl.git diff --git a/crypto/ec/ecp_nistp521.c b/crypto/ec/ecp_nistp521.c index 516101c186..04c3f08cc2 100644 --- a/crypto/ec/ecp_nistp521.c +++ b/crypto/ec/ecp_nistp521.c @@ -1,4 +1,3 @@ -/* crypto/ec/ecp_nistp521.c */ /* * Written by Adam Langley (Google) for the OpenSSL project */ @@ -2008,7 +2007,7 @@ int ec_GFp_nistp521_precompute_mult(EC_GROUP *group, BN_CTX *ctx) felem tmp_felems[16]; /* throw away old precomputation */ - EC_nistp521_pre_comp_free(group->pre_comp.nistp521); + EC_pre_comp_free(group); if (ctx == NULL) if ((ctx = new_ctx = BN_CTX_new()) == NULL) return 0; @@ -2032,8 +2031,7 @@ int ec_GFp_nistp521_precompute_mult(EC_GROUP *group, BN_CTX *ctx) */ if (0 == EC_POINT_cmp(group, generator, group->generator, ctx)) { memcpy(pre->g_pre_comp, gmul, sizeof(pre->g_pre_comp)); - ret = 1; - goto err; + goto done; } if ((!BN_to_felem(pre->g_pre_comp[1][0], group->generator->X)) || (!BN_to_felem(pre->g_pre_comp[1][1], group->generator->Y)) || @@ -2091,6 +2089,7 @@ int ec_GFp_nistp521_precompute_mult(EC_GROUP *group, BN_CTX *ctx) } make_points_affine(15, &(pre->g_pre_comp[1]), tmp_felems); + done: SETPRECOMP(group, nistp521, pre); ret = 1; pre = NULL;