Browse Source

[2124] Add another wiredata test with short fingerprint data

Mukund Sivaraman 12 years ago
parent
commit
d75a744fcd

+ 4 - 0
src/lib/dns/tests/rdata_sshfp_unittest.cc

@@ -122,6 +122,10 @@ TEST_F(Rdata_SSHFP_Test, createFromWire) {
     // algorithm=255, fingerprint=255
     EXPECT_NO_THROW(rdataFactoryFromFile(RRType("SSHFP"), RRClass("IN"),
                                          "rdata_sshfp_fromWire7.wire"));
+
+    // short fingerprint data
+    EXPECT_NO_THROW(rdataFactoryFromFile(RRType("SSHFP"), RRClass("IN"),
+                                         "rdata_sshfp_fromWire8.wire"));
 }
 
 TEST_F(Rdata_SSHFP_Test, toText) {

+ 1 - 0
src/lib/dns/tests/testdata/.gitignore

@@ -84,6 +84,7 @@
 /rdata_sshfp_fromWire5.wire
 /rdata_sshfp_fromWire6.wire
 /rdata_sshfp_fromWire7.wire
+/rdata_sshfp_fromWire8.wire
 /rdata_tsig_fromWire1.wire
 /rdata_tsig_fromWire2.wire
 /rdata_tsig_fromWire3.wire

+ 2 - 2
src/lib/dns/tests/testdata/Makefile.am

@@ -47,7 +47,7 @@ BUILT_SOURCES += rdata_rp_toWire1.wire rdata_rp_toWire2.wire
 BUILT_SOURCES += rdata_sshfp_fromWire1.wire rdata_sshfp_fromWire2.wire
 BUILT_SOURCES += rdata_sshfp_fromWire3.wire rdata_sshfp_fromWire4.wire
 BUILT_SOURCES += rdata_sshfp_fromWire5.wire rdata_sshfp_fromWire6.wire
-BUILT_SOURCES += rdata_sshfp_fromWire7.wire
+BUILT_SOURCES += rdata_sshfp_fromWire7.wire rdata_sshfp_fromWire8.wire
 BUILT_SOURCES += rdata_afsdb_fromWire1.wire rdata_afsdb_fromWire2.wire
 BUILT_SOURCES += rdata_afsdb_fromWire3.wire rdata_afsdb_fromWire4.wire
 BUILT_SOURCES += rdata_afsdb_fromWire5.wire
@@ -134,7 +134,7 @@ EXTRA_DIST += rdata_sshfp_fromWire rdata_sshfp_fromWire2
 EXTRA_DIST += rdata_sshfp_fromWire1.spec rdata_sshfp_fromWire2.spec
 EXTRA_DIST += rdata_sshfp_fromWire3.spec rdata_sshfp_fromWire4.spec
 EXTRA_DIST += rdata_sshfp_fromWire5.spec rdata_sshfp_fromWire6.spec
-EXTRA_DIST += rdata_sshfp_fromWire7.spec
+EXTRA_DIST += rdata_sshfp_fromWire7.spec rdata_sshfp_fromWire8.spec
 EXTRA_DIST += rdata_afsdb_fromWire1.spec rdata_afsdb_fromWire2.spec
 EXTRA_DIST += rdata_afsdb_fromWire3.spec rdata_afsdb_fromWire4.spec
 EXTRA_DIST += rdata_afsdb_fromWire5.spec

+ 9 - 0
src/lib/dns/tests/testdata/rdata_sshfp_fromWire8.spec

@@ -0,0 +1,9 @@
+#
+# SSHFP RDATA
+#
+[custom]
+sections: sshfp
+[sshfp]
+fingerprint: 082359342fd9
+algorithm: 255
+fingerprint_type: 255