From: Matt Caswell Date: Wed, 7 Aug 2019 09:03:12 +0000 (+0100) Subject: Fix enable-ec_nistp_64_gcc_128 X-Git-Tag: openssl-3.0.0-alpha1~1661 X-Git-Url: https://git.librecmc.org/?a=commitdiff_plain;h=a6482df03accc6cdcbd1298d593508825a5902e6;p=oweals%2Fopenssl.git Fix enable-ec_nistp_64_gcc_128 When creating a BN_CTX, make sure we store it in the right variable! Reviewed-by: Tomas Mraz (Merged from https://github.com/openssl/openssl/pull/9546) --- diff --git a/crypto/ec/ecp_nistp224.c b/crypto/ec/ecp_nistp224.c index a9f40d09c7..2ad9903c90 100644 --- a/crypto/ec/ecp_nistp224.c +++ b/crypto/ec/ecp_nistp224.c @@ -1286,7 +1286,7 @@ int ec_GFp_nistp224_group_set_curve(EC_GROUP *group, const BIGNUM *p, BN_CTX *new_ctx = NULL; if (ctx == NULL) - new_ctx = BN_CTX_new(); + ctx = new_ctx = BN_CTX_new(); #endif if (ctx == NULL) return 0; @@ -1606,7 +1606,7 @@ int ec_GFp_nistp224_precompute_mult(EC_GROUP *group, BN_CTX *ctx) #ifndef FIPS_MODE if (ctx == NULL) - new_ctx = BN_CTX_new(); + ctx = new_ctx = BN_CTX_new(); #endif if (ctx == NULL) return 0; diff --git a/crypto/ec/ecp_nistp256.c b/crypto/ec/ecp_nistp256.c index 4fc589b913..624ee1621f 100644 --- a/crypto/ec/ecp_nistp256.c +++ b/crypto/ec/ecp_nistp256.c @@ -1906,7 +1906,7 @@ int ec_GFp_nistp256_group_set_curve(EC_GROUP *group, const BIGNUM *p, BN_CTX *new_ctx = NULL; if (ctx == NULL) - new_ctx = BN_CTX_new(); + ctx = new_ctx = BN_CTX_new(); #endif if (ctx == NULL) return 0; @@ -2234,7 +2234,7 @@ int ec_GFp_nistp256_precompute_mult(EC_GROUP *group, BN_CTX *ctx) #ifndef FIPS_MODE if (ctx == NULL) - new_ctx = BN_CTX_new(); + ctx = new_ctx = BN_CTX_new(); #endif if (ctx == NULL) return 0; diff --git a/crypto/ec/ecp_nistp521.c b/crypto/ec/ecp_nistp521.c index ff5c2cfa64..6de37f663b 100644 --- a/crypto/ec/ecp_nistp521.c +++ b/crypto/ec/ecp_nistp521.c @@ -1748,7 +1748,7 @@ int ec_GFp_nistp521_group_set_curve(EC_GROUP *group, const BIGNUM *p, BN_CTX *new_ctx = NULL; if (ctx == NULL) - new_ctx = BN_CTX_new(); + ctx = new_ctx = BN_CTX_new(); #endif if (ctx == NULL) return 0; @@ -2072,7 +2072,7 @@ int ec_GFp_nistp521_precompute_mult(EC_GROUP *group, BN_CTX *ctx) #ifndef FIPS_MODE if (ctx == NULL) - new_ctx = BN_CTX_new(); + ctx = new_ctx = BN_CTX_new(); #endif if (ctx == NULL) return 0;