Skip to content

Commit e3a11e0

Browse files
committed
lower deployment versions, fix misc warnings
1 parent f5d8563 commit e3a11e0

2 files changed

Lines changed: 17 additions & 15 deletions

File tree

TrustKit.podspec

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,17 @@
11
Pod::Spec.new do |s|
22
s.name = "TrustKit"
3-
s.version = "3.0.0"
3+
s.version = "3.0.2"
44
s.summary = 'TrustKit is an open source framework that makes it easy to deploy SSL pinning in any iOS, macOS, tvOS or watchOS App.'
55
s.homepage = "https://datatheorem.github.io/TrustKit"
66
s.documentation_url = 'https://datatheorem.github.io/TrustKit/documentation/'
77
s.license = { :type => 'MIT', :file => 'LICENSE' }
88
s.authors = 'Alban Diquet', 'Angela Chow', 'Eric Castro'
99
s.source = { :git => "https://github.com/datatheorem/TrustKit.git", :tag => "#{s.version}" }
1010

11-
s.ios.deployment_target = '14.0'
12-
s.osx.deployment_target = '11.0'
13-
s.tvos.deployment_target = '14.0'
14-
s.watchos.deployment_target = '7.0'
11+
s.ios.deployment_target = '12.0'
12+
s.osx.deployment_target = '10.13'
13+
s.tvos.deployment_target = '12.0'
14+
s.watchos.deployment_target = '4.0'
1515

1616
s.pod_target_xcconfig = { 'DEFINES_MODULE' => 'YES' }
1717
s.source_files = ['TrustKit', 'TrustKit/**/*.{h,m,c}']

TrustKit/Pinning/pinning_utils.m

Lines changed: 12 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -18,15 +18,17 @@ void evaluateCertificateChainTrust(SecTrustRef serverTrust, SecTrustResultType *
1818
CFErrorRef errorRef;
1919
bool certificateEvaluationSucceeded = SecTrustEvaluateWithError(serverTrust, &errorRef);
2020
OSStatus status = SecTrustGetTrustResult(serverTrust, trustResult);
21-
if (status != errSecSuccess)
22-
{
23-
certificateEvaluationSucceeded = false;
24-
NSString *errDescription = [NSString stringWithFormat:@"got status %d", status];
25-
*error = [[NSError alloc] initWithDomain:@"com.datatheorem.trustkit" code:1 userInfo:@{NSLocalizedDescriptionKey:errDescription}];
26-
}
27-
else if (!certificateEvaluationSucceeded && (error != NULL))
28-
{
29-
*error = (__bridge_transfer NSError *)errorRef;
21+
if (error != NULL) {
22+
if (status != errSecSuccess)
23+
{
24+
certificateEvaluationSucceeded = false;
25+
NSString *errDescription = [NSString stringWithFormat:@"got status %d", (int)status];
26+
*error = [[NSError alloc] initWithDomain:@"com.datatheorem.trustkit" code:1 userInfo:@{NSLocalizedDescriptionKey:errDescription}];
27+
}
28+
else if (!certificateEvaluationSucceeded)
29+
{
30+
*error = (__bridge_transfer NSError *)errorRef;
31+
}
3032
}
3133
}
3234
else
@@ -37,7 +39,7 @@ void evaluateCertificateChainTrust(SecTrustRef serverTrust, SecTrustResultType *
3739
OSStatus status = SecTrustEvaluate(serverTrust, trustResult);
3840
#pragma clang diagnostic pop
3941
if (status != errSecSuccess && (error != NULL)) {
40-
NSString *errDescription = [NSString stringWithFormat:@"got status %d", status];
42+
NSString *errDescription = [NSString stringWithFormat:@"got status %d", (int)status];
4143
*error = [[NSError alloc] initWithDomain:@"com.datatheorem.trustkit" code:2 userInfo:@{NSLocalizedDescriptionKey:errDescription}];
4244
}
4345
}

0 commit comments

Comments
 (0)