add another example

This commit is contained in:
Miek Gieben 2011-03-22 09:18:24 +01:00
parent bc4d7ed748
commit 7700ba5e9d
2 changed files with 3 additions and 3 deletions

View File

@ -4,6 +4,7 @@ chaos \
axfr \
reflect \
funkensturm \
ds2key \
all:
for i in $(EXAMPLES); do gomake -C $$i; done

View File

@ -30,11 +30,10 @@ func main() {
for _, k := range in.Answer {
// Foreach key would need to provide a DS records, both sha1 and sha256
if key, ok := k.(*dns.RR_DNSKEY); ok {
fmt.Printf("%v\n", key)
ds := key.ToDS(dns.HashSHA1)
fmt.Printf("\t%v\n", ds)
fmt.Printf("%v\n", ds)
ds = key.ToDS(dns.HashSHA256)
fmt.Printf("\t%v\n", ds)
fmt.Printf("%v\n", ds)
}
}
} else {