Fix dropbearkey to disallow 512 bit keys

The key loading code rejected <1024 bit keys already
This commit is contained in:
Matt Johnston 2022-11-10 13:20:09 +08:00
parent 86ac8411a0
commit 1cdd95f997

View File

@ -127,8 +127,8 @@ static void check_signkey_bits(enum signkey_type type, int bits)
#endif
#if DROPBEAR_RSA
case DROPBEAR_SIGNKEY_RSA:
if (bits < 512 || bits > 4096 || (bits % 8 != 0)) {
dropbear_exit("Bits must satisfy 512 <= bits <= 4096, and be a"
if (bits < 1024 || bits > 4096 || (bits % 8 != 0)) {
dropbear_exit("Bits must satisfy 1024 <= bits <= 4096, and be a"
" multiple of 8\n");
}
break;