API Reference
DnsSecValidator
Provides helper methods for validating DNSSEC responses against the built-in root trust anchors.
Inheritance
- Object
- DnsSecValidator
Methods
ComputeDigest(System.String name, System.UInt16 flags, System.Byte protocol, DnsClientX.DnsKeyAlgorithm algorithm, System.Byte[] publicKey) #Computes a SHA-256 digest for the provided DNSKEY parameters.
Parameters
- name System.String
- Domain name associated with the key.
- flags System.UInt16
- DNSKEY flags.
- protocol System.Byte
- Protocol value.
- algorithm DnsClientX.DnsKeyAlgorithm
- Algorithm identifier.
- publicKey System.Byte[]
- Public key bytes.
Returns
Calculated digest in hexadecimal form.
ComputeKeyTag(System.UInt16 flags, System.Byte protocol, DnsClientX.DnsKeyAlgorithm algorithm, System.Byte[] publicKey) #Computes the key tag value for a DNSKEY record as defined in RFC 4034.
Parameters
- flags System.UInt16
- DNSKEY flags.
- protocol System.Byte
- Protocol value.
- algorithm DnsClientX.DnsKeyAlgorithm
- Algorithm identifier.
- publicKey System.Byte[]
- Public key bytes.
Returns
The calculated key tag.
DomainToWireFormat(System.String domain) #Converts a domain name to its DNS wire format representation.
Parameters
- domain System.String
- Domain name to convert.
Returns
Byte array containing the wire format.
TryParseDnsKey(DnsClientX.DnsAnswer answer, System.UInt16@ flags, System.Byte@ protocol, DnsClientX.DnsKeyAlgorithm@ algorithm, System.Byte[]@ publicKey) #Attempts to parse a DNSKEY record into its individual components.
Parameters
- answer DnsClientX.DnsAnswer
- DNS answer containing the DNSKEY data.
- flags System.UInt16@
- Parsed key flags.
- protocol System.Byte@
- DNS protocol value.
- algorithm DnsClientX.DnsKeyAlgorithm@
- Key algorithm.
- publicKey System.Byte[]@
- Extracted public key bytes.
Returns
true when parsing succeeds; otherwise false.
TryParseDs(System.String dataRaw, DnsClientX.RootDsRecord@ record) #Attempts to parse a DS record string into a RootDsRecord instance.
Parameters
- dataRaw System.String
- Raw DS record data.
- record DnsClientX.RootDsRecord@
- Parsed record when the method returns true.
Returns
true when parsing succeeds; otherwise false.
public static Boolean ValidateAgainstRoot(DnsResponse response) #BooleanValidates the supplied DnsResponse against known root DS records.
Parameters
- response DnsClientX.DnsResponse
- DNS response to validate.
Returns
true if the response can be validated; otherwise false.
public static Boolean ValidateAgainstRoot(DnsResponse response, out String message) #BooleanValidates the supplied DnsResponse against known root DS records.
Parameters
- response DnsClientX.DnsResponse
- DNS response to validate.
- message System.String@
- Detailed failure message when validation fails.
Returns
true if the response can be validated; otherwise false.
public static Boolean ValidateChain(DnsResponse response) #BooleanValidates DNSSEC data by verifying DS records and RRSIG signatures for DNSKEY sets.
Parameters
- response DnsClientX.DnsResponse
- DNS response to validate.
Returns
true when validation succeeds; otherwise false.
public static Boolean ValidateChain(DnsResponse response, out String message) #BooleanValidates DNSSEC data by verifying DS records and RRSIG signatures for DNSKEY sets.
Parameters
- response DnsClientX.DnsResponse
- DNS response to validate.
- message System.String@
- Detailed failure message when validation fails.
Returns
true when validation succeeds; otherwise false.