From a0f2abc5b5c462a85d05b28008c99e6875875b3d Mon Sep 17 00:00:00 2001 From: Steffen Jaeckel Date: Tue, 4 Jul 2017 10:18:21 +0200 Subject: [PATCH] re-format --- src/pk/dsa/dsa_generate_pqg.c | 30 ++++++++++++++++-------------- 1 file changed, 16 insertions(+), 14 deletions(-) diff --git a/src/pk/dsa/dsa_generate_pqg.c b/src/pk/dsa/dsa_generate_pqg.c index bcf9e34..91c7ef7 100644 --- a/src/pk/dsa/dsa_generate_pqg.c +++ b/src/pk/dsa/dsa_generate_pqg.c @@ -213,26 +213,28 @@ cleanup3: */ int dsa_generate_pqg(prng_state *prng, int wprng, int group_size, int modulus_size, dsa_key *key) { - int err; + int err; - LTC_ARGCHK(key != NULL); - LTC_ARGCHK(ltc_mp.name != NULL); + LTC_ARGCHK(key != NULL); + LTC_ARGCHK(ltc_mp.name != NULL); - /* init mp_ints */ - if ((err = mp_init_multi(&key->p, &key->g, &key->q, &key->x, &key->y, NULL)) != CRYPT_OK) { - return err; - } - /* generate params */ - err = _dsa_make_params(prng, wprng, group_size, modulus_size, key->p, key->q, key->g); - if (err != CRYPT_OK) { goto cleanup; } + /* init mp_ints */ + if ((err = mp_init_multi(&key->p, &key->g, &key->q, &key->x, &key->y, NULL)) != CRYPT_OK) { + return err; + } + /* generate params */ + err = _dsa_make_params(prng, wprng, group_size, modulus_size, key->p, key->q, key->g); + if (err != CRYPT_OK) { + goto cleanup; + } - key->qord = group_size; + key->qord = group_size; - return CRYPT_OK; + return CRYPT_OK; cleanup: - dsa_free(key); - return err; + dsa_free(key); + return err; } #endif