diff options
author | Matt Johnston <matt@ucc.asn.au> | 2017-06-24 10:32:33 +0800 |
---|---|---|
committer | Matt Johnston <matt@ucc.asn.au> | 2017-06-24 10:32:33 +0800 |
commit | 57690891ce1591d0f18b0604145eb9eb1c29183b (patch) | |
tree | b6f35fa4161b1bd039870bda410f8bb2d8d1caf4 /dss.c | |
parent | 5896a4941d5d60598e3ad23a904a72c81501ba5f (diff) |
test dss key parameter lengths exactly
Diffstat (limited to 'dss.c')
-rw-r--r-- | dss.c | 6 |
1 files changed, 2 insertions, 4 deletions
@@ -61,16 +61,14 @@ int buf_get_dss_pub_key(buffer* buf, dropbear_dss_key *key) { 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; } |