Mercurial > dropbear
diff dss.c @ 1430:7aebe7da3a35
test dss key parameter lengths exactly
author | Matt Johnston <matt@ucc.asn.au> |
---|---|
date | Sat, 24 Jun 2017 10:32:33 +0800 |
parents | 92717c0fec39 |
children | 793c43cf523e 06d52bcb8094 |
line wrap: on
line diff
--- a/dss.c Sat Jun 24 01:01:11 2017 +0800 +++ b/dss.c Sat Jun 24 10:32:33 2017 +0800 @@ -61,16 +61,14 @@ goto out; } - if (mp_count_bits(key->p) < DSS_P_BITS) { + if (mp_count_bits(key->p) != DSS_P_BITS) { dropbear_log(LOG_WARNING, "Bad DSS p"); - TRACE(("leave buf_get_dss_pub_key: short key")) ret = DROPBEAR_FAILURE; goto out; } - if (mp_count_bits(key->q) < DSS_Q_BITS) { + if (mp_count_bits(key->q) != DSS_Q_BITS) { dropbear_log(LOG_WARNING, "Bad DSS q"); - TRACE(("leave buf_get_dss_pub_key: short key")) ret = DROPBEAR_FAILURE; goto out; }