More NSEC3 stuff

This commit is contained in:
Miek Gieben 2011-03-07 21:56:36 +01:00
parent e0fb2abe85
commit 77562dcfed
3 changed files with 20 additions and 2 deletions

View File

@ -15,11 +15,11 @@ GOFILES=\
dnssec.go\
keygen.go\
string.go\
nsec3.go\
resolver.go\
config.go\
server.go \
# y.go\
# nsec3.go \
include $(GOROOT)/src/Make.pkg

3
TODO
View File

@ -3,7 +3,8 @@ Todo:
* Tsig generation for replies (request MAC)
* Parsing from strings, going with goyacc and .cz lexer
* encoding NSEC3/NSEC bitmaps, DEcoding works
* Failed Xfr triggers nil error
nsec3 hashing of owner names
* Failed Xfr triggers nil error?
Issues:
* Check the network order, it works now, but this is on Intel??

View File

@ -1,5 +1,22 @@
package dns
import (
"crypto/sha1"
)
// NSEC3 related functions
// Hash a string/label according to RFC5155
func Nsec3Hash(label string, hash int, i iterations, salt string) {
nsec3 := ""
switch hash {
case HashSHA1:
s := sha1.New()
// i times
// add salt, binary???
io.WriteString(s, string(label))
ds.Digest = hex.EncodeToString(
}
return nsec3
}