Ethereal-dev: [Ethereal-dev] Computation of key id in DNS Key RRs

Note: This archive is from the project's previous web site, ethereal.com. This list is no longer active.

From: David Fort <david.fort@xxxxxxxx>
Date: Wed, 14 Jan 2004 18:42:12 +0100
This patch fixes things in the computation of key id, DNSsec RFC tells
that there's only two way of calculating key id: the RSAMD5 way and
the default one.

--
Fort David, Projet IDsA
IRISA-INRIA, Campus de Beaulieu, 35042 Rennes cedex, France
T�l: +33 (0) 2 99 84 71 33


Index: packet-dns.c
===================================================================
RCS file: /cvsroot/ethereal/packet-dns.c,v
retrieving revision 1.117
diff -r1.117 packet-dns.c
893d892
<  *   If we don't support the algorithm, return -1.
906c905
<      case DNS_ALGO_RSASHA1:
---
>      default:
918,919d916
<      default:
<        return -1;
1398,1402c1395
< 	if (key_id == -1)
< 	  proto_tree_add_text(rr_tree, tvb, 0, 0, "Key id: Unknown (algorithm %s not supported)",
< 		val_to_str(algo, algo_vals, "0x%02X"));
< 	else
< 	  proto_tree_add_text(rr_tree, tvb, 0, 0, "Key id: %d", key_id);
---
> 	proto_tree_add_text(rr_tree, tvb, 0, 0, "Key id: %d", key_id);