diff --git a/nsecx.go b/nsecx.go index 42baacac..8e8795ef 100644 --- a/nsecx.go +++ b/nsecx.go @@ -113,7 +113,7 @@ func (rr *NSEC3) Match(name string) bool { } // VerifyNameError takes a slice of NSEC or NSEC3 RR, the qname and the qtype and tries -// to proof the authenticated denial of existence. If nil is returned the proof +// to verify the authenticated denial of existence. If nil is returned the proof // succeeded otherwise the error will indicated what was wrong. func VerifyNameError(nsecx []RR, qname string, qtype uint16) error { // TODO(miek): wildcard expanded reply @@ -177,3 +177,6 @@ ClosestEncloser: // NSEC Helper func verifyNameError(nsecx []RR, qname string, qtype uint16) error { return nil } + +// VerifyNoData +func VerifyNoData(nsecx []RR, qname string, qtype uint16) error { return nil} diff --git a/nsecx_test.go b/nsecx_test.go index 598ab937..7c831101 100644 --- a/nsecx_test.go +++ b/nsecx_test.go @@ -48,7 +48,7 @@ func TestNsec3Proof(t *testing.T) { newNSEC3("39p91242oslggest5e6a7cci4iaeqvnk.nl. IN NSEC3 1 1 5 F10E9F7EA83FC8F3 39P99DCGG0MDLARTCRMCF6OFLLUL7PR6 NS DS RRSIG"), newNSEC3("t98kg1p1cjtdoc4ksb7g57jc9vulltcd.nl. IN NSEC3 1 1 5 F10E9F7EA83FC8F3 T98MULSKU3E499AGCTTRJK6H0L3E5T92 NS DS RRSIG")} - err := Proof(nsec3, "snasajsksasasa.nl.", TypeA) + err := VerifyNameError(nsec3, "snasajsksasasa.nl.", TypeA) if err != nil { t.Logf("Failed to validate NSEC3") t.Fail() @@ -58,7 +58,7 @@ func TestNsec3Proof(t *testing.T) { newNSEC3("39p91242oslggest5e6a7cci4iaeqvnk.nl. IN NSEC3 1 1 5 F10E9F7EA83FC8F3 39P99DCGG0MDLARTCRMCF6OFLLUL7PR6 NS DS RRSIG"), newNSEC3("t98kg1p1cjtdoc4ksb7g57jc9vulltcd.nl. IN NSEC3 1 1 5 F10E9F7EA83FC8F3 T98MULSKU3E499AGCTTRJK6H0L3E5T92 NS DS RRSIG")} - err = Proof(nsec3, "snasajsksasasa.nl.", TypeA) + err = VerifyNameError(nsec3, "snasajsksasasa.nl.", TypeA) if err == nil { t.Logf("Should fail validate NSEC3") t.Fail() @@ -68,7 +68,7 @@ func TestNsec3Proof(t *testing.T) { newNSEC3("39p91242oslggest5e6a7cci4iaeqvnk.nl. IN NSEC3 1 1 5 F10E9F7EA83FC8F3 39P99DCGG0MDLARTCRMCF6OFLLUL7PR6 NS DS RRSIG"), newNSEC3("t98kg1p1cjtdoc4ksb7g57jc9vulltcd.nl. IN NSEC3 1 1 5 F10E9F7EA83FC8F3 T98LULSKU3E499AGCTTRJK6H0L3E5T92 NS DS RRSIG")} - err = Proof(nsec3, "snasajsksasasa.nl.", TypeA) + err = VerifyNameError(nsec3, "snasajsksasasa.nl.", TypeA) if err == nil { t.Logf("Should fail validate NSEC3") t.Fail() @@ -78,7 +78,7 @@ func TestNsec3Proof(t *testing.T) { newNSEC3("39p91242oslggest5e6a7cci4iaeqvnk.nl. IN NSEC3 1 1 5 F10E9F7EA83FC8F3 39P89DCGG0MDLARTCRMCF6OFLLUL7PR6 NS DS RRSIG"), newNSEC3("t98kg1p1cjtdoc4ksb7g57jc9vulltcd.nl. IN NSEC3 1 1 5 F10E9F7EA83FC8F3 T98LULSKU3E499AGCTTRJK6H0L3E5T92 NS DS RRSIG")} - err = Proof(nsec3, "snasajsksasasa.nl.", TypeA) + err = VerifyNameError(nsec3, "snasajsksasasa.nl.", TypeA) if err == nil { t.Logf("Should fail validate NSEC3") t.Fail()