Print if its a ksk/zsk

This commit is contained in:
Miek Gieben 2011-12-16 18:00:19 +01:00
parent 4280999b50
commit fb01e828c7
1 changed files with 7 additions and 0 deletions

View File

@ -44,6 +44,13 @@ func main() {
// Maybe print the key flags?
if key, ok := k.(*dns.RR_DNSKEY); ok {
key.Hdr.Ttl = 0
switch key.Flags {
case 256:
fmt.Printf("; ZSK\n")
case 257:
fmt.Printf("; KSK\n")
}
ds := key.ToDS(dns.SHA1)
fmt.Printf("%v\n", ds)
ds = key.ToDS(dns.SHA256)