Before using a key for validation, also verify that algorithm matches.

This commit is contained in:
Giovanni Bajo authored and Simon Kelley committed 2013-08-20 15:41:20 +01:00
1 parent 47f99dd2b3
commit e6c2a670fe
1 file changed
+2
+2
View File
@@ -252,6 +252,8 @@ static void dnssec_parserrsig(struct dns_header *header, size_t pktlen,
if (crecp->addr.key.keytag != val.keytag)
continue;
if (crecp->addr.key.algo != verifyalg_algonum(val.alg))
continue;
printf("RRSIG: found DNSKEY %d in cache, attempting validation\n", val.keytag);