Package org.xbill.DNS.dnssec
Class KeyEntry
java.lang.Object
org.xbill.DNS.RRset
org.xbill.DNS.dnssec.SRRset
org.xbill.DNS.dnssec.KeyEntry
- All Implemented Interfaces:
Serializable,Iterable<Record>
DNSKEY cache entry for a given
Name, with or without actual keys.- Since:
- 3.5
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbooleanisBad()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(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 KeyEntrynewKeyEntry(SRRset rrset, List<Integer> sigalg) Creates a new key entry from actual DNSKEYs.static KeyEntrynewNullKeyEntry(Name n, int dclass, long ttl) Creates a new trusted key entry without actual DNSKEYs, i.e.voidsetBadReason(int edeReason, String reason) Sets the reason why this key entry is bad.(package private) JustifiedSecStatusvalidateKeyFor(SRRset set) Validate if this key instance is valid for the specified name.Methods inherited from class org.xbill.DNS.dnssec.SRRset
getName, getSecurityStatus, getSignerName, setName, setSecurityStatusMethods inherited from class org.xbill.DNS.RRset
addRR, addRR, clear, deleteRR, deleteRR, first, getDClass, getTTL, getType, isEmpty, iterator, rrs, rrs, sigs, sigSize, size, toStringMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface java.lang.Iterable
forEach, spliterator
-
Field Details
-
algo
List of algorithms signalled, may benull. -
edeReason
private int edeReason -
badReason
-
isEmpty
private boolean isEmpty
-
-
Constructor Details
-
KeyEntry
Create a new, positive key entry.- Parameters:
rrset- The set of records to cache.
-
KeyEntry
Create a new, positive key entry.- Parameters:
rrset- The set of records to cache.sigalg- signalled algorithm list, may benull.
-
KeyEntry
-
-
Method Details
-
newKeyEntry
Creates a new key entry from actual DNSKEYs.- Parameters:
rrset- The DNSKEYs to cache.- Returns:
- The created key entry.
-
newKeyEntry
Creates a new key entry from actual DNSKEYs.- Parameters:
rrset- The DNSKEYs to cache.sigalg- signalled algorithm list, may benull.- 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
-
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.
-
setBadReason
Sets the reason why this key entry is bad.- Parameters:
reason- The reason why this key entry is bad.
-
validateKeyFor
Validate if this key instance is valid for the specified name.- Parameters:
set- the set against which this key is validated.- Returns:
- A security status indicating if this key is valid, or if not, why.
-