Commit 93c616d6 authored by Richard Levitte's avatar Richard Levitte
Browse files

GOST: rearrange code so it's more like C rather than C++



Some builds fail otherwise.

Reviewed-by: default avatarMatt Caswell <matt@openssl.org>
parent fd7ca746
Loading
Loading
Loading
Loading
+3 −1
Original line number Diff line number Diff line
@@ -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);