TSKPinningValidatorResult.h 1.8 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758
  1. /*
  2. TSKPinningValidator.h
  3. TrustKit
  4. Copyright 2015 The TrustKit Project Authors
  5. Licensed under the MIT license, see associated LICENSE file for terms.
  6. See AUTHORS file for the list of project authors.
  7. */
  8. #import "TSKTrustDecision.h"
  9. #if __has_feature(modules)
  10. @import Foundation;
  11. #else
  12. #import <Foundation/Foundation.h>
  13. #endif
  14. /**
  15. A `TSKPinningValidatorResult` instance contains all the details regarding a pinning validation
  16. performed against a specific server.
  17. */
  18. @interface TSKPinningValidatorResult : NSObject
  19. /**
  20. The hostname of the server SSL pinning validation was performed against.
  21. */
  22. @property (nonatomic, readonly, nonnull) NSString *serverHostname;
  23. /**
  24. The result of validating the server's certificate chain against the set of SSL pins configured for
  25. the `notedHostname`.
  26. */
  27. @property (nonatomic, readonly) TSKTrustEvaluationResult evaluationResult;
  28. /**
  29. The trust decision returned for this connection, which describes whether the connection should be blocked
  30. or allowed, based on the `evaluationResult` returned when evaluating the `serverTrust` and the SSL pining
  31. policy configured for this server.
  32. For example, the pinning validation could have failed (ie. evaluationResult being
  33. `TSKTrustEvaluationFailedNoMatchingPin`) but the policy might be set to ignore pinning validation failures
  34. for this server, thereby returning `TSKTrustDecisionShouldAllowConnection`.
  35. */
  36. @property (nonatomic, readonly) TSKTrustDecision finalTrustDecision;
  37. /**
  38. The time it took for the SSL pinning validation to be performed.
  39. */
  40. @property (nonatomic, readonly) NSTimeInterval validationDuration;
  41. /**
  42. The certificate chain sent by the server when establishing the connection as PEM-formatted certificates.
  43. */
  44. @property (nonatomic, readonly, nonnull) NSArray *certificateChain;
  45. @end