Domain Detective

API Reference

Class

CertificateTransparencyNameUtility

Namespace DomainDetective
Assembly DomainDetective
Modifiers static

DNS-name normalization and matching helpers shared by certificate transparency providers.

Inheritance

  • Object
  • CertificateTransparencyNameUtility

Methods

public static String BuildExactSearchName(String name) #
Returns: String

Normalizes a search name while preserving an explicit leading wildcard label.

Parameters

name System.String requiredposition: 0
The DNS name to normalize for an exact storage predicate.

Returns

The normalized exact search name.

public static String BuildImmediateWildcardName(String name) #
Returns: String

Builds the wildcard DNS name that can cover exactly one left-most label of a host.

Parameters

name System.String requiredposition: 0
The DNS host name to inspect.

Returns

The immediate wildcard name, or null when the input is not a multi-label host.

public static String BuildImplicitWildcardCandidateName(String name) #
Returns: String

Builds an implicit wildcard candidate for a host lookup, but not for literal wildcard searches.

Parameters

name System.String requiredposition: 0
The DNS name to inspect.

Returns

The immediate wildcard name, or null when no implicit candidate applies.

public static String BuildReversedExactMatch(String name) #
Returns: String

Builds the reversed-label exact match used by suffix-aware storage queries.

Parameters

name System.String requiredposition: 0
The DNS name to normalize and reverse.

Returns

The reversed-label exact match value.

public static String BuildReversedPrefixMatch(String name) #
Returns: String

Builds the reversed-label prefix match used by suffix-aware storage queries.

Parameters

name System.String requiredposition: 0
The DNS name to normalize and reverse.

Returns

The escaped reversed-label prefix match value.

public static Boolean CertificateNameMatchesHost(String hostName, String certificateName) #
Returns: Boolean

Determines whether a certificate DNS name covers a host using exact and single-label wildcard semantics.

Parameters

hostName System.String requiredposition: 0
The concrete host being queried.
certificateName System.String requiredposition: 1
The certificate DNS name.

Returns

true when the certificate name covers the host.

public static String GetRegistrableDomainOrSelf(String candidate) #
Returns: String

Resolves a host to its registrable domain when the embedded public suffix list is available.

Parameters

candidate System.String requiredposition: 0
The host name to inspect.

Returns

The registrable domain, or a conservative last-two-label fallback.

public static Boolean IsWildcard(String name) #
Returns: Boolean

Determines whether a DNS name starts with a wildcard label.

Parameters

name System.String requiredposition: 0
The DNS name to inspect.

Returns

true when the normalized name starts with *..

public static String Normalize(String name) #
Returns: String

Normalizes a DNS name for certificate transparency matching.

Parameters

name System.String requiredposition: 0
The input DNS name.

Returns

A lower-case DNS name without a trailing root dot, or an empty string.

public static String ReverseLabels(String name) #
Returns: String

Reverses DNS labels so suffix queries can use prefix-like indexes.

Parameters

name System.String requiredposition: 0
The DNS name to normalize and reverse.

Returns

The reversed-label DNS name.

public static String StripWildcard(String name) #
Returns: String

Removes one or more leading wildcard labels from a DNS name.

Parameters

name System.String requiredposition: 0
The DNS name to normalize.

Returns

The normalized DNS name without leading wildcard labels.

{{ include "footer" }}