Package org.xbill.DNS

Class SIGRecord

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

public class SIGRecord extends Record
Signature - A SIG provides the digital signature of an RRset, so that the data can be authenticated by a DNSSEC-capable resolver. The signature is usually generated by a key contained in a KEYRecord
Author:
Brian Wellington
See Also:
  • Field Details

    • covered

      protected int covered
    • alg

      protected int alg
    • labels

      protected int labels
    • origttl

      protected long origttl
    • expire

      protected Instant expire
    • timeSigned

      protected Instant timeSigned
    • footprint

      protected int footprint
    • signer

      protected Name signer
    • signature

      protected byte[] signature
  • Constructor Details

    • SIGRecord

      public SIGRecord(Name name, int dclass, long ttl, int covered, int alg, long origttl, Instant expire, Instant timeSigned, int footprint, Name signer, byte[] signature)
      Creates an SIG Record from the given data
      Parameters:
      covered - The RRset type covered by this signature
      alg - The cryptographic algorithm of the key that generated the signature
      origttl - The original TTL of the RRset
      expire - The time at which the signature expires
      timeSigned - The time at which this signature was generated
      footprint - The footprint/key id of the signing key.
      signer - The owner of the signing key
      signature - Binary data representing the signature
    • SIGRecord

      @Deprecated public SIGRecord(Name name, int dclass, long ttl, int covered, int alg, long origttl, Date expire, Date timeSigned, int footprint, Name signer, byte[] signature)
      Creates an SIG Record from the given data
      Parameters:
      covered - The RRset type covered by this signature
      alg - The cryptographic algorithm of the key that generated the signature
      origttl - The original TTL of the RRset
      expire - The time at which the signature expires
      timeSigned - The time at which this signature was generated
      footprint - The footprint/key id of the signing key.
      signer - The owner of the signing key
      signature - Binary data representing the signature
  • 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 the RRSIG/SIG Record to a String
      Specified by:
      rrToString in class Record
    • getTypeCovered

      public int getTypeCovered()
      Returns the RRset type covered by this signature
    • getRRsetType

      public int getRRsetType()
      Returns the type of RRset that this record would belong to. For all types except SIG/RRSIG, this is equivalent to getType().
      Overrides:
      getRRsetType in class Record
      Returns:
      The type of record
      See Also:
    • getAlgorithm

      public int getAlgorithm()
      Returns the cryptographic algorithm of the key that generated the signature
    • getLabels

      public int getLabels()
      Returns the number of labels in the signed domain name. This may be different than the record's domain name if the record is a wildcard record.
    • getOrigTTL

      public long getOrigTTL()
      Returns the original TTL of the RRset
    • getExpire

      public Instant getExpire()
      Returns the time at which the signature expires
    • getTimeSigned

      public Instant getTimeSigned()
      Returns the time at which this signature was generated
    • getFootprint

      public int getFootprint()
      Returns the footprint/key id of the signing key.
    • getSigner

      public Name getSigner()
      Returns the owner of the signing key
    • getSignature

      public byte[] getSignature()
      Returns the binary data representing the signature
    • 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