From: Richard Levitte Date: Mon, 22 Aug 2016 11:35:27 +0000 (+0200) Subject: GOST: rearrange code so it's more like C rather than C++ X-Git-Tag: OpenSSL_1_0_2i~58 X-Git-Url: https://git.librecmc.org/?a=commitdiff_plain;h=93c616d6110d29c513c46d82b2283eb1a9e74dc0;p=oweals%2Fopenssl.git GOST: rearrange code so it's more like C rather than C++ Some builds fail otherwise. Reviewed-by: Matt Caswell --- diff --git a/engines/ccgost/gost2001.c b/engines/ccgost/gost2001.c index 57f6ee28a8..881d0d3c90 100644 --- a/engines/ccgost/gost2001.c +++ b/engines/ccgost/gost2001.c @@ -434,14 +434,16 @@ int gost2001_compute_public(EC_KEY *ec) int gost2001_keygen(EC_KEY *ec) { BIGNUM *order = BN_new(), *d = BN_new(); + const EC_GROUP *group = NULL; + if (order == NULL || d == NULL) { GOSTerr(GOST_F_GOST2001_KEYGEN, ERR_R_MALLOC_FAILURE); BN_free(d); BN_free(order); return 0; } - const EC_GROUP *group = EC_KEY_get0_group(ec); + group = EC_KEY_get0_group(ec); if(!group || !EC_GROUP_get_order(group, order, NULL)) { GOSTerr(GOST_F_GOST2001_KEYGEN, ERR_R_INTERNAL_ERROR); BN_free(d);