TSKTrustDecision

enum TSKTrustDecision {}

Possible return values when verifying a server’s identity against an SSL pinning policy.

  • Based on the server’s certificate chain and the configured pinning policy for this domain, the SSL connection should be allowed. This return value does not necessarily mean that the pinning validation succeded (for example if kTSKEnforcePinning was set to NO for this domain). If a pinning validation failure occured and if a report URI was configured, a pin failure report was sent.

    Declaration

    Objective-C

    TSKTrustDecisionShouldAllowConnection

    Swift

    case shouldAllowConnection = 0
  • Based on the server’s certificate chain and the configured pinning policy for this domain, the SSL connection should be blocked. A pinning validation failure occured and if a report URI was configured, a pin failure report was sent.

    Declaration

    Objective-C

    TSKTrustDecisionShouldBlockConnection

    Swift

    case shouldBlockConnection = 1
  • No pinning policy was configured for this domain and TrustKit did not validate the server’s identity. Because this will happen in an authentication handler, it means that the server’s serverTrust object needs to be verified against the device’s trust store using SecTrustEvaluate(). Failing to do so will disable SSL certificate validation.

    Declaration

    Objective-C

    TSKTrustDecisionDomainNotPinned

    Swift

    case domainNotPinned = 2