From: Matthijs Mekking Date: Thu, 1 Oct 2020 09:05:01 +0000 (+0200) Subject: Fix kasp min key size bug X-Git-Tag: v9.17.6~17^2~1 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=7c555254fe97825c4bfeaa08aa6d349c6fd2c636;p=thirdparty%2Fbind9.git Fix kasp min key size bug The minimal size for RSASHA1, RSASHA256 is 512, but due to bad assignment it was set to 1024. --- diff --git a/lib/dns/kasp.c b/lib/dns/kasp.c index fb945ddbbfa..68ec3a96514 100644 --- a/lib/dns/kasp.c +++ b/lib/dns/kasp.c @@ -394,7 +394,7 @@ dns_kasp_key_size(dns_kasp_key_t *key) { case DNS_KEYALG_NSEC3RSASHA1: case DNS_KEYALG_RSASHA256: case DNS_KEYALG_RSASHA512: - min = DNS_KEYALG_RSASHA512 ? 1024 : 512; + min = (key->algorithm == DNS_KEYALG_RSASHA512) ? 1024 : 512; if (key->length > -1) { size = (unsigned int)key->length; if (size < min) {