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

This commit is contained in:
Giovanni Bajo
2012-04-25 18:13:20 +02:00
committed by Simon Kelley
parent 47f99dd2b3
commit e6c2a670fe

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);