properly exit dsa_int_validate_pqg

This commit is contained in:
Karel Miko 2017-09-14 20:07:32 +02:00
parent 5934eb3b7c
commit 5e71849942

View File

@ -60,8 +60,7 @@ int dsa_int_validate_pqg(dsa_key *key, int *stat)
if ( key->qord >= LTC_MDSA_MAX_GROUP || key->qord <= 15 || if ( key->qord >= LTC_MDSA_MAX_GROUP || key->qord <= 15 ||
(unsigned long)key->qord >= mp_unsigned_bin_size(key->p) || (unsigned long)key->qord >= mp_unsigned_bin_size(key->p) ||
(mp_unsigned_bin_size(key->p) - key->qord) >= LTC_MDSA_DELTA ) { (mp_unsigned_bin_size(key->p) - key->qord) >= LTC_MDSA_DELTA ) {
err = CRYPT_OK; return CRYPT_OK;
goto error;
} }
/* FIPS 186-4 chapter 4.1: 1 < g < p */ /* FIPS 186-4 chapter 4.1: 1 < g < p */