API Reference
HPKPAnalysis
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
- Property DomainHealthCheck.HPKPAnalysis
Accepted by parameters
- Method HpkpNarrative.Build
Constructors
public HPKPAnalysis() #Methods
public async Task AnalyzeUrl(String url, InternalLogger logger) #TaskPerforms 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
- The URL to request.
- logger DomainDetective.InternalLogger
- Logger used for error reporting.
public static Void ClearCache() #VoidRemoves all cached results. Primarily used in unit tests to ensure isolation between runs.
Inherited Methods
public override Boolean Equals(Object obj) #BooleanParameters
- obj Object
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.