mirror of
https://github.com/clearml/dropbear
synced 2025-02-07 05:17:28 +00:00
check p and q lengths
This commit is contained in:
parent
af2caaab72
commit
eb7ca20379
11
dss.c
11
dss.c
@ -61,8 +61,15 @@ int buf_get_dss_pub_key(buffer* buf, dropbear_dss_key *key) {
|
||||
goto out;
|
||||
}
|
||||
|
||||
if (mp_count_bits(key->p) < MIN_DSS_KEYLEN) {
|
||||
dropbear_log(LOG_WARNING, "DSS key too short");
|
||||
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) {
|
||||
dropbear_log(LOG_WARNING, "Bad DSS q");
|
||||
TRACE(("leave buf_get_dss_pub_key: short key"))
|
||||
ret = DROPBEAR_FAILURE;
|
||||
goto out;
|
||||
|
Loading…
Reference in New Issue
Block a user