public class ValidatingResolver extends Object implements org.xbill.DNS.Resolver
| 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(org.xbill.DNS.Resolver headResolver)
Creates a new instance of this class.
|
ValidatingResolver(org.xbill.DNS.Resolver headResolver,
Clock clock)
Creates a new instance of this class.
|
| Modifier and Type | Method and Description |
|---|---|
Duration |
getTimeout() |
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<org.xbill.DNS.Message> |
sendAsync(org.xbill.DNS.Message query)
Asynchronously sends a message and validates the response with DNSSEC before returning it.
|
void |
setEDNS(int version,
int payloadSize,
int flags,
List<org.xbill.DNS.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) |
void |
setTSIGKey(org.xbill.DNS.TSIG key)
Forwards the data to the head resolver passed at construction time.
|
public static final int VALIDATION_REASON_QCLASS
public ValidatingResolver(org.xbill.DNS.Resolver headResolver)
headResolver - The resolver to which queries for DS, DNSKEY and referring CNAME records
are sent.public ValidatingResolver(org.xbill.DNS.Resolver headResolver,
Clock clock)
headResolver - The resolver to which queries for DS, DNSKEY and referring CNAME records
are sent.clock - the Clock to validate messages.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.public void loadTrustAnchors(InputStream data) throws IOException
data - The trust anchor data.IOException - when the trust anchor data could not be read.public TrustAnchorStore getTrustAnchors()
public void setPort(int port)
setPort in interface org.xbill.DNS.Resolverport - The IP destination port for the queries sent.Resolver.setPort(int)public void setTCP(boolean flag)
setTCP in interface org.xbill.DNS.Resolverflag - true to enable TCP, false to disable it.Resolver.setTCP(boolean)public void setIgnoreTruncation(boolean flag)
setIgnoreTruncation in interface org.xbill.DNS.Resolverflag - unusedpublic void setEDNS(int version,
int payloadSize,
int flags,
List<org.xbill.DNS.EDNSOption> options)
setEDNS in interface org.xbill.DNS.Resolverversion - 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, java.util.List)public void setTSIGKey(org.xbill.DNS.TSIG key)
setTSIGKey in interface org.xbill.DNS.Resolverkey - The key.Resolver.setTSIGKey(org.xbill.DNS.TSIG)public Duration getTimeout()
getTimeout in interface org.xbill.DNS.Resolverpublic void setTimeout(Duration duration)
setTimeout in interface org.xbill.DNS.Resolverpublic CompletionStage<org.xbill.DNS.Message> sendAsync(org.xbill.DNS.Message query)
sendAsync in interface org.xbill.DNS.Resolverquery - The query to send.Copyright © 2020 jitsi.org. All rights reserved.