Package org.xbill.DNS

Class TSIGRecord

java.lang.Object
org.xbill.DNS.Record
org.xbill.DNS.TSIGRecord
All Implemented Interfaces:
Serializable, Cloneable, Comparable<Record>

public class TSIGRecord extends Record
Transaction Signature - this record is automatically generated by the resolver. TSIG records provide transaction security between the sender and receiver of a message, using a shared key.
Author:
Brian Wellington
See Also:
  • Constructor Details

    • TSIGRecord

      @Deprecated public TSIGRecord(Name name, int dclass, long ttl, Name alg, Date timeSigned, int fudge, byte[] signature, int originalID, int error, byte[] other)
      Creates a TSIG Record from the given data. This is normally called by the TSIG class
      Parameters:
      alg - The shared key's algorithm
      timeSigned - The time that this record was generated
      fudge - The fudge factor for time - if the time that the message is received is not in the range [now - fudge, now + fudge], the signature fails
      signature - The signature
      originalID - The message ID at the time of its generation
      error - The extended error field. Should be 0 in queries.
      other - The other data field. Currently used only in BADTIME responses.
      See Also:
    • TSIGRecord

      public TSIGRecord(Name name, int dclass, long ttl, Name alg, Instant timeSigned, Duration fudge, byte[] signature, int originalID, int error, byte[] other)
      Creates a TSIG Record from the given data. This is normally called by the TSIG class
      Parameters:
      alg - The shared key's algorithm
      timeSigned - The time that this record was generated
      fudge - The fudge factor for time - if the time that the message is received is not in the range [now - fudge, now + fudge], the signature fails
      signature - The signature
      originalID - The message ID at the time of its generation
      error - The extended error field. Should be 0 in queries.
      other - The other data field. Currently used only in BADTIME responses.
      See Also:
  • Method Details

    • rrFromWire

      protected void rrFromWire(DNSInput in) throws IOException
      Description copied from class: Record
      Converts the type-specific RR to wire format - must be overridden
      Specified by:
      rrFromWire in class Record
      Throws:
      IOException
    • rdataFromString

      protected void rdataFromString(Tokenizer st, Name origin) throws IOException
      Description copied from class: Record
      Converts the text format of an RR to the internal format - must be overriden
      Specified by:
      rdataFromString in class Record
      Throws:
      IOException
    • rrToString

      protected String rrToString()
      Converts rdata to a String
      Specified by:
      rrToString in class Record
    • getAlgorithm

      public Name getAlgorithm()
      Returns the shared key's algorithm
    • getTimeSigned

      public Instant getTimeSigned()
      Returns the time that this record was generated
    • getFudge

      public Duration getFudge()
      Returns the time fudge factor
    • getSignature

      public byte[] getSignature()
      Returns the signature
    • getOriginalID

      public int getOriginalID()
      Returns the original message ID
    • getError

      public int getError()
      Returns the extended error
    • getOther

      public byte[] getOther()
      Returns the other data
    • rrToWire

      protected void rrToWire(DNSOutput out, Compression c, boolean canonical)
      Description copied from class: Record
      Converts the type-specific RR to wire format - must be overridden.
      Specified by:
      rrToWire in class Record