Browse Source

[2387] Add NSEC3PARAM test for bad base32 hex sequence

Mukund Sivaraman 12 years ago
parent
commit
393534ac46
1 changed files with 3 additions and 0 deletions
  1. 3 0
      src/lib/dns/tests/rdata_nsec3param_unittest.cc

+ 3 - 0
src/lib/dns/tests/rdata_nsec3param_unittest.cc

@@ -94,6 +94,9 @@ TEST_F(Rdata_NSEC3PARAM_Test, badText) {
     // Iterations out of range.
     EXPECT_THROW(generic::NSEC3PARAM("1 1 65536 D399EAAB"), InvalidRdataText);
 
+    // Bad base32 hex sequence
+    EXPECT_THROW(generic::NSEC3PARAM("1 1 256 D399EAABZOO"), BadValue);
+
     // String instead of number
     EXPECT_THROW(generic::NSEC3PARAM("foo 1 256 D399EAAB"),
                  InvalidRdataText);