onValidationFailure

abstract fun onValidationFailure(instanceId: String, domain: String, error: TrustPinError, presentedCertificate: X509Certificate)

A definitive pin-validation failure.

Parameters

instanceId

Identifier of the TrustPin instance that evaluated the connection ("default" for TrustPin.default).

domain

The domain the certificate was evaluated against, as evaluated (canonicalized when canonicalization succeeded).

presentedCertificate

The leaf certificate the server presented. Attacker-supplied data — sanitize before rendering or forwarding.