dns/nsecx_test.go

24 lines
513 B
Go
Raw Normal View History

2013-05-12 14:09:52 +00:00
// Copyright 2011 Miek Gieben. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
2011-03-07 21:47:20 +00:00
package dns
import (
"testing"
)
func TestPackNsec3(t *testing.T) {
2012-01-08 14:34:42 +00:00
nsec3 := HashName("dnsex.nl.", SHA1, 0, "DEAD")
2011-07-05 18:01:17 +00:00
if nsec3 != "ROCCJAE8BJJU7HN6T7NG3TNM8ACRS87J" {
t.Logf("%v\n", nsec3)
t.Fail()
}
2011-03-09 13:27:41 +00:00
2012-01-08 14:34:42 +00:00
nsec3 = HashName("a.b.c.example.org.", SHA1, 2, "DEAD")
2011-07-05 18:01:17 +00:00
if nsec3 != "6LQ07OAHBTOOEU2R9ANI2AT70K5O0RCG" {
t.Logf("%v\n", nsec3)
t.Fail()
}
2011-03-07 21:47:20 +00:00
}