Package org.xbill.DNS.dnssec
Class DnsSecVerifier
java.lang.Object
org.xbill.DNS.dnssec.DnsSecVerifier
A class for performing basic DNSSEC verification. The DNSJAVA package contains a similar class.
This is a reimplementation that allows us to have finer control over the validation process.
- Since:
- 3.5
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprivate List<DNSKEYRecord> findKey(RRset dnskeyRrset, RRSIGRecord signature) Find the matching DNSKEY(s) to an RRSIG within a DNSKEY rrset.voidinit(Properties config) Initialize the module.Verifies an RRset.verify(RRset rrset, DNSKEYRecord dnskey, Instant date) Verify an RRset against a single DNSKEY.private JustifiedSecStatusverifySignature(SRRset rrset, RRSIGRecord sigrec, KeyEntry keyRrset, Instant date) Verify an RRset against a particular signature.
-
Field Details
-
MAX_VALIDATE_RRSIGS_PROPERTY
- See Also:
-
valUtils
-
maxValidateRRsigs
private int maxValidateRRsigs
-
-
Constructor Details
-
DnsSecVerifier
-
-
Method Details
-
init
Initialize the module. The recognized configuration values are:- Parameters:
config- The configuration data for this module.
-
findKey
Find the matching DNSKEY(s) to an RRSIG within a DNSKEY rrset. Normally this will only return one DNSKEY. It can return more than one, since KeyID/Footprints are not guaranteed to be unique.- Parameters:
dnskeyRrset- The DNSKEY rrset to search.signature- The RRSIG to match against.- Returns:
- A List that contains one or more DNSKEYRecord objects; empty if a matching DNSKEY could not be found.
-
verifySignature
private JustifiedSecStatus verifySignature(SRRset rrset, RRSIGRecord sigrec, KeyEntry keyRrset, Instant date) Verify an RRset against a particular signature.- Parameters:
rrset- The RRset to verify.sigrec- The signature record that signs the RRset.keyRrset- The keys used to create the signature record.date- The date against which to verify the signature.- Returns:
SecurityStatus.SECUREif the signature verified,SecurityStatus.BOGUSif it did not verify (for any reason), andSecurityStatus.UNCHECKEDif verification could not be completed (usually because the public key was not available).
-
verify
Verifies an RRset. This routine does not modify the RRset. The RRset is presumed to be verifiable, and the correct DNSKEY rrset is presumed to have been found.- Parameters:
rrset- The RRset to verify.keyRrset- The keys to verify the signatures in the RRset to check.date- The date against which to verify the rrset.- Returns:
SecurityStatus.SECUREif theRRsetverified positively,SecurityStatus.BOGUSotherwise.
-
verify
Verify an RRset against a single DNSKEY. Use this when you must be certain that an RRset signed and verifies with a particular DNSKEY (as opposed to a particular DNSKEY rrset).- Parameters:
rrset- The rrset to verify.dnskey- The DNSKEY to verify with.date- The date against which to verify the rrset.- Returns:
SecurityStatus.SECUREif theRRsetverified,SecurityStatus.BOGUSotherwise.
-