summaryrefslogtreecommitdiffstats
path: root/engines
diff options
context:
space:
mode:
authorRichard Levitte <levitte@openssl.org>2016-08-22 13:35:27 +0200
committerRichard Levitte <levitte@openssl.org>2016-08-22 15:48:35 +0200
commit93c616d6110d29c513c46d82b2283eb1a9e74dc0 (patch)
treea13c20492e23951ade80aabea911fa2ca894a21b /engines
parentfd7ca7465b67336b8950a505b6d2adee867a78f7 (diff)
GOST: rearrange code so it's more like C rather than C++
Some builds fail otherwise. Reviewed-by: Matt Caswell <matt@openssl.org>
Diffstat (limited to 'engines')
-rw-r--r--engines/ccgost/gost2001.c4
1 files changed, 3 insertions, 1 deletions
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);