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 | d514e0b9f44457895c550e8fcca5150239ed0a15 (patch) | |
tree | 43b0c18fb9422e7752b9da796a3296c58ea90f3b /dss.c | |
parent | f90bfc3983f6b3d21a1782f61e412772835dc6d5 (diff) | |
download | dropbear-d514e0b9f44457895c550e8fcca5150239ed0a15.tar.gz |
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; } |