mirror of
https://github.com/clearml/dropbear
synced 2025-03-03 18:52:00 +00:00
test dss key parameter lengths exactly
This commit is contained in:
parent
5896a4941d
commit
57690891ce
6
dss.c
6
dss.c
@ -61,16 +61,14 @@ int buf_get_dss_pub_key(buffer* buf, dropbear_dss_key *key) {
|
|||||||
goto out;
|
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");
|
dropbear_log(LOG_WARNING, "Bad DSS p");
|
||||||
TRACE(("leave buf_get_dss_pub_key: short key"))
|
|
||||||
ret = DROPBEAR_FAILURE;
|
ret = DROPBEAR_FAILURE;
|
||||||
goto out;
|
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");
|
dropbear_log(LOG_WARNING, "Bad DSS q");
|
||||||
TRACE(("leave buf_get_dss_pub_key: short key"))
|
|
||||||
ret = DROPBEAR_FAILURE;
|
ret = DROPBEAR_FAILURE;
|
||||||
goto out;
|
goto out;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user