本文整理了Java中org.xbill.DNS.Message.isVerified()
方法的一些代码示例,展示了Message.isVerified()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Message.isVerified()
方法的具体详情如下:
包路径:org.xbill.DNS.Message
类名称:Message
方法名:isVerified
暂无
代码示例来源:origin: dnsjava/dnsjava
static void
doAXFR(Message response) throws IOException {
System.out.println("; java dig 0.0 <> " + name + " axfr");
if (response.isSigned()) {
System.out.print(";; TSIG ");
if (response.isVerified())
System.out.println("ok");
else
System.out.println("failed");
}
if (response.getRcode() != Rcode.NOERROR) {
System.out.println(response);
return;
}
Record [] records = response.getSectionArray(Section.ANSWER);
for (int i = 0; i < records.length; i++)
System.out.println(records[i]);
System.out.print(";; done (");
System.out.print(response.getHeader().getCount(Section.ANSWER));
System.out.print(" records, ");
System.out.print(response.getHeader().getCount(Section.ADDITIONAL));
System.out.println(" additional)");
}
代码示例来源:origin: tiandawu/IotXmpp
/**
* Converts the Message to a String.
*/
public String
toString() {
StringBuffer sb = new StringBuffer();
OPTRecord opt = getOPT();
if (opt != null)
sb.append(header.toStringWithRcode(getRcode()) + "\n");
else
sb.append(header + "\n");
if (isSigned()) {
sb.append(";; TSIG ");
if (isVerified())
sb.append("ok");
else
sb.append("invalid");
sb.append('\n');
}
for (int i = 0; i < 4; i++) {
if (header.getOpcode() != Opcode.UPDATE)
sb.append(";; " + Section.longString(i) + ":\n");
else
sb.append(";; " + Section.updString(i) + ":\n");
sb.append(sectionToString(i) + "\n");
}
sb.append(";; Message size: " + numBytes() + " bytes");
return sb.toString();
}
代码示例来源:origin: org.littleshoot/dnsjava
/**
* Converts the Message to a String.
*/
public String
toString() {
StringBuffer sb = new StringBuffer();
OPTRecord opt = getOPT();
if (opt != null)
sb.append(header.toStringWithRcode(getRcode()) + "\n");
else
sb.append(header + "\n");
if (isSigned()) {
sb.append(";; TSIG ");
if (isVerified())
sb.append("ok");
else
sb.append("invalid");
sb.append('\n');
}
for (int i = 0; i < 4; i++) {
if (header.getOpcode() != Opcode.UPDATE)
sb.append(";; " + Section.longString(i) + ":\n");
else
sb.append(";; " + Section.updString(i) + ":\n");
sb.append(sectionToString(i) + "\n");
}
sb.append(";; Message size: " + numBytes() + " bytes");
return sb.toString();
}
代码示例来源:origin: dnsjava/dnsjava
/**
* Converts the Message to a String.
*/
public String
toString() {
StringBuffer sb = new StringBuffer();
OPTRecord opt = getOPT();
if (opt != null)
sb.append(header.toStringWithRcode(getRcode()) + "\n");
else
sb.append(header + "\n");
if (isSigned()) {
sb.append(";; TSIG ");
if (isVerified())
sb.append("ok");
else
sb.append("invalid");
sb.append('\n');
}
for (int i = 0; i < 4; i++) {
if (header.getOpcode() != Opcode.UPDATE)
sb.append(";; " + Section.longString(i) + ":\n");
else
sb.append(";; " + Section.updString(i) + ":\n");
sb.append(sectionToString(i) + "\n");
}
sb.append(";; Message size: " + numBytes() + " bytes");
return sb.toString();
}
代码示例来源:origin: net.sf.dnsjava-osgi/dnsjava-osgi
/**
* Converts the Message to a String.
*/
public String
toString() {
StringBuffer sb = new StringBuffer();
OPTRecord opt = getOPT();
if (opt != null)
sb.append(header.toStringWithRcode(getRcode()) + "\n");
else
sb.append(header + "\n");
if (isSigned()) {
sb.append(";; TSIG ");
if (isVerified())
sb.append("ok");
else
sb.append("invalid");
sb.append('\n');
}
for (int i = 0; i < 4; i++) {
if (header.getOpcode() != Opcode.UPDATE)
sb.append(";; " + Section.longString(i) + ":\n");
else
sb.append(";; " + Section.updString(i) + ":\n");
sb.append(sectionToString(i) + "\n");
}
sb.append(";; Message size: " + numBytes() + " bytes");
return sb.toString();
}
代码示例来源:origin: dnsjava/dnsjava
if (response.isVerified())
value = "ok";
else
代码示例来源:origin: dnsjava/dnsjava
!response.isVerified())
fail("last message must be signed");
代码示例来源:origin: org.littleshoot/dnsjava
!response.isVerified())
fail("last message must be signed");
代码示例来源:origin: tiandawu/IotXmpp
!response.isVerified())
fail("last message must be signed");
内容来源于网络,如有侵权,请联系作者删除!