TSKTrustEvaluationResult

enum TSKTrustEvaluationResult {}

Possible return values when verifying a server’s identity against a set of pins.

  • The server trust was succesfully evaluated and contained at least one of the configured pins.

    Declaration

    Objective-C

    TSKTrustEvaluationSuccess

    Swift

    case success = 0
  • The server trust was succesfully evaluated but did not contain any of the configured pins.

    Declaration

    Objective-C

    TSKTrustEvaluationFailedNoMatchingPin

    Swift

    case failedNoMatchingPin = 1
  • The server trust’s evaluation failed: the server’s certificate chain is not trusted.

    Declaration

    Objective-C

    TSKTrustEvaluationFailedInvalidCertificateChain

    Swift

    case failedInvalidCertificateChain = 2
  • The server trust could not be evaluated due to invalid parameters.

    Declaration

    Objective-C

    TSKTrustEvaluationErrorInvalidParameters

    Swift

    case errorInvalidParameters = 3
  • The server trust was succesfully evaluated but did not contain any of the configured pins. However, the certificate chain terminates at a user-defined trust anchor (ie. a custom/private CA that was manually added to the macOS trust store). Only available on macOS.

    Declaration

    Objective-C

    TSKTrustEvaluationFailedUserDefinedTrustAnchor

    Swift

    case failedUserDefinedTrustAnchor = 4
  • The server trust could not be evaluated due to an error when trying to generate the certificate’s subject public key info hash. On iOS 9 or below, this could be caused by a Keychain failure when trying to extract the certificate’s public key bytes.

    Declaration

    Objective-C

    TSKTrustEvaluationErrorCouldNotGenerateSpkiHash

    Swift

    case errorCouldNotGenerateSpkiHash = 5