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.int
Gets the DNS class.org.xbill.DNS.Name
getName()
Gets the name of the cache entry.getRRset()
Gets the DNSKEYs for the cached key entry.long
getTTL()
Gets the TTL [s].boolean
isBad()
Gets an indication if this is a bad key, i.e.boolean
isGood()
Gets an indication if this is a good key, i.e.boolean
isNull()
Gets an indication if this is a null key, i.e.static KeyEntry
newBadKeyEntry
(org.xbill.DNS.Name n, int dclass, long ttl) Creates a new bad key entry without actual DNSKEYs, i.e.static KeyEntry
newKeyEntry
(SRRset rrset) Creates a new key entry from actual DNSKEYs.static KeyEntry
newNullKeyEntry
(org.xbill.DNS.Name n, int dclass, long ttl) Creates a new trusted key entry without actual DNSKEYs, i.e.void
setBadReason
(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:
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
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.
-