Package org.jitsi.dnssec.validator
Class KeyEntry
java.lang.Object
org.jitsi.dnssec.validator.KeyEntry
DNSKEY cache entry for a given
Name, with or without actual keys.-
Method Summary
Modifier and TypeMethodDescriptionGets the reason why this key entry is bad.intGets the DNS class.org.xbill.DNS.NamegetName()Gets the name of the cache entry.getRRset()Gets the DNSKEYs for the cached key entry.longgetTTL()Gets the TTL [s].booleanisBad()Gets an indication if this is a bad key, i.e.booleanisGood()Gets an indication if this is a good key, i.e.booleanisNull()Gets an indication if this is a null key, i.e.static KeyEntrynewBadKeyEntry(org.xbill.DNS.Name n, int dclass, long ttl) Creates a new bad key entry without actual DNSKEYs, i.e.static KeyEntrynewKeyEntry(SRRset rrset) Creates a new key entry from actual DNSKEYs.static KeyEntrynewNullKeyEntry(org.xbill.DNS.Name n, int dclass, long ttl) Creates a new trusted key entry without actual DNSKEYs, i.e.voidsetBadReason(String reason) Sets the reason why this key entry is bad.
-
Method Details
-
newKeyEntry
Creates a new key entry from actual DNSKEYs.- Parameters:
rrset- The DNSKEYs to cache.- Returns:
- The created key entry.
-
newNullKeyEntry
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
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
Gets the DNSKEYs for the cached key entry. Can benull.- 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:
Trueis it is null,falseotherwise.
-
isBad
public boolean isBad()Gets an indication if this is a bad key, i.e. an invalid response.- Returns:
Trueis it is bad,falseotherwise.
-
isGood
public boolean isGood()Gets an indication if this is a good key, i.e. a proven secure response with keys.- Returns:
Trueis it is good,falseotherwise.
-
getBadReason
Gets the reason why this key entry is bad.- Returns:
- The reason why this key entry is bad.
-
setBadReason
Sets the reason why this key entry is bad.- Parameters:
reason- The reason why this key entry is bad.
-