TrustEvaluationTestHelpers.h [plain text]
#ifndef _TRUSTTEST_TRUST_HELPERS_H_
#define _TRUSTTEST_TRUST_HELPERS_H_
#import <Foundation/Foundation.h>
#import <Security/Security.h>
NS_ASSUME_NONNULL_BEGIN
NSURL * _Nullable setUpTmpDir(void);
int ping_host(char *host_name);
@interface TestTrustEvaluation : NSObject
@property (assign, nonnull) SecTrustRef trust;
@property NSString *fullTestName;
@property BOOL bridgeOSDisabled;
@property (assign) SecTrustResultType trustResult;
@property (nullable) NSDictionary *resultDictionary;
@property NSNumber *expectedResult;
@property NSNumber *expectedChainLength;
@property (nullable,assign,nonatomic) NSArray *anchors;
@property (nullable,assign,nonatomic) NSArray *ocspResponses;
@property (nullable,nonatomic) NSArray *presentedSCTs;
@property (nullable,nonatomic) NSArray *trustedCTLogs;
@property (nullable,nonatomic) NSDate *verifyDate;
- (instancetype _Nullable )initWithCertificates:(NSArray * _Nonnull)certs policies:(NSArray * _Nullable)policies;
- (instancetype _Nullable) initWithTrustDictionary:(NSDictionary *)testDict;
- (void)addAnchor:(SecCertificateRef)certificate;
- (void)setNeedsEvaluation;
- (bool)evaluate:(out NSError * _Nullable __autoreleasing * _Nullable)outError;
- (bool)evaluateForExpectedResults:(out NSError * _Nullable __autoreleasing *)outError;
@end
NS_ASSUME_NONNULL_END
#endif