Package org.xbill.DNS
Class TSIG.StreamVerifier
java.lang.Object
org.xbill.DNS.TSIG.StreamVerifier
- Enclosing class:
TSIG
A utility class for verifying multiple message responses.
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate Stringnullor the detailed error when validation failed due to aRcode.FORMERR.private final TSIGprivate intprivate intprivate final TSIGRecordprivate final Mac -
Constructor Summary
ConstructorsConstructorDescriptionStreamVerifier(TSIG tsig, TSIGRecord queryTsig) Creates an object to verify a multiple message response -
Method Summary
Modifier and TypeMethodDescriptionprivate voidaddUnsignedMessageToMac(Message m, byte[] messageBytes, Mac hmac) intVerifies a TSIG record on an incoming message that is part of a multiple message response.intVerifies a TSIG record on an incoming message that is part of a multiple message response.
-
Field Details
-
key
-
queryTsig
-
nresponses
private int nresponses -
lastsigned
private int lastsigned -
errorMessage
nullor the detailed error when validation failed due to aRcode.FORMERR.
-
-
Constructor Details
-
StreamVerifier
Creates an object to verify a multiple message response
-
-
Method Details
-
verify
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. Useverify(Message, byte[], boolean)to explicitly specify the last message or check that the message is verified withMessage.isVerified().- Parameters:
message- The messagemessageBytes- The message in unparsed form- Returns:
- The result of the verification (as an Rcode)
- See Also:
-
verify
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 messagemessageBytes- The message in unparsed formisLastMessage- If true, verifies that theMessagehas anTSIGRecord.- Returns:
- The result of the verification (as an Rcode)
- Since:
- 3.5.3
- See Also:
-
addUnsignedMessageToMac
-