Skip to content
This repository has been archived by the owner on Jan 17, 2023. It is now read-only.

Commit

Permalink
Cherry-picked change from #3063
Browse files Browse the repository at this point in the history
  • Loading branch information
kcharwood committed Oct 21, 2015
1 parent f573fdb commit 6e89efe
Showing 1 changed file with 1 addition and 5 deletions.
6 changes: 1 addition & 5 deletions AFNetworking/AFSecurityPolicy.m
Expand Up @@ -259,11 +259,7 @@ - (BOOL)evaluateServerTrust:(SecTrustRef)serverTrust
SecTrustSetPolicies(serverTrust, (__bridge CFArrayRef)policies);

if (self.SSLPinningMode == AFSSLPinningModeNone) {
if (self.allowInvalidCertificates || AFServerTrustIsValid(serverTrust)){
return YES;
} else {
return NO;
}
return self.allowInvalidCertificates || AFServerTrustIsValid(serverTrust);
} else if (!AFServerTrustIsValid(serverTrust) && !self.allowInvalidCertificates) {
return NO;
}
Expand Down

0 comments on commit 6e89efe

Please sign in to comment.