Domain Detective

API Reference

Class

HPKPAnalysis

Namespace DomainDetective
Assembly DomainDetective
Implements

Analyzes HTTP Public Key Pinning (HPKP) headers.

Inheritance

  • Object
  • HPKPAnalysis

Usage

This type appears in these public API surfaces even when no hand-authored example is attached directly to the page.

Returned or exposed by

Accepted by parameters

Constructors

Methods

public async Task AnalyzeUrl(String url, InternalLogger logger) #
Returns: Task

Performs an HTTP request to retrieve the Public-Key-Pins header and verifies that any advertised pins are valid base64-encoded SHA-256 hashes.

Parameters

url System.String requiredposition: 0
The URL to request.
logger DomainDetective.InternalLogger requiredposition: 1
Logger used for error reporting.
public static Void ClearCache() #
Returns: Void

Removes all cached results. Primarily used in unit tests to ensure isolation between runs.

Properties

public String Subject { get; set; } #

The analyzed URL or host.

public Boolean HeaderPresent { get; set; } #

Gets a value indicating whether the Public-Key-Pins header was present.

public Boolean PinsValid { get; set; } #

Gets a value indicating whether all retrieved pins were syntactically valid.

public Int32 MaxAge { get; set; } #

Gets the max-age directive value.

public Boolean IncludesSubDomains { get; set; } #

Gets a value indicating whether the includeSubDomains directive was present.

public List<String> Pins { get; set; } #

Gets the list of SHA-256 pin values.

public String Header { get; set; } #

Gets the raw header value.

public Boolean SelfSignedCertificate { get; set; } #

Gets or sets a value indicating that the certificate is self-signed. When true a single pin is considered sufficient and will not cause PinsValid to be false.

public virtual List<Assessment> Assessments { get; } #

Collected assessments during analysis.

public IReadOnlyList<RecommendationAdvice> Recommendations { get; } #

Positive and negative recommendations derived from assessments.

public TimeSpan CacheDuration { get; set; } #

Maximum time a cached header is considered valid. Tests may override this to speed up expiration.

{{ include "footer" }}