Skip to content
Snippets Groups Projects
Commit 57690891 authored by Matt Johnston's avatar Matt Johnston
Browse files

test dss key parameter lengths exactly

parent 5896a494
No related branches found
No related tags found
No related merge requests found
Loading
Loading
@@ -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;
}
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment