Modifier and Type | Field and Description |
---|---|
static int |
VALIDATION_REASON_QCLASS
The QCLASS being used for the injection of the reason why the validator came to the returned
result.
|
Constructor and Description |
---|
ValidatingResolver(Resolver headResolver)
Creates a new instance of this class.
|
ValidatingResolver(Resolver headResolver,
Clock clock)
Creates a new instance of this class.
|
Modifier and Type | Method and Description |
---|---|
Duration |
getTimeout()
Gets the amount of time to wait for a response before giving up.
|
org.xbill.DNS.dnssec.TrustAnchorStore |
getTrustAnchors()
Gets the store with the loaded trust anchors.
|
void |
init(Properties config)
Initialize the module.
|
void |
loadTrustAnchors(InputStream data)
Load the trust anchor file into the trust anchor store.
|
CompletionStage<Message> |
sendAsync(Message query)
Asynchronously sends a message and validates the response with DNSSEC before returning it.
|
void |
setEDNS(int version,
int payloadSize,
int flags,
List<EDNSOption> options)
The method is forwarded to the resolver, but always ensure that the level is 0 and the flags
contains DO.
|
void |
setIgnoreTruncation(boolean flag)
This is a no-op, truncation is never ignored.
|
void |
setPort(int port)
Forwards the data to the head resolver passed at construction time.
|
void |
setTCP(boolean flag)
Forwards the data to the head resolver passed at construction time.
|
void |
setTimeout(Duration duration)
Sets the amount of time to wait for a response before giving up.
|
void |
setTSIGKey(TSIG key)
Forwards the data to the head resolver passed at construction time.
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
send, sendAsync, sendAsync, setEDNS, setEDNS, setTimeout, setTimeout
public static final int VALIDATION_REASON_QCLASS
public ValidatingResolver(Resolver headResolver)
headResolver
- The resolver to which queries for DS, DNSKEY and referring CNAME records
are sent.public void init(Properties config) throws IOException
config
- The configuration data for this module.IOException
- When the file specified in the config does not exist or cannot be read.KeyCache.init(Properties)
,
ValUtils.init(Properties)
,
NSEC3ValUtils.init(Properties)
public void loadTrustAnchors(InputStream data) throws IOException
data
- The trust anchor data.IOException
- when the trust anchor data could not be read.public org.xbill.DNS.dnssec.TrustAnchorStore getTrustAnchors()
public void setPort(int port)
setPort
in interface Resolver
port
- The IP destination port for the queries sent.Resolver.setPort(int)
public void setTCP(boolean flag)
setTCP
in interface Resolver
flag
- true
to enable TCP, false
to disable it.Resolver.setTCP(boolean)
public void setIgnoreTruncation(boolean flag)
setIgnoreTruncation
in interface Resolver
flag
- unusedpublic void setEDNS(int version, int payloadSize, int flags, List<EDNSOption> options)
setEDNS
in interface Resolver
version
- The EDNS level to use. 0 indicates EDNS0.payloadSize
- The maximum DNS packet size that this host is capable of receiving over UDP.
If 0 is specified, the default (1280) is used.flags
- EDNS extended flags to be set in the OPT record, ExtendedFlags.DO
is
always appended.options
- EDNS options to be set in the OPT record, specified as a List of
OPTRecord.Option elements.Resolver.setEDNS(int, int, int, List)
public void setTSIGKey(TSIG key)
setTSIGKey
in interface Resolver
key
- The key.Resolver.setTSIGKey(TSIG)
public Duration getTimeout()
Resolver
getTimeout
in interface Resolver
Resolver.setTimeout(Duration)
public void setTimeout(Duration duration)
Resolver
setTimeout
in interface Resolver
duration
- The amount of time to wait.public CompletionStage<Message> sendAsync(Message query)
Copyright © 2023 dnsjava.org. All rights reserved.