BIND 10 trac2124, updated. 31477bf85002788f773532657e00cdf8e11a1995 [2124] Test toWire() with empty fingerprint data
BIND 10 source code commits
bind10-changes at lists.isc.org
Wed Jul 25 07:38:56 UTC 2012
The branch, trac2124 has been updated
via 31477bf85002788f773532657e00cdf8e11a1995 (commit)
from 3b82a4fda312a144d2883de96da76386ec199eea (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
- Log -----------------------------------------------------------------
commit 31477bf85002788f773532657e00cdf8e11a1995
Author: Mukund Sivaraman <muks at isc.org>
Date: Wed Jul 25 13:07:40 2012 +0530
[2124] Test toWire() with empty fingerprint data
-----------------------------------------------------------------------
Summary of changes:
src/lib/dns/tests/rdata_sshfp_unittest.cc | 16 ++++++++++++++++
1 file changed, 16 insertions(+)
-----------------------------------------------------------------------
diff --git a/src/lib/dns/tests/rdata_sshfp_unittest.cc b/src/lib/dns/tests/rdata_sshfp_unittest.cc
index 8adc963..0a6c75e 100644
--- a/src/lib/dns/tests/rdata_sshfp_unittest.cc
+++ b/src/lib/dns/tests/rdata_sshfp_unittest.cc
@@ -195,9 +195,25 @@ TEST_F(Rdata_SSHFP_Test, emptyFingerprintFromWire) {
TEST_F(Rdata_SSHFP_Test, emptyFingerprintFromString) {
const generic::SSHFP rdata_sshfp2("5 6");
+ const uint8_t rdata_sshfp2_wiredata[] = {
+ // algorithm
+ 0x05,
+ // fingerprint type
+ 0x06
+ };
EXPECT_EQ(5, rdata_sshfp2.getSSHFPAlgorithmNumber());
EXPECT_EQ(6, rdata_sshfp2.getSSHFPFingerprintType());
EXPECT_EQ(0, rdata_sshfp2.getFingerprintLen());
+
+ this->obuffer.clear();
+ rdata_sshfp2.toWire(this->obuffer);
+
+ EXPECT_EQ(2, this->obuffer.getLength());
+
+ EXPECT_PRED_FORMAT4(UnitTestUtil::matchWireData,
+ this->obuffer.getData(),
+ this->obuffer.getLength(),
+ rdata_sshfp2_wiredata, sizeof(rdata_sshfp2_wiredata));
}
}
More information about the bind10-changes
mailing list