Class KeyEntry

java.lang.Object
org.jitsi.dnssec.validator.KeyEntry

public final class KeyEntry extends Object
DNSKEY cache entry for a given Name, with or without actual keys.
  • Method Details

    • newKeyEntry

      public static KeyEntry newKeyEntry(SRRset rrset)
      Creates a new key entry from actual DNSKEYs.
      Parameters:
      rrset - The DNSKEYs to cache.
      Returns:
      The created key entry.
    • newNullKeyEntry

      public static KeyEntry newNullKeyEntry(org.xbill.DNS.Name n, int dclass, long ttl)
      Creates a new trusted key entry without actual DNSKEYs, i.e. it is proven that there are no keys.
      Parameters:
      n - The name for which the empty cache entry is created.
      dclass - The DNS class.
      ttl - The TTL [s].
      Returns:
      The created key entry.
    • newBadKeyEntry

      public static KeyEntry newBadKeyEntry(org.xbill.DNS.Name n, int dclass, long ttl)
      Creates a new bad key entry without actual DNSKEYs, i.e. from a response that did not validate.
      Parameters:
      n - The name for which the bad cache entry is created.
      dclass - The DNS class.
      ttl - The TTL [s].
      Returns:
      The created key entry.s
    • getRRset

      public SRRset getRRset()
      Gets the DNSKEYs for the cached key entry. Can be null.
      Returns:
      The DNSKEYs for the cached key entry. Can be null.
    • getName

      public org.xbill.DNS.Name getName()
      Gets the name of the cache entry.
      Returns:
      The name of the cache entry.
    • getDClass

      public int getDClass()
      Gets the DNS class.
      Returns:
      The DNS class.
    • getTTL

      public long getTTL()
      Gets the TTL [s].
      Returns:
      The TTL [s].
    • isNull

      public boolean isNull()
      Gets an indication if this is a null key, i.e. a proven secure response without keys.
      Returns:
      True is it is null, false otherwise.
    • isBad

      public boolean isBad()
      Gets an indication if this is a bad key, i.e. an invalid response.
      Returns:
      True is it is bad, false otherwise.
    • isGood

      public boolean isGood()
      Gets an indication if this is a good key, i.e. a proven secure response with keys.
      Returns:
      True is it is good, false otherwise.
    • getBadReason

      public String getBadReason()
      Gets the reason why this key entry is bad.
      Returns:
      The reason why this key entry is bad.
    • setBadReason

      public void setBadReason(String reason)
      Sets the reason why this key entry is bad.
      Parameters:
      reason - The reason why this key entry is bad.