Package org.xbill.DNS

Class TSIG.StreamVerifier

java.lang.Object
org.xbill.DNS.TSIG.StreamVerifier
Enclosing class:
TSIG

public static class TSIG.StreamVerifier extends Object
A utility class for verifying multiple message responses.
  • Constructor Details

    • StreamVerifier

      public StreamVerifier(TSIG tsig, TSIGRecord queryTsig)
      Creates an object to verify a multiple message response
  • Method Details

    • verify

      public int verify(Message message, byte[] messageBytes)
      Verifies a TSIG record on an incoming message that is part of a multiple message response. TSIG records must be present on the first and last messages, and at least every 100 records in between. After calling this routine,Message.isVerified() may be called on this message.

      This overload assumes that the verified message is not the last one, which is required to have a TSIGRecord. Use verify(Message, byte[], boolean) to explicitly specify the last message or check that the message is verified with Message.isVerified().

      Parameters:
      message - The message
      messageBytes - The message in unparsed form
      Returns:
      The result of the verification (as an Rcode)
      See Also:
    • verify

      public int verify(Message message, byte[] messageBytes, boolean isLastMessage)
      Verifies a TSIG record on an incoming message that is part of a multiple message response. TSIG records must be present on the first and last messages, and at least every 100 records in between. After calling this routine, Message.isVerified() may be called on this message.
      Parameters:
      message - The message
      messageBytes - The message in unparsed form
      isLastMessage - If true, verifies that the Message has an TSIGRecord.
      Returns:
      The result of the verification (as an Rcode)
      Since:
      3.5.3
      See Also:
    • getErrorMessage

      public String getErrorMessage()
      null or the detailed error when validation failed due to a Rcode.FORMERR.