Skip to content

Commit fe7654c

Browse files
author
bwelling
committed
assert tsig
git-svn-id: http://svn.code.sf.net/p/dnsjava/code/trunk@504 c76caeb1-94fd-44dd-870f-0c9d92034fc1
1 parent 99ef7eb commit fe7654c

File tree

1 file changed

+13
-1
lines changed

1 file changed

+13
-1
lines changed

update.java

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -496,6 +496,18 @@ else if (field.equalsIgnoreCase("serial")) {
496496
}
497497
}
498498
}
499+
else if (field.equalsIgnoreCase("tsig")) {
500+
if (response.isSigned()) {
501+
if (response.isVerified())
502+
value = "ok";
503+
else
504+
value = "failed";
505+
}
506+
else
507+
value = "unsigned";
508+
if (!value.equalsIgnoreCase(expected))
509+
flag = false;
510+
}
499511
else if ((section = Section.value(field)) >= 0) {
500512
int count = response.getHeader().getCount(section);
501513
if (count != Integer.parseInt(expected)) {
@@ -536,7 +548,7 @@ else if (topic.equalsIgnoreCase("assert"))
536548
"response matches the value specified. If not,\n" +
537549
"the message is printed (if present) and the\n" +
538550
"program exits. The field may be any of <rcode>,\n" +
539-
"<serial>, <qu>, <an>, <au>, or <ad>.\n");
551+
"<serial>, <tsig>, <qu>, <an>, <au>, or <ad>.\n");
540552
else if (topic.equalsIgnoreCase("class"))
541553
System.out.println(
542554
"class <class>\n\n" +

0 commit comments

Comments
 (0)