Package org.xbill.DNS

Class SIGBase

java.lang.Object
org.xbill.DNS.Record
org.xbill.DNS.SIGBase
All Implemented Interfaces:
Serializable, Cloneable, Comparable<Record>
Direct Known Subclasses:
RRSIGRecord, SIGRecord

abstract class SIGBase extends Record
The base class for SIG/RRSIG records, which have identical formats
  • 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

    • SIGBase

      protected SIGBase()
    • SIGBase

      protected SIGBase(Name name, int type, int dclass, long ttl, int covered, int alg, long origttl, Instant expire, Instant timeSigned, int footprint, Name signer, byte[] 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
    • setSignature

      void setSignature(byte[] 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